Repository navigation
Commit 5a44905
authored
dev: include ASF status checks in the local lint suite (#25313)
## Which issue does this PR close?
- Part of #21048. The issue stays open for the other checklist items.
## Rationale for this change
`.asf.yaml` lists the GitHub Actions jobs that must pass before a PR can
merge. If a job is renamed and `.asf.yaml` still requires the old name,
PRs wait for a status that never arrives. CI runs
`ci/scripts/check_asf_yaml_status_checks.py` in `dev.yml` to catch this,
but `dev/rust_lint.sh` does not. A contributor can pass the local lint
suite and then see the failure only in CI. This PR adds the existing
validator to the local suite.
## What changes are included in this PR?
- `dev/rust_lint.sh` runs `ci/scripts/check_asf_yaml_status_checks.py`
as a read-only step, after the workflow install check and before the
Markdown link check. The `--write` and `--allow-dirty` flags never reach
it.
- The runner needs `python3` on `PATH` with PyYAML installed. It checks
both after argument parsing and before any tool install or formatter,
and it reports a distinct error for each missing prerequisite. It does
not install Python packages. Help output does not run these checks.
- `ci/scripts/check_asf_yaml_status_checks.py` becomes executable,
because the runner invokes each registered script directly. The script
body, `.asf.yaml`, and the GitHub workflow do not change.
- `docs/source/contributor-guide/testing.md` documents the purpose of
the check, the Python setup, the standalone command, and the local lint
integration.
## What is the testing strategy for this PR?
- The real validator passes on this branch through `python3
ci/scripts/check_asf_yaml_status_checks.py` and through direct
invocation, with Python 3.14.7 and PyYAML 6.0.3.
- Disposable configurations exercised the real validator. A valid
configuration passes. A required name with no matching job fails with
the existing diagnostic. A name served only by a path-filtered workflow
fails, and an added unfiltered workflow makes it pass.
- A disposable fixture with stubbed steps and tools exercised the
runner. The validator runs once with no arguments in check mode and in
both write modes. A missing `python3` and a missing PyYAML each stop the
suite with their own error before any tool install or formatter. Help
output skips the checks. A validator failure stops the later steps.
- A disposable clone with a bogus required name in `.asf.yaml`:
`./dev/rust_lint.sh` fails with the validator diagnostic before the link
check, and passes again after the file is restored.
- The full `./dev/rust_lint.sh` passes on this branch.
## Are there any user-facing changes?
No. The local lint suite gains the check and needs Python 3 with PyYAML.
CI is unchanged.
🤖 Generated with [Claude Code](https://claude.com/claude-code)1 parent 62dc7ac commit 5a44905
3 files changed
Lines changed: 37 additions & 0 deletions
File tree
- ci/scripts
- dev
- docs/source/contributor-guide
File mode changed.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
91 | 108 | | |
92 | 109 | | |
93 | 110 | | |
| |||
114 | 131 | | |
115 | 132 | | |
116 | 133 | | |
| 134 | + | |
117 | 135 | | |
118 | 136 | | |
119 | 137 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
223 | 242 | | |
224 | 243 | | |
225 | 244 | | |
| |||
0 commit comments