-
Notifications
You must be signed in to change notification settings - Fork 3.2k
update pipeline #18238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update pipeline #18238
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -24,11 +24,6 @@ | |||||||||||
| # | ||||||||||||
| # -------------------------------------------------------------------------- | ||||||||||||
| from azure.core import PipelineClient | ||||||||||||
| from azure.core.pipeline.policies import ( | ||||||||||||
| ContentDecodePolicy, | ||||||||||||
| DistributedTracingPolicy, | ||||||||||||
| RequestIdPolicy, | ||||||||||||
| ) | ||||||||||||
| from .policies import ARMAutoResourceProviderRegistrationPolicy, ARMHttpLoggingPolicy | ||||||||||||
|
|
||||||||||||
|
|
||||||||||||
|
|
@@ -47,23 +42,11 @@ def __init__(self, base_url, **kwargs): | |||||||||||
| raise ValueError( | ||||||||||||
| "Current implementation requires to pass 'config' if you don't pass 'policies'" | ||||||||||||
| ) | ||||||||||||
| kwargs["policies"] = self._default_policies(**kwargs) | ||||||||||||
| per_call_policies = kwargs.get('per_call_policies', []) | ||||||||||||
| per_call_policies.append(ARMAutoResourceProviderRegistrationPolicy()) | ||||||||||||
|
||||||||||||
| if isinstance(per_call_policies, Iterable): | |
| for policy in per_call_policies: | |
| policies.append(policy) | |
| else: | |
| policies.append(per_call_policies) |
But here it can only be a list. Passing per_call_policies as an object causes failure in the append method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These lines are unnecessary as the client will always have
http_logging_policyconfigured:azure-sdk-for-python/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/_configuration.py
Line 59 in 28545a0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need it because in your test case, you use the azure.core.configure which does not honor http_logging_policy.
w/o it will fail the tests.