AzLocal.UpdateManagement v0.8.79: Step.07 Force Immediate Update break-glass override#85
Merged
Merged
Conversation
…k-glass override
Adds an operator-only override that bypasses the per-cluster Step 3c
maintenance-window gate (UpdateStartWindow / UpdateExclusionsWindow) for
emergency / out-of-window patching. Defaults to OFF. Cannot be reached
from the scheduled apply-updates-schedule.yml configuration file.
Cmdlet surface:
- Start-AzLocalClusterUpdate -IgnoreScheduleTags (switch). When set, the
entire Step 3c block is skipped (tag lookup still runs so the values
can be logged, but Test-AzLocalUpdateScheduleAllowed is not called).
A Warning-level log entry per cluster records the bypassed tag values.
- Invoke-AzLocalReadinessGatedClusterUpdate -ForceImmediateUpdate
(switch). Forwards -IgnoreScheduleTags to Start-AzLocalClusterUpdate
for every cluster in the readiness CSV and emits a host-aware
high-visibility WARNING banner at the top of the apply run.
Pipeline surface (both apply-updates.yml templates):
- GitHub Actions: new force_immediate_update workflow_dispatch choice
input (default 'false'), with a 'WARNING:'-prefixed description that
also calls out 'MANUAL RUNS ONLY'.
- Azure DevOps: new forceImmediateUpdate boolean parameters: entry
(default false), with a 'WARNING:'-prefixed displayName that calls
out 'MANUAL QUEUE ONLY'.
Anti-injection design (two layers of defence to prevent a scheduled
cron firing from honouring the flag):
1. GitHub Actions YAML expression collapses to 'false' for any
non-workflow_dispatch event:
${{ github.event_name == 'workflow_dispatch' &&
github.event.inputs.force_immediate_update || 'false' }}
2. Azure DevOps runtime guard requires $(Build.Reason) -eq 'Manual'
before forwarding the flag; scheduled / CI / PR runs log a
##vso[task.logissue type=warning] explaining the override was
ignored.
The override is deliberately unreachable from
apply-updates-schedule.yml: no forceImmediateUpdate field exists on
New-AzLocalApplyUpdatesScheduleConfig, Resolve-AzLocalPipelineUpdateRing,
or Get-AzLocalApplyUpdatesScheduleAudit. A Pester anti-leak sweep
asserts this.
The UpdateExcluded operator hard-override
(AzureLocalManagement.UpdateExcluded=true) is INTENTIONALLY still
respected - the break-glass override is about time-window gates, not
per-cluster opt-outs. Other readiness gates (connectivity, health,
sideload status) also continue to apply.
Tests:
- Parameter-presence regressions for both new switches.
- New 'v0.8.79 Step.7 break-glass' Context with 8 It blocks covering:
GH input declaration + WARNING: GUI label + MANUAL RUNS ONLY text;
ADO parameter declaration + WARNING: displayName + MANUAL QUEUE ONLY
text; GHA workflow_dispatch anti-injection collapse pattern; ADO
Build.Reason -eq 'Manual' runtime guard; pwsh forwarding of
-ForceImmediateUpdate on both hosts; anti-leak sweep across the
three schedule-config code paths.
- Version assertion bumped 0.8.78 -> 0.8.79.
Bundled pipeline templates: all 22 bump GENERATED_AGAINST_MODULE_VERSION
from '0.8.78' to '0.8.79'. Bodies for the two apply-updates.yml files
(GH + ADO) carry the new feature.
Docs: README, CHANGELOG, docs/release-history.md,
Automation-Pipeline-Examples/README.md, and
Automation-Pipeline-Examples/docs/appendix-pipelines.md all bumped.
Prior v0.8.78 What's New demoted from README main body to Release
History per the long-standing 'exactly one ## What's New' README
convention.
No new exports (still 60). No API breaking changes. PSGallery
ReleaseNotes char count: 7511 / 10000.
Pester: 1161 passed, 0 failed, 1 skipped (Live-Integration, expected).
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.
AzLocal.UpdateManagement v0.8.79
Summary
Adds an operator-only Force Immediate Update break-glass override to the Step.07 apply-updates pipeline that bypasses the per-cluster
UpdateStartWindow/UpdateExclusionsWindowStep 3c maintenance-window gate. Intended for emergency / out-of-window patching driven by an on-call operator. Defaults to OFF, cannot be reached from the scheduledapply-updates-schedule.ymlconfiguration file, and a high-visibility WARNING banner is emitted in the run log when it fires.Cmdlet surface
Start-AzLocalClusterUpdate -IgnoreScheduleTags(new[switch]). When set, the entire Step 3c block is skipped: the per-clusterUpdateStartWindowandUpdateExclusionsWindowtag lookups still execute (so the tag values can be logged), butTest-AzLocalUpdateScheduleAllowedis NOT called and the cluster is admitted regardless of the current UTC time. AWarning-level log entry per cluster records the bypassed tag values.Invoke-AzLocalReadinessGatedClusterUpdate -ForceImmediateUpdate(new[switch]). Forwards-IgnoreScheduleTagstoStart-AzLocalClusterUpdatefor every cluster in the readiness CSV, and emits a host-aware high-visibility warning banner at the top of the apply run.Pipeline surface (both
apply-updates.ymltemplates)force_immediate_updateworkflow_dispatchchoice input (default'false'). Thedescription:rendered in the Run Workflow GUI startsWARNING:and explicitly notesMANUAL RUNS ONLY.forceImmediateUpdatebooleanparameters:entry (defaultfalse). ThedisplayName:rendered in the Queue Build GUI startsWARNING:and explicitly notesMANUAL QUEUE ONLY.Anti-injection design (defence in depth)
Two layers prevent a scheduled cron firing from honouring the flag:
schedule/push/pull_request/repository_dispatchevent sees'false'even if a malicious upstream tries to inject the input:$(Build.Reason) -eq 'Manual'before flipping the switch. Scheduled / CI / PR runs log a##vso[task.logissue type=warning]explaining the parameter was ignored.The override is deliberately not surfaced by
New-AzLocalApplyUpdatesScheduleConfig/Resolve-AzLocalPipelineUpdateRing/Get-AzLocalApplyUpdatesScheduleAudit— there is no path to enable it fromapply-updates-schedule.yml. A Pester sweep asserts this.The
UpdateExcludedoperator hard-override (AzureLocalManagement.UpdateExcluded=true) is INTENTIONALLY still respected byForce Immediate Update— the break-glass override is about time-window gates, not per-cluster opt-outs. Other readiness gates (connectivity, health, sideload status) also continue to apply.Scope of change
Start-AzLocalClusterUpdate.ps1,Invoke-AzLocalReadinessGatedClusterUpdate.ps1,AzLocal.UpdateManagement.psd1(ModuleVersion + ReleaseNotes),AzLocal.UpdateManagement.psm1($script:ModuleVersion).apply-updates.yml(GitHub Actions + Azure DevOps); 22 bundled templates bumpGENERATED_AGAINST_MODULE_VERSIONfrom'0.8.78'to'0.8.79'.CHANGELOG.md,README.md(new What's New section, prior v0.8.78 demoted to Release History per the long-standing one-What's-New convention),docs/release-history.md(v0.8.78 archived entry),Automation-Pipeline-Examples/README.md(Step 7 callout updated),Automation-Pipeline-Examples/docs/appendix-pipelines.md(v0.8.79 Behaviour change block).v0.8.79 Step.7 break-glassContext with 8Itblocks covering GH input declaration +WARNING:GUI label +MANUAL RUNS ONLYtext; ADO parameter declaration +WARNING:displayName +MANUAL QUEUE ONLYtext; GHA anti-injection collapse pattern; ADOBuild.Reason -eq 'Manual'runtime guard; pwsh forwarding of-ForceImmediateUpdateon both hosts; anti-leak sweep across the three schedule-config code paths. Version assertion bumped 0.8.78 -> 0.8.79.Verification
Import-PowerShellDataFileagainst the manifest: ModuleVersion0.8.79, ReleaseNotes char count 7,511 / 10,000.Get-CmdletErrorsclean on all source / manifest / YAML edits.Compatibility
Start-AzLocalClusterUpdateandInvoke-AzLocalReadinessGatedClusterUpdatedefault the new switches to$false, both pipeline templates default the new inputs to'false', and a scheduled run cannot honour the flag even if a downstream consumer hand-edits theirapply-updates.ymlto forward a truthy value.