Skip to content

landing_job: do not pickup handover jobs in all workers (bug 2019420) - #949

Closed
zzzeid wants to merge 2 commits into
mainfrom
zeid/bug-2019420-handover-job-fix
Closed

zzzeid wants to merge 2 commits into
mainfrom
zeid/bug-2019420-handover-job-fix

Conversation

@zzzeid

@zzzeid zzzeid commented Feb 25, 2026

Copy link
Copy Markdown
Contributor
  • add get_next_job method to jobs
  • include all repositories associated with workers in landing job query
  • throttle worker when next job is DEFERRED

@github-actions

Copy link
Copy Markdown

View this pull request in Lando to land it once approved.

@zzzeid
zzzeid force-pushed the zeid/bug-2019420-handover-job-fix branch 2 times, most recently from 5adb76f to 1bed162 Compare February 26, 2026 19:24
@zzzeid
zzzeid marked this pull request as ready for review February 26, 2026 19:24
@zzzeid
zzzeid requested a review from a team as a code owner February 26, 2026 19:24

@shtrom shtrom left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm, w/ potential nit

Comment thread src/lando/api/tests/test_landings.py Outdated
@zzzeid
zzzeid force-pushed the zeid/bug-2019420-handover-job-fix branch 3 times, most recently from 894f7b6 to 722e616 Compare March 4, 2026 19:56
@zzzeid
zzzeid force-pushed the zeid/bug-2019420-handover-job-fix branch from 722e616 to 4528dd3 Compare March 4, 2026 20:03
Comment thread src/lando/main/models/landing_job.py
@zzzeid
zzzeid requested a review from shtrom March 4, 2026 21:09

@shtrom shtrom left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think the DEFERRED throttling as it is will block further processing of DEFERRED jobs.

Comment thread src/lando/api/legacy/workers/base.py Outdated
"""Return the next job in the queue from all enabled repositories."""
# NOTE: This could include DEFERRED jobs that were deferred due to a
# closed tree.
return self.job_type.next_job(repositories=self.enabled_repos).first()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It might also be worth adding a note that we want to pick up jobs with closed trees so that we can process non-landing jobs, e.g., handover jobs, without delay, and that the TreeStatus check for will continue deferring the others.

@shtrom shtrom left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. nit: It would be nice to have a test for reprocessing of deferred jobs (: -> https://bugzilla.mozilla.org/show_bug.cgi?id=2021883

@zzzeid

zzzeid commented Mar 10, 2026

Copy link
Copy Markdown
Contributor Author

LGTM. nit: It would be nice to have a test for reprocessing of deferred jobs (: -> https://bugzilla.mozilla.org/show_bug.cgi?id=2021883

Yep. I want to add the test in bug 2021833 before pushing this test, as a regression test. Will have that up today.

@zzzeid
zzzeid marked this pull request as draft March 13, 2026 15:50
@zzzeid zzzeid closed this Apr 15, 2026
@zzzeid

zzzeid commented Apr 15, 2026

Copy link
Copy Markdown
Contributor Author

This PR is no longer needed.

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