Remove readOnly from nodeImageVersion in aks-preview agent pool models to unblock rollback#9736
Remove readOnly from nodeImageVersion in aks-preview agent pool models to unblock rollback#9736InduSridhar wants to merge 3 commits intoAzure:mainfrom
Conversation
… rollback The TypeSpec conversion in Azure/azure-rest-api-specs#38641 incorrectly re-added readOnly to nodeImageVersion in agent pool models. This was intentionally removed in Azure/azure-rest-api-specs#37229 to enable agentpool rollback functionality. The upstream spec fix is tracked in Azure/azure-rest-api-specs#41598 but vendoring may take a week+. This is a temporary SDK-level workaround to unblock the rollback feature that is already in preview for customers. Removes readonly from nodeImageVersion in: - AgentPool - ManagedClusterAgentPoolProfileProperties - ManagedClusterAgentPoolProfile MachineProperties and Snapshot retain readonly as nodeImageVersion is genuinely read-only on those resources.
️✔️Azure CLI Extensions Breaking Change Test
|
|
Hi @InduSridhar, |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
CodeGen Tools Feedback CollectionThank you for using our CodeGen tool. We value your feedback, and we would like to know how we can improve our product. Please take a few minutes to fill our codegen survey |
|
Hi @InduSridhar Release SuggestionsModule: aks-preview
Notes
|
There was a problem hiding this comment.
Pull request overview
Temporary SDK-level workaround in aks-preview’s vendored AKS management client to allow nodeImageVersion to be sent on agent pool PUTs, unblocking nodepool rollback while waiting for the upstream swagger/spec fix.
Changes:
- Removes
readonlyvalidation fornode_image_versiononAgentPool. - Removes
readonlyvalidation fornode_image_versiononManagedClusterAgentPoolProfileProperties. - Removes
readonlyvalidation fornode_image_versiononManagedClusterAgentPoolProfile.
src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/models/_models_py3.py
Show resolved
Hide resolved
src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/models/_models_py3.py
Show resolved
Hide resolved
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
There are several other places that need to be updated to pass the CI checks. You may refer to #9742 as an example. |
Per reviewer feedback (FumingZhang), in addition to removing readonly from _validation, the __init__ methods need to accept node_image_version as a parameter and assign it instead of hardcoding None. Without this, the serializer still cannot pass the value through during rollback. Changes for AgentPool, ManagedClusterAgentPoolProfileProperties, and ManagedClusterAgentPoolProfile (matching Azure#9742 pattern). MachineProperties and Snapshot are unchanged (genuinely read-only).
|
Thanks @FumingZhang. Updated the PR to also make |
Per Copilot review feedback: add notes near the _validation blocks referencing the upstream spec PRs so this workaround isn't accidentally reverted on the next SDK refresh.
Description
The TypeSpec conversion in Azure/azure-rest-api-specs#38641 incorrectly re-added
readOnlyto thenodeImageVersionfield in agent pool models. This was intentionally removed in Azure/azure-rest-api-specs#37229 to enable agentpool rollback functionality.The upstream spec fix is tracked in Azure/azure-rest-api-specs#41598, but vendoring into the CLI may take a week or more. This is a temporary SDK-level workaround to unblock the rollback feature that is already in preview for customers.
Changes
Removes
"node_image_version": {"readonly": True}from the vendored SDK_validationdict in:AgentPoolManagedClusterAgentPoolProfilePropertiesManagedClusterAgentPoolProfileMachinePropertiesandSnapshotretainreadonly—nodeImageVersionis genuinely read-only on those resources.Impact
Without this fix, the serializer strips
nodeImageVersionfrom the PUT request body during agentpool rollback, causing the rollback to only update the orchestrator version while silently ignoring the node image version.Related PRs