feat(release-train): store the staging freeze in a custom property, not a repo ruleset (ENG-2013) - #60
Open
hamishfagg wants to merge 1 commit into
Open
Conversation
…ot a repo ruleset (ENG-2013)
The freeze moves from "flip the enforcement of this repo's `staging-freeze`
ruleset" to "set this repo's `staging_frozen` custom property". One org
ruleset in terraform targets the staging branch of every repo where that
property is true, so the workflows no longer edit a ruleset at all and
terraform can own it with an empty plan.
`scripts/freeze_state.py` keeps its two modes and their failure asymmetry:
`read` escalates to frozen on any lookup problem, `set` fails loudly. It now
reads and PATCHes `repos/{repo}/properties/values`; `set --frozen true|false`
replaces `set --enforcement`. A property the org does not define is still
a drift error; a null value (never set) reads as thawed.
The `ruleset-name` input becomes `freeze-property` (default `staging_frozen`)
on release-freeze, release-unfreeze, release-pr, both notify reusables and
notify-pipeline-status. No caller in any repo passes the old input.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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
scripts/freeze_state.py: freeze state is the repo custom propertystaging_frozen.readGETsrepos/{repo}/properties/values;set --frozen true|falsePATCHes it. Same failure asymmetry as before: readers escalate to frozen, writers fail loudly. Undefined property = drift error; null = thawed.ruleset-namerenamed tofreeze-property(defaultstaging_frozen) acrossrelease-freeze.yml,release-unfreeze.yml,release-pr.yml,notify-startup-failure.yml,notify-main-failure.yml,notify-pipeline-status/action.yml. EnvRULESET_NAMEbecameFREEZE_PROPERTY.Why
Pairs with mindsdb/terraform#202, which defines the
staging_frozenorg property and a single org rulesetstaging-freezetargeting repos where it is true. With the property as the switch, the seven repo rulesets go away and terraform owns the ruleset withoutignore_changes.Compatibility
ruleset-name, so they need no change, and all seven track the reusables at@main.administration: write; if the first freeze dispatch gets 403, addCustom properties: writeto the App.Order
Apply the terraform PR first (property and ruleset must exist), then merge this, then delete the seven repo rulesets.
🤖 Generated with Claude Code