[CI] Add ruleset JSON requiring lint-done on protected branches#3690
Open
[CI] Add ruleset JSON requiring lint-done on protected branches#3690
Conversation
Adds .github/rulesets/lint-required.json so the configuration that gates
merges into main / nightly / release/* on the lint-done aggregator from
.github/workflows/lint.yml is reviewable and reproducible.
Note: GitHub does not auto-apply files under .github/rulesets/. The JSON
is applied via:
gh api -X POST repos/pytorch/rl/rulesets \
--input .github/rulesets/lint-required.json
See .github/rulesets/README.md for usage.
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/rl/3690
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 1 New FailureAs of commit 0317813 with merge base adbf3d8 ( NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Contributor
|
| Name | Max | Mean | Ops | Ops on Repo HEAD
|
Change |
|---|---|---|---|---|---|
| test_prioritized_sampler_sample_scale[1000000-cpu] | 10.8555ms | 10.3074ms | 97.0176 Ops/s | 97.0176 Ops/s | |
| test_prioritized_sampler_sample_scale[10000000-cpu] | 19.6160ms | 19.2716ms | 51.8899 Ops/s | 51.8899 Ops/s |
Contributor
|
| Name | Max | Mean | Ops | Ops on Repo HEAD
|
Change |
|---|---|---|---|---|---|
| test_prioritized_sampler_sample_scale[1000000-cuda] | 0.6937ms | 0.4343ms | 2.3026 KOps/s | 2.3026 KOps/s | |
| test_prioritized_sampler_sample_scale[10000000-cuda] | 0.9613ms | 0.9165ms | 1.0911 KOps/s | 1.0911 KOps/s |
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.
Summary
.github/rulesets/lint-required.jsondescribing a branch ruleset that requires thelint-doneaggregator (from.github/workflows/lint.yml) and the existingMeta CLA Checkbefore merges intomain/nightly/release/*..github/rulesets/README.mddocumenting how to apply / update / delete rulesets viagh api.Why
There is currently nothing on the GitHub side that blocks merges when lint is red. The lint workflow runs and reports a red
lint-donecheck, but:GET /repos/pytorch/rl/branches/main/protectionreturns 404 (no classic branch protection onmain).Meta CLA Enforcement, which isenforcement: "evaluate"(audit-only) and only requiresMeta CLA Check.So PRs with failing lint are mergeable today. This PR commits the source-of-truth JSON for an
enforcement: activeruleset that fixes that.Note: this PR does not by itself enforce anything
GitHub does not auto-apply files under
.github/rulesets/. The JSON has to be POSTed via the API:gh api -X POST repos/pytorch/rl/rulesets \ --input .github/rulesets/lint-required.jsonThat
gh apicall is what flips the switch. The merge order between this PR and the API call doesn't matter — running the API call before merging is actually a nice live test that the new ruleset is wired up correctly.Deliberate non-goals
tests-cpu …,tests-gpu …, etc.). Lint only, for now — easy follow-up to add more required contexts.pull_requestrule (PR-required-before-merge) ornon_fast_forwardrule. Push behavior is unchanged.Meta CLA Enforcementruleset.Test plan
gh api -X POST repos/pytorch/rl/rulesets --input .github/rulesets/lint-required.jsonand verify withgh api repos/pytorch/rl/rulesetsthat the new ruleset appears withenforcement: "active".lint-doneis now blocked from merging (this very PR is a candidate, since it should pass lint).