-
Notifications
You must be signed in to change notification settings - Fork 3.3k
{AKS} az aks get-versions: get-versions using newer backend api
#26702
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
Conversation
️✔️AzureCLI-FullTest
|
️✔️AzureCLI-BreakingChangeTest
|
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
@FumingZhang, I am helping @haitch to submit this PR. Let me know if there is any other issues. |
FumingZhang
left a comment
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.
LGTM
| """Return the previous and current Kubernetes minor release versions, such as ("1.11.6", "1.12.4").""" | ||
| versions = self.cmd( | ||
| "az aks get-versions -l westus2 --query 'orchestrators[].orchestratorVersion'").get_output_in_json() | ||
| "az aks get-versions -l westus2 --query 'values[*].patchVersions.keys(@)[]'").get_output_in_json() |
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.
Is this change necessary? To me, the recording file is not changed, so I guess without the change, the test could pass.
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.
The unit test that has _get_versions is test_aks_create_service_no_wait which is live_only.
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.
@haitch can you confirm?
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.
@FumingZhang , I think I just did a search of "get-versions", and update here.
And, I am expecting this need to be updated as well, unless the hybrid test is something different.
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.
OK, as the recording file for the hybrid version is not updated, I thought we may keep the test case unchanged. But CI has passed, shouldn't block the change.
| results = cf_managed_clusters(cli_ctx).list_kubernetes_versions(location).as_dict() | ||
| # Flatten all the "orchestrator_version" fields into one array | ||
| return search('orchestrators[*].orchestrator_version', results) | ||
| return search("values[*].patchVersions.keys(@)[]", results) |
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.
May I ask if this modification will change the output logic and cause a breaking change to customers?
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.
This is not a breaking change. Customers will not experience any interruptions.
az aks get-versions: get-versions using newer backend api
Related command
az aks get-versions
Description
AKS offer a new simpler api for listKubernetesVersions, to replace legacy api ListOrchestratorProfile, which was designed to support docker swam and apache mesosphere.
Testing Guide
compare out put between old and new az aks get-versions, data should remain same, but json/table output have minor changes.
History Notes
[aks] BREAKING CHANGE: Both json payload and table format changed for
az aks get-versionsThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.