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

Add pre-flight check for pending jobs before running upgrade #8707

Closed
NateWr opened this issue Mar 1, 2023 · 1 comment
Closed

Add pre-flight check for pending jobs before running upgrade #8707

NateWr opened this issue Mar 1, 2023 · 1 comment
Assignees
Milestone

Comments

@NateWr
Copy link
Contributor

NateWr commented Mar 1, 2023

Describe the problem
When running an upgrade, we may run into odd bugs if there are pending jobs. Consider the following scenario:

  1. My 3.4 install has 10 pending jobs, MyExampleJob, in the queue.
  2. I run an upgrade to 3.5.
  3. The code in 3.5 has changed in some way that means MyExampleJob no longer exists in the code base.
  4. The job runner tries to run one of the pending jobs, MyExampleJob, and fails.

Describe the solution you would like to see
Add a pre-flight check to the upgrade process that detects pending jobs and tells the upgrader to run them on the old code base before upgrading.

Additional information
Comment form @touhidurabir:

Not just a case when a job class got removed , but for an existing one when the object data changed as a result the store serialized payload unable to satisfy the current structure so the job will continue to fail after upgrade . This will have high impact for important jobs

This will first become a problem with 3.5, because that will be the first version when a pending job from an older version may be in the queue.

@touhidurabir
Copy link
Member

Closing this in favour of Add unit test for each queue jobs class which seems to be more of an appropriate and better approach. More detail reasoning and discussion at Right approach to handle pending queue jobs at upgrade which lead to this decision .

@touhidurabir touhidurabir closed this as not planned Won't fix, can't repro, duplicate, stale Apr 19, 2024
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

No branches or pull requests

3 participants