justinpakzad commented on PR #76267: URL: https://github.com/apache/airflow/pull/76267#issuecomment-6889589271
> Thanks - the rules for `needs:` and status functions match how GitHub skips jobs. I rebased the branch on `main` and pushed a fixup ([a2530df](https://github.com/apache/airflow/commit/a2530df566d68b0de3065282f25b8b180cb6954e)) instead of asking for another round: > > * Rebased on `main`: the branch was 389 commits behind, and `main` has since gained a scheduled job (`trigger-upgrade-check` in `mirror-hardened-base-images.yml`, from #76225) that the hook reported although it skips in forks: its condition starts with `!cancelled()` but also requires the guarded `build-info` to succeed. > * `scripts/ci/prek/check_scheduled_workflows_skip_forks.py`: a job whose condition uses `always()`, `cancelled()` or `failure()` now passes when the condition also requires a covered job it needs to succeed (`needs.<job>.result == 'success'`). The hook passes on every workflow on current `main`. > * `scripts/tests/ci/prek/test_check_scheduled_workflows_skip_forks.py`: three cases for that shape - a required covered parent, a required uncovered parent, and a required job the job does not need. > * The module docstring no longer says `ci-arm.yml` runs in forks on push: it has only `schedule` and `workflow_dispatch`, and both exempt workflows rely on `check-run-needed` to skip scheduled runs in forks. > > As the change touches CI files, I also added `use project ci` so project CI verifies it. Appreciate the review as always. Thanks for pushing the fixup as well! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
