-
Notifications
You must be signed in to change notification settings - Fork 410
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
[Bug]: v5.10.0 possibly breaking change - how to migrate the rjk
?
#2661
Comments
hi @EinfachHans, I thought this case was addressed in removing legacy repeatable jobs. So I opened a pr to fix it |
@roggervalf Thanks for the answer. For my understanding: What exactly will this pr do? Delete old format job's with So that it (when called as |
hi @EinfachHans,
Yes, I added few tests to validate it
it depends on the key that is passed, our script validates if it's the old format first, so it will try to delete old format. If your key is respecting the new format it will remove the new format records associated with that key |
## [5.10.1](v5.10.0...v5.10.1) (2024-07-18) ### Bug Fixes * **repeatable:** consider removing legacy repeatable job ([#2658](#2658)) fixes [#2661](#2661) ([a6764ae](a6764ae)) * **repeatable:** pass custom key as an args in addRepeatableJob to prevent CROSSSLOT issue ([#2662](#2662)) fixes [#2660](#2660) ([9d8f874](9d8f874))
@roggervalf To be honest i don't think that my problem is solved with this change. Ok i can now delete a entry via My problem is that after the upgrade to So let's break it down:
|
hi @EinfachHans,
I could reproduce this case, this is an issue that I'm fixing in #2665, so the intention is to keep the old repeatable jobs as they are. Only new repeatable jobs to have this new format.
Remove your old repeatable jobs and re-add them, it should be done after #2665 is merged |
@roggervalf Okay will test this behavior after #2665 is merged and released and let you know 😊 About the migration: This is the first time i have to do something like this will my bull jobs, what would you prefer to do exactly? I currently have in mind:
Would you consider this as the right way? |
hey @EinfachHans that sounds good and sorry for the issues, we were not expecting to affect old formats but only add the new format in new records |
@roggervalf hey again, just tested There is this entry added, which has in the name and all fields as i know them from before: Then there is also this entry added with the same name, but without the hash and with way less fields: Is this the indeed behaviour for the new format? |
oh ok I see what you meant now, the first is the hash of a delayed job generated by the repeatable job, the second image is the hash of the actual repeatable job. This is expected with the new format |
@roggervalf Thank you very much for your explanation and patience. Appreciate it!! 😊 |
@roggervalf Another problem: When i remove the job via |
thank you @EinfachHans I could reproduce it and fix it in v5.10.4 |
Version
5.10.0
Platform
NodeJS
What happened?
I really need some assistance/clarification about the change in
5.10.0
, because for me i think it is a breaking change?currently using
5.9.0
and dispatching events with a unique key and my pattern + timezone. I also set thename
to the same as the key.bullmq
then adds one entry into my redis, where the name is likebull:{{queue}}:repeat:{{key}}:{{someHash}}
. It also sets arjk
with the key set, followed by pattern and timezone in your old format.To be able to easily remove the job again i use the following logic:
bull:{{queue}}:repeat:{{key}}:*
and stripe the first part so that only the id's are leftgetJob
on the queue instanceremoveRepeatableByKey
with the rjk from the previously loaded jobNow i migrated to
5.10.0
What i experienced is:
rjk
now only is the key i put into, not added any pattern information. This is great, because it easily allows me to remove it by that keybullmq
seems to add two entries into the redis atm. One as before and one where the name has no hash added and with less information. Is this indeed? Because this doesn't match with my current delete implementation.But the main reason why i think this is an breaking change is that after a update i will have two kind ob jobs: Previous already existing job's where the
rjk
has the old format and the new one's. The new one'c can be easily removed with theremoveRepeatableByKey
, the old one's not.First i thought maybe an job will then have the new
rjk
format after it is processed once and the successor event is created but this seems not to be the case.I hope i described everything clear, if not, please let me know. Can you please help me out with this and how to handle this change in the implementation?
How to reproduce.
No response
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: