Skip to content

test: pin the queue run timeout's comment and run limit more tightly - #1070

Merged
tomastola merged 1 commit into
mainfrom
ci/queue-run-timeout-test-pins
Nov 17, 2026
Merged

tomastola merged 1 commit into
mainfrom
ci/queue-run-timeout-test-pins

Conversation

@tomastola

Copy link
Copy Markdown
Collaborator

What

Tighten two assertions in the_queue_run_timeout_covers_the_wait_and_run_limits_the_doc_gives, as juhovainio asked on #1011 (threads on workflow_contract.rs):

  • the doc must give the run limit in hours next to its seconds (3 h (10800 s), as the wait limit already is;
  • the workflow comment's last lines are pinned exactly, right above timeout-minutes: the 30 min, the margin and the total. The margin is derived from timeout-minutes less the two limits and 30 min, so it cannot drift from the number.

Test only; no workflow or doc change.

Test

cargo test -p xtask workflow_contract passes (158 tests). Checked that the test fails with the comment's margin set to 15 min, and with the doc's "3 h" changed to "4 h".

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor
Security scan found no critical or high findings on lines changed by this pull request

View the security scan run for complete reports.

“New” means the finding is located in a changed file on an added or modified line; it is not a base-versus-head findings delta.

Follow-up to #1011 review. The contract test now also requires the doc to
give the run limit in hours next to its seconds (3 h (10800 s), and ties the
workflow comment to timeout-minutes exactly: the 30 min, a margin derived
from timeout-minutes less the two limits and 30 min, and the total, in the
lines right above the timeout-minutes line.

Signed-off-by: Tomas Saaristola <tsaarist@amd.com>
@tomastola
tomastola force-pushed the ci/queue-run-timeout-test-pins branch from 36712de to 4161d84 Compare November 17, 2026 10:36
@tomastola
tomastola marked this pull request as ready for review November 17, 2026 13:04
@tomastola
tomastola requested a review from a team as a code owner November 17, 2026 13:04
@tomastola

Copy link
Copy Markdown
Collaborator Author

Rebased onto current main (head 4161d84). E2E tests (MI300X, current) is still queued behind the runner backlog; the earlier MI300X failure was on the pre-#1064 head. Marking ready for review while that lane runs.

@juhovainio juhovainio left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. This is a test-only change in xtask/src/workflow_contract.rs and it matches the PR description: the run limit is now asserted in hours, the tail of the workflow comment is pinned exactly, and the margin is derived from timeout-minutes. I didn't find any issues.

One optional note: the exact-text pin of the workflow comment assumes 4-space indentation and LF line endings, so a CRLF checkout of the workflow file would fail it (the other assertions are substring checks and wouldn't). Not worth blocking on.

This reflects a read of the diff only; I did not build or re-run the tests.

@juhovainio juhovainio left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent re-review of the current head (4161d84), test-only change to xtask/src/workflow_contract.rs.

Verified by hand and with two independent passes:

  • The new run-limit assertion (flat.contains("{run_text} ({run_secs} s")) matches docs/nightly-on-the-queue.md's "...run for up to 3 h (10800 s..." exactly.
  • The exact-text pin of the workflow comment's last three lines (the 30-min line, the margin line, timeout-minutes:) matches .github/workflows/queue-run.yml byte-for-byte, including its 4-space indentation (confirmed with cat -A).
  • margin_minutes = timeout_minutes - (wait_secs+run_secs)/60 - 30 cannot underflow: the pre-existing timeout_minutes*60 >= wait_secs+run_secs+30*60 assertion and the new (wait_secs+run_secs) % 60 == 0 assertion both run first and together guarantee the subtraction stays non-negative.
  • With the current numbers (wait 15000 s, run 10800 s, timeout 480 min) the derived margin is 20, matching the comment's literal "20 min are margin" — so the test is not a tautology, it's actually pinned to real content.
  • PR description accurately scopes the change (test-only, no workflow/doc edit) and matches the diff (single file, 21/-3).

I agree with juhovainio's existing approval and its one optional note (the exact-text pin assumes LF + 4-space indentation, so a CRLF checkout would fail it while the other, substring-only assertions wouldn't) — still accurate at this head, not blocking.

One tiny, non-blocking observation of my own: the new run-limit check is strictly stronger than the pre-existing separate ({run_secs} s check just above it, which is now redundant; the wait-limit assertions a few lines up weren't given the same combined-string tightening, so the two limits end up checked with slightly asymmetric strictness. Not a defect and not worth a follow-up on its own.

CI is green on the current head (build/test/clippy/lint/security scans/E2E all passing); the one non-completed job, E2E tests (MI300X, current), is queued behind the self-hosted runner backlog per the author's own comment and isn't a required-check failure.

No blocking findings.

🤖 Automated by an AI agent

@tomastola
tomastola added this pull request to the merge queue Nov 17, 2026
Merged via the queue into main with commit 3209459 Nov 17, 2026
57 checks passed
@tomastola
tomastola deleted the ci/queue-run-timeout-test-pins branch November 17, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants