Skip to content

Commit

Permalink
[DataFactory]Upgrade DataFactory SDK 1.0.2 (#7676)
Browse files Browse the repository at this point in the history
* [DataFactory]Upgrade DataFactory SDK 1.0.2

* fix
  • Loading branch information
Jingshu918 committed Jun 5, 2024
1 parent 26e4378 commit 86a8d37
Show file tree
Hide file tree
Showing 63 changed files with 12,430 additions and 11,821 deletions.
3 changes: 3 additions & 0 deletions src/datafactory/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Release History
===============
1.0.2
* Support new features in ADF

1.0.1
* Fix broken dataflow update command

Expand Down
2 changes: 1 addition & 1 deletion src/datafactory/azext_datafactory/manual/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
# regenerated.
# --------------------------------------------------------------------------

VERSION = "1.0.0"
VERSION = "1.0.2"
7,511 changes: 1,494 additions & 6,017 deletions src/datafactory/azext_datafactory/tests/latest/recordings/test_datafactory_main.yaml

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,10 +1,45 @@
|Scenario|Result|ErrorMessage|ErrorStack|ErrorNormalized|StartDt|EndDt|
|step_create|successed||||2023-03-16 10:18:37.447490|2023-03-16 10:18:37.601876|
|step_managed_virtual_network_create|successed||||2023-03-16 10:18:37.602084|2023-03-16 10:18:37.638766|
|step_managed_virtual_network_list|successed||||2023-03-16 10:18:37.638923|2023-03-16 10:18:37.683618|
|step_managed_virtual_network_show|successed||||2023-03-16 10:18:37.683772|2023-03-16 10:18:37.720941|
|step_managed_private_endpoint_create|successed||||2023-03-16 10:18:37.721098|2023-03-16 10:18:37.757735|
|step_managed_private_endpoint_list|successed||||2023-03-16 10:18:37.757894|2023-03-16 10:18:37.792782|
|step_managed_private_endpoint_show|successed||||2023-03-16 10:18:37.792944|2023-03-16 10:18:37.828343|
|step_delete|successed||||2023-03-16 10:18:37.828492|2023-03-16 10:18:37.863482|
Coverage: 8/8
|step_create|successed||||2024-06-05 06:03:44.666250|2024-06-05 06:03:53.773893|
|step_update|successed||||2024-06-05 05:55:10.660572|2024-06-05 05:55:14.248043|
|step_linked_service_create|successed||||2024-06-05 05:55:14.248043|2024-06-05 05:55:16.056728|
|step_dataset_create|successed||||2024-06-05 05:55:19.181613|2024-06-05 05:55:20.853192|
|step_pipeline_create|successed||||2024-06-05 05:55:23.811636|2024-06-05 05:55:24.992160|
|step_trigger_create|successed||||2024-06-05 05:55:27.394292|2024-06-05 05:55:28.976802|
|step_integration_runtime_self_hosted_create|successed||||2024-06-05 05:55:31.965079|2024-06-05 05:55:33.902863|
|step_integration_runtime_update|successed||||2024-06-05 05:55:33.902863|2024-06-05 05:55:35.618977|
|step_integration_runtime_show|successed||||2024-06-05 05:57:07.623173|2024-06-05 05:57:08.462548|
|step_linked_service_show|successed||||2024-06-05 05:55:39.301215|2024-06-05 05:55:40.687734|
|step_pipeline_show|successed||||2024-06-05 05:55:40.687734|2024-06-05 05:55:42.104632|
|step_dataset_show|successed||||2024-06-05 05:55:42.104632|2024-06-05 05:55:42.986734|
|step_trigger_show|successed||||2024-06-05 06:04:14.361174|2024-06-05 06:04:15.205902|
|step_integration_runtime_list|successed||||2024-06-05 05:55:44.327838|2024-06-05 05:55:45.221727|
|step_linked_service_list|successed||||2024-06-05 05:55:45.221727|2024-06-05 05:55:46.117660|
|step_pipeline_list|successed||||2024-06-05 05:55:46.117660|2024-06-05 05:55:47.565761|
|step_trigger_list|successed||||2024-06-05 05:55:47.565761|2024-06-05 05:55:48.951530|
|step_dataset_list|successed||||2024-06-05 05:55:48.951530|2024-06-05 05:55:49.802921|
|step_show|successed||||2024-06-05 05:55:49.802921|2024-06-05 05:55:50.668552|
|step_list2|successed||||2024-06-05 05:55:50.668552|2024-06-05 05:55:51.525056|
|step_list|successed||||2024-06-05 05:55:51.525056|2024-06-05 05:55:53.769322|
|step_integration_runtime_regenerate_auth_key|successed||||2024-06-05 05:55:53.769322|2024-06-05 05:55:55.265373|
|step_integration_runtime_sync_credentials|successed||||2024-06-05 05:55:55.265373|2024-06-05 05:55:56.247190|
|step_integration_runtime_get_monitoring_data|successed||||2024-06-05 05:55:56.247190|2024-06-05 05:55:57.680568|
|step_integration_runtime_list_auth_key|successed||||2024-06-05 05:55:57.680568|2024-06-05 05:55:58.671808|
|step_integration_runtime_remove_link|successed||||2024-06-05 05:55:58.671808|2024-06-05 05:56:00.952370|
|step_integration_runtime_get_status|successed||||2024-06-05 05:56:00.952370|2024-06-05 05:56:01.820368|
|step_trigger_get_event_subscription_status|successed||||2024-06-05 05:56:01.820368|2024-06-05 05:56:03.111733|
|step_trigger_unsubscribe_from_event|successed||||2024-06-05 05:56:03.111733|2024-06-05 05:56:04.175065|
|step_trigger_subscribe_to_event|successed||||2024-06-05 05:56:04.175065|2024-06-05 05:56:05.145172|
|step_trigger_start|successed||||2024-06-05 06:04:10.966563|2024-06-05 06:04:14.360163|
|step_trigger_stop|successed||||2024-06-05 06:09:21.064135|2024-06-05 06:09:23.468613|
|step_get_data_plane_access|successed||||2024-06-05 05:56:10.233353|2024-06-05 05:56:11.859827|
|step_configure_factory_repo|successed||||2024-06-05 05:56:12.927931|2024-06-05 05:56:17.054511|
|step_integration_runtime_delete|successed||||2024-06-05 06:03:38.923816|2024-06-05 06:03:39.989511|
|step_trigger_delete|successed||||2024-06-05 06:09:23.469491|2024-06-05 06:09:29.243765|
|step_pipeline_delete|successed||||2024-06-05 06:09:29.244769|2024-06-05 06:09:35.020244|
|step_dataset_delete|successed||||2024-06-05 05:56:30.647254|2024-06-05 05:56:32.390227|
|step_linked_service_delete|successed||||2024-06-05 05:56:32.390227|2024-06-05 05:56:34.164396|
|step_delete|successed||||2024-06-05 06:09:35.021240|2024-06-05 06:09:39.455158|
|step_integration_runtime_start|successed||||2024-06-05 05:57:08.464037|2024-06-05 05:58:24.802244|
|step_integration_runtime_stop|successed||||2024-06-05 05:58:24.803244|2024-06-05 06:03:38.922818|
|step_activity_run_query_by_pipeline_run|successed||||2024-06-05 06:04:04.619080|2024-06-05 06:04:05.991862|
Coverage: 43/43
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

from typing import Any, TYPE_CHECKING

from azure.core.configuration import Configuration
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy

Expand All @@ -19,7 +18,7 @@
from azure.core.credentials import TokenCredential


class DataFactoryManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
class DataFactoryManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
"""Configuration for DataFactoryManagementClient.
Note that all parameters used to create this instance are saved as instance
Expand All @@ -35,7 +34,6 @@ class DataFactoryManagementClientConfiguration(Configuration): # pylint: disabl
"""

def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
super(DataFactoryManagementClientConfiguration, self).__init__(**kwargs)
api_version: str = kwargs.pop("api_version", "2018-06-01")

if credential is None:
Expand All @@ -48,6 +46,7 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs
self.api_version = api_version
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
kwargs.setdefault("sdk_moniker", "mgmt-datafactory/{}".format(VERSION))
self.polling_interval = kwargs.get("polling_interval", 30)
self._configure(**kwargs)

def _configure(self, **kwargs: Any) -> None:
Expand All @@ -56,9 +55,9 @@ def _configure(self, **kwargs: Any) -> None:
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs)
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
self.authentication_policy = kwargs.get("authentication_policy")
if self.credential and not self.authentication_policy:
self.authentication_policy = ARMChallengeAuthenticationPolicy(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
from copy import deepcopy
from typing import Any, TYPE_CHECKING

from azure.core.pipeline import policies
from azure.core.rest import HttpRequest, HttpResponse
from azure.mgmt.core import ARMPipelineClient
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy

from . import models as _models
from ._configuration import DataFactoryManagementClientConfiguration
Expand Down Expand Up @@ -129,7 +131,25 @@ def __init__(
self._config = DataFactoryManagementClientConfiguration(
credential=credential, subscription_id=subscription_id, **kwargs
)
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
_policies = kwargs.pop("policies", None)
if _policies is None:
_policies = [
policies.RequestIdPolicy(**kwargs),
self._config.headers_policy,
self._config.user_agent_policy,
self._config.proxy_policy,
policies.ContentDecodePolicy(**kwargs),
ARMAutoResourceProviderRegistrationPolicy(),
self._config.redirect_policy,
self._config.retry_policy,
self._config.authentication_policy,
self._config.custom_hook_policy,
self._config.logging_policy,
policies.DistributedTracingPolicy(**kwargs),
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
self._config.http_logging_policy,
]
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)

client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
Expand Down Expand Up @@ -185,7 +205,7 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize
)

def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.
>>> from azure.core.rest import HttpRequest
Expand All @@ -205,7 +225,7 @@ def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:

request_copy = deepcopy(request)
request_copy.url = self._client.format_url(request_copy.url)
return self._client.send_request(request_copy, **kwargs)
return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore

def close(self) -> None:
self._client.close()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#
# --------------------------------------------------------------------------


# This file is used for handwritten extensions to the generated code. Example:
# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
def patch_sdk():
Expand Down
Loading

0 comments on commit 86a8d37

Please sign in to comment.