Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[21.05] Fix double enqueuing of upload jobs #12763

Merged

Conversation

mvdbeek
Copy link
Member

@mvdbeek mvdbeek commented Oct 21, 2021

The canonical place to call enqueue is in

tool.app.job_manager.enqueue(job, tool=tool, flush=False)
.
In the process of enqueue the db-skip-locked assignment method will set
the handler name to the default tag. If you do this more than once the
job might be picked up by compatible handlers (more than once).

Fixes #11335

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

@github-actions github-actions bot added this to the 21.09 milestone Oct 21, 2021
Copy link
Member

@natefoo natefoo left a comment

Choose a reason for hiding this comment

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

Fantastic catch, thank you!

@mvdbeek mvdbeek force-pushed the fix_job_double_scheduling branch 3 times, most recently from e1809af to 76b7243 Compare October 22, 2021 14:34
The canonical place to call enqueue is in
https://github.com/galaxyproject/galaxy/blob/a5bb3e92667b96ef802b378f17788b253a5c0bc6/lib/galaxy/tools/execute.py#L127.
In the process of enqueue the db-skip-locked assignment method will set
the handler name to the default tag. If you do this more than once the
job might be picked up by compatible handlers.

Fixes galaxyproject#11335
@natefoo natefoo merged commit 947d7cf into galaxyproject:release_21.05 Oct 22, 2021
@mvdbeek
Copy link
Member Author

mvdbeek commented Oct 22, 2021

Thanks! I will merge this forward via PR, there will be conflicts.

@natefoo
Copy link
Member

natefoo commented Oct 22, 2021

Even better, thanks!

innovate-invent pushed a commit to brinkmanlab/galaxy-container that referenced this pull request Oct 28, 2021
Was transaction isolation in an attempt to deal with galaxyproject/galaxy#12763
innovate-invent pushed a commit to brinkmanlab/galaxy-container that referenced this pull request Oct 28, 2021
A bug caused job-handlers to automatically attach as workflow handlers. This was fixed in galaxyproject/galaxy#12763
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants