-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[Core] Support track1 and track2 mgmt SDK side by side in CLI #12952
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
Changes from all commits
fdd36ad
63b645d
9b29219
7c94b7d
01159db
369fc72
a6e1db4
3788001
65ec3eb
ce3c794
5ca8874
c924cf4
5284b0c
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 |
|---|---|---|
|
|
@@ -4,7 +4,6 @@ | |
| # -------------------------------------------------------------------------------------------- | ||
|
|
||
| import uuid | ||
| from azure.cli.core.util import sdk_no_wait | ||
|
|
||
|
|
||
| def list_recommendations(client, ids=None, resource_group_name=None, | ||
|
|
@@ -132,7 +131,7 @@ def _parse_recommendation_uri(recommendation_uri): | |
| def _generate_recommendations(client): | ||
| from msrestazure.azure_exceptions import CloudError | ||
|
|
||
| response = sdk_no_wait(True, client.generate) | ||
| response = client.generate(raw=True) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so. Is
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, sdk_not_wait is still useful for LRO as it will set "polling" to false if no_wait is true. All other places I replace 'sdk_no_wait' with 'raw=True' actually are bug fix for those modules. In reply to: 406657030 [](ancestors = 406657030)
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we can split the migration of advisor and backup to a different PR?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Prasanna-Padmanabhan,
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't have the necessary knowledge to sign off on this change. If all existing tests are passing, then you can go ahead.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Prasanna-Padmanabhan, thanks for your confirm. All existing tests are passing, so we'll commit this change. |
||
| location = response.headers['Location'] | ||
| operation_id = _parse_operation_id(location) | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
Some questions here:
request_idis required for client?x-ms-request-id?x-ms-request-id: This is a common response header that contains a unique identifier for the current operation, service generated.x-ms-client-request-id: Optional. Contains a unique ID provided by the client to identify the specific request.It looks
x-ms-client--request-idis right. #WontFixThere 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.
Actually
request_idwill be set to "x-ms-client-request-id" in request header, you can check the code in azure core below:def on_request(self, request):
# type: (PipelineRequest) -> None
"""Updates with the given request id before sending the request to the next policy.
In reply to: 407376852 [](ancestors = 407376852)