Skip to content

Stop reprocessing jobs that can never progress, and skip resets that … - #465

Merged
tomrittervg merged 2 commits into
masterfrom
2026-11-13-tjr-dead-jobs
Nov 13, 2026
Merged

tomrittervg merged 2 commits into
masterfrom
2026-11-13-tjr-dead-jobs

Conversation

@tomrittervg

Copy link
Copy Markdown
Collaborator

…do nothing.

Every run looked at ~49 old jobs with closed bugs, ~24 minutes of a run that was getting close to its 75 minute limit. They were jobs with the obsolete RELINQUISHED status, which we log and skip, and jobs whose try pushes Treeherder no longer has results for. Mark both done once their bug is closed (the try ones only when over a week old, since a new push has no results for a few minutes). And after each job we reset the checkout, ~20 seconds, even when the job never touched it; skip that when it's clean and still at the push's revision.

…do nothing.

Every run looked at ~49 old jobs with closed bugs, ~24 minutes of a run
that was getting close to its 75 minute limit. They were jobs with the
obsolete RELINQUISHED status, which we log and skip, and jobs whose try
pushes Treeherder no longer has results for. Mark both done once their
bug is closed (the try ones only when over a week old, since a new push
has no results for a few minutes). And after each job we reset the
checkout, ~20 seconds, even when the job never touched it; skip that
when it's clean and still at the push's revision.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Removed Treeherder pushes raise before the age/closed-bug cleanup, leaving old jobs with closed bugs retrying instead of being cleaned up.

1 open issue
What changed in this PR

This PR reduces wasted work in the vendoring runner by retiring stalled jobs with closed bugs and avoiding unnecessary checkout resets.

Changes:

  • Mark obsolete-status jobs and qualifying old jobs without try results as done when their bugs are closed.
  • Skip full resets when the checkout is clean and already at the expected revision.
  • Add regression tests and update the existing-job workflow diagrams.
File Description
tests/​dead_jobs.py Tests job retirement conditions and checkout reset behavior.
test.py Registers the new regression test suite.
tasktypes/​vendoring.py Adds stalled-job cleanup and a clean-checkout reset shortcut.
docs/​existing_job.md Documents the new job retirement paths.

Review effort: Balanced

Comment thread tasktypes/vendoring.py Resolved
Treeherder eventually deletes old pushes, and then get_job_details
raised, after retrying, out of processing the library, so the job was
never cleaned up and the library's new versions weren't processed. A
missing push now raises TryPushNotFoundError, which isn't retried, and
is handled as a push with no jobs. Push health is only requested once
the jobs are complete, since it's never needed before.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are recorded for the vendoring job retirement and checkout-reset changes.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@tomrittervg
tomrittervg merged commit 6d3c160 into master Nov 13, 2026
12 checks passed
@tomrittervg
tomrittervg deleted the 2026-11-13-tjr-dead-jobs branch November 13, 2026 14:17
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