Repository navigation
fix(operator): hosting-aks-upgrade reads the region's version graph as optional - #5684
Merged
Merged
Conversation
…s OPTIONAL — unread, never "nothing offered" `az aks get-versions` is a subscription-scope read (locations/kubernetesVersions) that a cluster-scoped grant does not carry; measured today hosting-operator holds no such right. The facts now carry `versionsRead`/`versionsError` instead of refusing the whole plan: the plugin then chains no further than the cluster's own get-upgrades (enough for 1.34 → 1.35) and says so, and the LTS offer reads UNKNOWN. A behaviour case pins it (20 upgrade cases). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
All reviewed changes are covered and no unresolved blocking issues were identified.
Review effort: Lite
Findings: None
What changed in this PR
Makes the AKS regional version graph read optional while preserving cluster upgrade facts when authorization is unavailable.
Changes:
- Captures
versionsReadandversionsError. - Adds authorization-failure stubs and regression coverage.
| File | Description |
|---|---|
deploy/aks/operator/test/stubs/aks-upgrade/az |
Simulates regional version graph authorization failures. |
deploy/aks/operator/test/run-tests.sh |
Verifies unreadable graph behavior. |
deploy/aks/operator/bin/hosting-aks-upgrade |
Preserves cluster facts when the graph read fails. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
Contributor
Contributor
Contributor
Contributor
Contributor
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Follow-up to #5682.
az aks get-versionsis a subscription-scope read (Microsoft.ContainerService/locations/kubernetesVersions/read) that a cluster-scoped grant does not carry — measured 2026-09-25,hosting-operatorholds no such right.hosting-aks-upgrade factsnow carriesversionsRead/versionsErrorinstead of refusing the whole plan on it: the Hosting plugin then chains no further than the cluster's ownget-upgrades(enough for 1.34 → 1.35) and says so, and the LTS offer reads UNKNOWN rather than "none". Every other ARM read still refuses by name.Verification
run-tests.shupgrade block: 20 passed, 0 failed (new case: an AuthorizationFailed on get-versions is carried as UNREAD while the cluster's own upgrades still read); shellcheck clean.Pairs-with: none — bash only, no .NET surface.
🤖 Generated with Claude Code