Repository navigation
[trymerge] Wait, bounded, for a failed job's classification that is still on the way - #203462
izaitsevfb wants to merge 4 commits into
Conversation
PR Status: Approved 🚀Please fix all CI failures and trigger merge by commenting "@pytorchbot merge". ✅ AUTOMATED REVIEW - Ready for human review:
Findings (2): Reviewed commit: 🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/203462
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New Failure, 1 Cancelled Job, 1 Unrelated FailureAs of commit a3b9ea6 with merge base cb61663 ( 🟡 GREEN LIGHT - OUTDATED (earlier commit) - PR requires human review:
reason: NEW FAILURE - The following job has failed:
NEW FAILURES SUPPRESSED BY AI (non-blocking) - The following job failed, but the AI CI Advisor judged the failure not to be evidence against this change:
CANCELLED JOB - The following job was cancelled. Please retry:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
373af48 to
ce324bf
Compare
ce324bf to
3a2bebd
Compare
3a2bebd to
1d257ae
Compare
|
✴️ iz2: I've answered the blocking finding in its thread and narrowed the description. Here are replies to the non-blocking findings. Requesting a re-review.
|
1d257ae to
cbf36c3
Compare
cbf36c3 to
cbc5704
Compare
|
✴️ iz2: I replied in the round-6 threads: one pushback on the zero-retry finding and an explanation of the URL filter. The stack test was added in cbc5704. |
cbc5704 to
4f88b94
Compare
4f88b94 to
508c621
Compare
|
✴️ iz2: I replied in the round-8 threads. None of the three needs a code change: the near-deadline case behaves like main, and the other two are test-shape requests. |
Withdrawn: the automated review of a3b9ea6 found nothing blocking.
|
✴️ iz2: @jeanschmidt, every point from your review is now addressed. The head is a3b9ea6, CI is green, and the latest automated review finds nothing blocking.
I also dropped the Not in this PR: the two items you marked as reasonable follow-ups, the merge record listing a waiting failure under |
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: 2 mandatory check(s) failed. The first few are:
Dig deeper by viewing the failures on hud |
|
✴️ iz2: restarting the merge. Its only failures are Lint / Test collect_env on the old runner image (no Python 3.8 on Ubuntu 26.04, fixed on main by #203982; this PR doesn't touch lint.yml) and that job's cancelled sibling. |
Merge startedYour change will be merged while ignoring the following 2 checks: Lint / Test collect_env (older_python_version, linux.24_04.4x), Lint / Test collect_env (with_torch, linux.24_04.4x) Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: 1 jobs have failed, first few of them are: trunk / win-vs2022-cpu-py3 / test (default, 4, 12, windows.4xlarge.nonephemeral) Details for Dev Infra teamRaised by workflow job |
|
✴️ iz2: restarting the merge again. The new failure is a Windows CPU test shard ( |
Merge startedYour change will be merged while ignoring the following 3 checks: Lint / Test collect_env (older_python_version, linux.24_04.4x), Lint / Test collect_env (with_torch, linux.24_04.4x), trunk / win-vs2022-cpu-py3 / test (default, 4, 12, windows.4xlarge.nonephemeral) Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
…p PR (#205625) ✴️ iz2: `merge_into` runs `check_stacked_pr_merge_rule` on each lower stacked PR, but no test checked that it forwards `skip_mandatory_checks` and `skip_internal_checks`. Hardcoding either to `False` in that loop left `test_trymerge.py` green. The `-i` waivers in the same call were already covered by `test_gates_lower_prs_before_landing`. This adds `test_lower_prs_skip_the_same_checks_as_the_top_pr`, which sets each flag alone and both together, and checks the internal-skip answer comes from the top PR's merge comment. It also rewords the docstring of `test_merge_ghstack_into_gates_lower_prs_with_the_waivers`: that test covers `merge_ghstack_into`'s own gate, which production skips (every caller passes `skip_all_rule_checks=True` since #203462). Follow-up to #203140's review. Test-only. Test plan: `python -m unittest test_trymerge`: the new test passes; it fails with either flag hardcoded to `False` in `merge_into`'s loop, with the two flags swapped, with the internal skip dropped only when both are set, or with `can_skip_internal_checks` called per lower PR. lintrunner (FLAKE8, PYFMT) clean. Pull Request resolved: #205625 Approved by: https://github.com/pytorchgreenlight, https://github.com/jeanschmidt
✴️ iz2: opened for @izaitsevfb, who asked for this change.
A merge fails on the first loop iteration that sees a failed job outside Dr.CI's ignorable categories, even when Dr.CI is about to classify it:
With this change,
merge()counts a failed GitHub Actions job as pending, for up to 15 minutes per job, while either:AI_PENDING([Dr.CI] Tell the merge bot which failures await an AI verdict (AI_PENDING) test-infra#9332): a verdict that may clear it is on the way.As soon as the job is classified, or after 15 minutes, it is handled as today. Waiting clears nothing; only Dr.CI's existing categories do. Check names in the merge record are unchanged. For the PR being merged, and for a stacked PR's mandatory checks, the retry and reject messages say a job is waiting on its classification, and a failure message says when the merge waited on a job that still blocks it. A stacked PR's other failed or pending jobs keep today's messages.
Scope:
FAILUREconclusions of GitHub Actions jobs. App check runs such as EasyCLA never wait.{}for a repo it has no data for. Once open, a wait survives a failed or empty Dr.CI call until its 15 minutes run out.merge(), including the lower PRs of ghstack and native stacks. Other callers ofget_classifications/find_matching_merge_rulepass no window and skip the wait logic entirely.merge_intonow runs a ghstack stack's lower-PR rule checks before the GreenLight check, as it already did for native stacks. Whether a lower PR's human approvals suffice without GreenLight's can depend on its CI, and that answer is cached for the merge, so it is asked only once the PR's own checks pass; a waiting job retries first. Lower ghstack PRs are now checked against the clone's rules file before it is reset to trunk, as the top PR already was.Cost: a merge whose failure is real reports later if Dr.CI hasn't listed the job or its verdict comes back
related: at most about 20 minutes, since the 15-minute budget is checked on 5-minute retries. Usually that is one or two retries, since the advisor's p95 is 6 minutes from dispatch.Known limits:
Test plan:
python -m unittest test_trymerge, with newTestClassificationWaittests: the matchers (including a malformedAI_PENDINGlist and checks that are not Actions jobs), precedence over arrived classifications and-i, the realfind_matching_merge_rulewith a waiting and an expired mandatory job, a wait surviving a failed Dr.CI call, one window shared by a stack, andmerge()(on a clock its sleeps advance) looping until the job is classified or the budget runs out, with the failure note only for jobs it slept on, plus a test that a waiting lower ghstack PR retries before the GreenLight check is asked. Removing any window hand-off, wait condition, waiting reason or expiry note fails a test. The full suite passes (274 tests).