Repository navigation
ci: opt in to .asf.yaml rulesets staged rollout - #4604
Merged
Yicong-Huang merged 1 commit intoMay 1, 2026
Merged
Conversation
The Release Branch Protection ruleset added in apache#4582 is currently a no-op because asfyaml gates the rulesets directive behind the github_rulesets environment flag. Add the meta.environment opt-in so the existing ruleset is reconciled into GitHub.
aglinxinyuan
approved these changes
May 1, 2026
Yicong-Huang
enabled auto-merge (squash)
May 1, 2026 08:21
This was referenced May 1, 2026
yangzhang75
pushed a commit
to yangzhang75/texera
that referenced
this pull request
Jun 22, 2026
### What changes were proposed in this PR? Add a `meta:` block to `.asf.yaml` that opts the repository in to the staged rollout of the asfyaml `rulesets:` directive: ```yaml meta: environment: github_rulesets ``` Without this, the `Release Branch Protection` ruleset added in apache#4582 is silently skipped: the strictyaml schema accepts `rulesets:`, but `asfyaml/feature/github/rulesets.py` early-returns unless `github_rulesets` is in `environments_enabled`. ### Any related issues, documentation, discussions? - Closes apache#4603 - Follow-up to apache#4579 / apache#4582 (the ruleset config is already in `.asf.yaml`; this PR makes it actually run) - Verified the gap via the GitHub API: - `GET /repos/apache/texera/rulesets` → `[]` - `GET /repos/apache/texera/rules/branches/release/v1.1.0-incubating` → `[]` - Verified the gating in `apache/infrastructure-asfyaml` source: - Schema accepts `rulesets:` (`asfyaml/feature/github/__init__.py`) - Directive gated on `github_rulesets` env flag (`asfyaml/feature/github/rulesets.py`, commit `8d2ca2c2` — \"Gate rulesets directive behind github_rulesets environment for staged rollout\") - `meta.environment` is added to `environments_enabled` (`asfyaml/asfyaml.py`) ### How was this PR tested? - Diff is a 6-line addition to `.asf.yaml`; no code paths are exercised locally. - After merge, the expected outcome is that ASF Infra reconciles the existing `Release Branch Protection` ruleset into the repo. Verification plan post-merge: - `gh api repos/apache/texera/rulesets` should return one entry named `Release Branch Protection` - `gh api repos/apache/texera/rules/branches/release/v1.1.0-incubating` should list the required status checks and PR-review rule ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Opus 4.7
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 changes were proposed in this PR?
Add a
meta:block to.asf.yamlthat opts the repository in to the staged rollout of the asfyamlrulesets:directive:Without this, the
Release Branch Protectionruleset added in #4582 is silently skipped: the strictyaml schema acceptsrulesets:, butasfyaml/feature/github/rulesets.pyearly-returns unlessgithub_rulesetsis inenvironments_enabled.Any related issues, documentation, discussions?
.asf.yaml; this PR makes it actually run)GET /repos/apache/texera/rulesets→[]GET /repos/apache/texera/rules/branches/release/v1.1.0-incubating→[]apache/infrastructure-asfyamlsource:rulesets:(asfyaml/feature/github/__init__.py)github_rulesetsenv flag (asfyaml/feature/github/rulesets.py, commit8d2ca2c2— "Gate rulesets directive behind github_rulesets environment for staged rollout")meta.environmentis added toenvironments_enabled(asfyaml/asfyaml.py)How was this PR tested?
.asf.yaml; no code paths are exercised locally.Release Branch Protectionruleset into the repo. Verification plan post-merge:gh api repos/apache/texera/rulesetsshould return one entry namedRelease Branch Protectiongh api repos/apache/texera/rules/branches/release/v1.1.0-incubatingshould list the required status checks and PR-review ruleWas this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Opus 4.7