Commit c68335b
authored
v0.8.82: UpdateLastAttempt audit tag + Step.05 Last Updated column + Step.08 attempts-without-run reconciliation (#88)
* Step.5 polish: drop duplicated Summary counts labels + sort All-clusters detail by Status priority
- Summary counts: each row reused the icon-map cell (which already includes its own label) AND appended a duplicate trailing label, producing 'Ready for Update Ready for update' / 'Up to Date Up to date' / 'Action Required Not ready for update' / 'Health Failure Clusters with Critical health failures'. Fixed by emitting the icon-map cell unmodified; the HealthFailure row keeps the 'Clusters with Critical health failures' qualifier in parentheses since it counts something different from the readiness cascade.
- All-clusters detail: previously sorted only by UpdateRing + ClusterName so operator-actionable rows were scattered. Now sorts by Status priority first (InProgress -> HealthFailure -> UpdateFailed -> ActionRequired -> SbeBlocked -> NeedsInvestigation -> ReadyForUpdate -> UpToDate), then UpdateRing + ClusterName as before. Up-to-Date clusters drop to the bottom; in-flight + remediation rows surface at the top.
- Pester: 1211 passed, 0 failed (no behavioural test relied on the duplicated labels or the prior sort order).
* v0.8.82: Item 5 - UpdateLastAttempt audit tag + Step.05 Last Updated column + Step.08 reconciliation
Three Item-5 deliverables shipped together, plus the residual v0.8.81 review polish.
Step.05 (Get-AzLocalClusterUpdateReadiness + Export-AzLocalClusterUpdateReadinessReport):
- New LastUpdated property on every output row, computed from max packageVersions[].lastUpdated across all packageTypes (Solution / Services / Platform / SBE).
- New 'Last Updated' column in the detail table between 'Status' and 'Recommended update'.
- Detail-table sort changed to UpdateRing -> Status priority -> ClusterName so ring cohorts stay grouped with in-flight/remediation rows at the top of each cohort.
UpdateLastAttempt cluster tag (new, owned by AzLocal.UpdateManagement):
- Format: <UTC>;<Outcome>;<UpdateName>;<Reason> truncated to the 256-char Azure tag-value limit (reason field truncated first with a trailing ~ sentinel).
- Stamped by Start-AzLocalClusterUpdate at every attempt outcome (HealthCheckBlocked, UpdateStarted, Failed). Writes swallow ARM errors and log Warning - the audit tag MUST NOT block the apply flow.
- Auto-cleared by Invoke-AzLocalSideloadedAutoResetForCluster (independent block, separate from sideloaded reset logic) when the latest update run is Succeeded AND either the UpdateName matches the recorded attempt OR the attempt was a HealthCheckBlocked/Failed outcome more than 1h old.
- New Private helpers: Format-AzLocalUpdateLastAttemptTagValue, ConvertFrom-AzLocalUpdateLastAttemptTagValue, Write-AzLocalUpdateLastAttemptTag. New script-scoped constant $script:UpdateLastAttemptTagName = 'UpdateLastAttempt'.
Step.08 (Export-AzLocalUpdateRunMonitorReport):
- New 'Recent update attempts with no observable updateRun' section. Joins the per-cluster UpdateLastAttempt tag against the observed updateRun list and surfaces any attempt within the last -RecentAttemptWindowHours (default 72) whose matching updateRun is missing or has a StartTimeUtc before (attempt-5min).
- Captures Portland-style URP package-internal pre-install health-check failures (cluster activity log shows 'Allows to apply updates: Succeeded' but no updateRun resource is ever persisted - confirmed via ARG on 2026-06-15: Portland has 10 updateRuns across 5 versions, none for Solution12.2605.1003.210 which is in its UpdateVersionInProgress tag).
- by-update-ring scope path now ALWAYS calls Get-AzLocalClusterInventory (with -ScopeByUpdateRingTag) so per-cluster tags are available for the reconciliation pass. The all-clusters path already had inventory.
- New pipeline output: attempts_without_run.
- New PassThru fields: AttemptWithoutRunCount + AttemptGaps (uses .ToArray() not @(...) - empty Generic.List[object] wrap throws ArgumentException in PS 5.1).
- New parameter: [ValidateRange(0,8760)][int] = 72.
- Each gap also emits a JUnit testcase with Type='AttemptWithoutRun', ClassName='UpdateMonitor'.
Tests:
- Pester suite expanded: 1248 tests, 0 failures. New Describe blocks cover Format/Convert tag helpers (round-trip, truncation, semicolon stripping, whitespace collapse, malformed-input -> ), the script-scoped tag-name constant, Get-AzLocalClusterUpdateReadiness LastUpdated presence on all shapes (success / NotFound / Error), Step.05 column + sort, Start-AzLocalClusterUpdate three call sites, Invoke-AzLocalSideloadedAutoResetForCluster clear logic, and Step.08 reconciliation (param, builder, 5-min slack, by-update-ring inventory, pipeline output, markdown section, JUnit Type, PassThru shape, empty-fleet PassThru).
- Pre-existing Scope=by-update-ring test updated: now asserts Get-AzLocalClusterInventory IS called with -ScopeByUpdateRingTag (was asserting it must NOT be called - intentional behavior change for the reconciliation pass).
CHANGELOG + docs/release-history.md + README.md updated. Pipeline YAML GENERATED_AGAINST_MODULE_VERSION pins bumped to '0.8.82' across all 22 ADO + GHA workflow templates. Module export count unchanged (60). Resolves: ship Item-5 backlog from /memories/repo/AzLocal.UpdateManagement-post-v0.7.76-backlog.md.1 parent 1542805 commit c68335b
38 files changed
Lines changed: 887 additions & 82 deletions
File tree
- AzLocal.UpdateManagement
- Automation-Pipeline-Examples
- azure-devops
- github-actions
- Private
- Public
- Tests
- docs
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
0 commit comments