Emergency runbooks¶
These runbooks cover scenarios where something in the platform itself has broken and consumer repos are affected. All platform operations are managed by @kristopherjturner as the sole org maintainer.
Read before acting
Each runbook changes live org settings or workflow behaviour. Confirm you understand the scope of impact before running any command.
Revert a broken reusable workflow¶
Symptoms: A recent change to a reusable workflow (e.g. reusable-mkdocs-deploy.yml) is causing failures in consumer repos that call it via @main.
Resolution: Pin consumer repos to the last known-good commit SHA or tag until the platform workflow is fixed.
-
Find the last good commit SHA on the platform repo:
-
In each affected consumer repo, update the workflow call to pin to that SHA:
-
Open a PR in each consumer with the pin, merge it to unblock deploys.
- Fix the platform workflow in a separate PR and re-test.
- Once the fix is confirmed, revert the consumer pins back to
@main(or the new version tag).
Restore branch protection on all repos¶
Symptoms: Branch protection has been accidentally removed or altered on one or more repos (e.g. after a repo transfer or settings reset).
Resolution: Run Sync-BranchProtection.ps1 to restore the canonical ruleset in a single pass.
# Restore protection on all non-archived repos
./repo-management/org-scripts/Sync-BranchProtection.ps1
# Confirm a specific repo
./repo-management/org-scripts/Sync-BranchProtection.ps1 -Repos azurelocal-ranger
The script reports PASS or FAIL per repo. Any FAIL indicates an API error — check gh auth status and confirm the token has admin:org or repo-admin scope. See Branch protection for full parameter details.
Recover from a bad drift-audit issue flood¶
Symptoms: drift-audit.yml has filed a large number of drift-report issues incorrectly (e.g. due to a bug in Invoke-RepoAudit.ps1 or a transient API error returning bad data).
Resolution:
- Disable future runs by temporarily disabling
drift-audit.ymlin the Actions UI, or adding aif: falseguard to the workflow job. -
Close the spurious issues in bulk:
# List open drift-report issues gh issue list --repo AzureLocal/platform --label drift-report --state open # Close them (repeat for each issue number, or use a loop) gh issue list --repo AzureLocal/platform --label drift-report --state open \ --json number --jq '.[].number' | \ xargs -I{} gh issue close {} --repo AzureLocal/platform \ --comment "Closing — filed in error due to audit script bug. See <fix PR link>." -
Fix the root cause in
Invoke-RepoAudit.ps1and verify locally before re-enabling the schedule: -
Re-enable the workflow and trigger a manual run to confirm clean output.
Roll back a platform module version¶
Symptoms: An updated platform module (e.g. AzureLocal.Common) has introduced a breaking change that affects consumer scripts or workflows.
Resolution: Pin consumers to a specific platform ref or SHA until a fix is released.
For workflow consumers — pin the uses: line to a tag or SHA (same as the reusable workflow runbook above).
For script consumers that import directly from the platform clone:
-
Check out the last known-good tag or SHA in the platform clone:
-
Re-run whatever script or import was failing to confirm it works on the pinned version.
- Once a fix is merged to
mainon the platform, update the consumer to usemainagain.
Semantic versioning
The platform uses release-please for versioning. Check the CHANGELOG.md for the version that introduced the breaking change and use the preceding version tag as your pin target.
Contact / escalation¶
The AzureLocal org has a single maintainer. All platform operations, org settings, and emergency changes are owned by @kristopherjturner. There is no on-call rotation; file a GitHub Issue on the platform repo with the label platform for non-urgent matters.