Repository navigation
feat(aks-live-patching): add shared live-patching status package - #10047
Open
C.YAO (YaoC) wants to merge 1 commit into
Open
C.YAO (YaoC) wants to merge 1 commit into
C.YAO (YaoC) wants to merge 1 commit into
Conversation
Contributor
Windows Unit Test Results 3 files 21 suites 1m 5s ⏱️ Results for commit e4e028d. ♻️ This comment has been updated with latest results. |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the change introducing a shared live-patching status contract.
No open issues 🎉
What changed in this PR
Adds a shared Go package for the live-patching status contract, enabling the controller, AKS resource provider, and end-to-end tests to replace duplicated definitions. No VHD or provisioning behavior changes.
Changes:
- Defines annotation keys, component names, status types, and parsing and completion-check helpers.
- Adds unit tests for parsing, hash matching, convergence, and component-specific success.
- Updates a coverage workflow comment without changing CI logic.
| File | Description |
|---|---|
aks-live-patching/pkg/status/status.go |
Defines the shared status contract and helper methods. |
aks-live-patching/pkg/status/status_test.go |
Tests parsing and status-check behavior. |
.github/workflows/go-test.yml |
Removes the outdated comment stating that live-patching has no unit tests. |
Review effort: Balanced
Add aks-live-patching/pkg/status with the generic live-patching node contract: the goal-hash and live-patching-status annotation names, the component names, the Succeeded result code, the Status document the node loop writes, and helpers to parse and evaluate it (IsProcessed, IsConverged, ComponentSucceeded). The live-patching-controller, the AKS RP and the E2E tests each define their own copy of this contract today; this gives them one definition next to the VHD scripts that write the status. Co-Authored-By: Claude <noreply@anthropic.com>
C.YAO (YaoC)
force-pushed
the
chyao/live-patching-status-pkg
branch
from
November 10, 2026 22:58
81e0c78 to
e4e028d
Compare
Contributor
Contributor
Contributor
|
This branch has not been deployed
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 this PR does / why we need it:
Adds
aks-live-patching/pkg/status, a shared Go definition of the generic live-patching node contract. The live-patching controller (LPC), the AKS RP and the AKS E2E tests each keep their own copy of it today.kubernetes.azure.com/live-patching-config-goal-hash(stamped by LPC) andkubernetes.azure.com/live-patching-status(written by the node-side live-patching loop).securityPatch,npdConfig,npdBinary,localDNS,aksNodeController, matching the names the RP renders into the live-patching config.Status/ComponentStatus, the same JSON{"currentHash": ..., "components": {"<name>": {"code": ..., "current": ..., "message": ...}}}thatubuntu-snapshot-update.shandmariner-package-update.shwrite. Keeping it next to those scripts lets a format change land in one PR.Parse: an empty annotation is a node that hasn't reported yet, not an error.IsProcessed(goalHash): the node has processed that config.IsConverged(goalHash): every component succeeded (LPC's rule).ComponentSucceeded(goalHash, component): one component succeeded. The RP uses this to wait only onsecurityPatch, so unrelated component failures don't block a security patch operation.The package uses only the standard library, so
go.modis unchanged. It includes table-driven unit tests. A comment in.github/workflows/go-test.ymlsaidaks-live-patchinghas no unit tests; I reworded it. The CI logic is unchanged.Consumers: the AKS RP will use this to check
live-patching-statusinIsLivePatchingComplete(keeping the legacy current-timestamp check for older VHDs), and LPC can replace its internal copy.No VHD or provisioning behavior changes.
Which issue(s) this PR fixes:
N/A
🤖 Generated with Claude Code