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

fix: while_executing should not invoke conflict strategy when the job was successfully executed. #806

Merged
merged 4 commits into from
Aug 28, 2023

Conversation

leandrogoe
Copy link

@leandrogoe leandrogoe commented Aug 19, 2023

Currently, the WhileExecuting lock only works properly if the middleware chain downstream returns a truthy value.

When a falsey value is returned, the on-conflict strategy is invoked, which shouldn't happen.

Originally reported here.

@leandrogoe leandrogoe changed the title fix:while_executing should not invoke conflict strategy when it was successfully executed. fix:while_executing should not invoke conflict strategy when the job was successfully executed. Aug 19, 2023
@leandrogoe leandrogoe changed the title fix:while_executing should not invoke conflict strategy when the job was successfully executed. fix: while_executing should not invoke conflict strategy when the job was successfully executed. Aug 19, 2023
@mhenrixon mhenrixon enabled auto-merge (squash) August 19, 2023 06:30
auto-merge was automatically disabled August 21, 2023 15:06

Head branch was pushed to by a user without write access

@mhenrixon mhenrixon enabled auto-merge (squash) August 27, 2023 06:58
auto-merge was automatically disabled August 28, 2023 14:50

Head branch was pushed to by a user without write access

@leandrogoe
Copy link
Author

There were some linting failures unrelated with the files I've touched, not sure why. I've corrected those as well now to make sure the pipeline passes.

@mhenrixon mhenrixon enabled auto-merge (squash) August 28, 2023 16:36
@mhenrixon mhenrixon merged commit 3e21885 into mhenrixon:v7.1 Aug 28, 2023
39 checks passed
@sfavrinlumint
Copy link

sfavrinlumint commented Sep 14, 2023

Hi @mhenrixon and @leandrogoe , was this fix supposed to go to the v7.1 branch? Because the bug is present in the current release 8.0.3 and this PR fixes it.

@leandrogoe
Copy link
Author

@sfavrinlumint I made it for the 7.1 because I was using 7.1.30 and hence needed a fix in that branch. Another PR will be needed for 8.X

@RobsonKing
Copy link

Are there plans to publish a release for this fix?

mhenrixon pushed a commit to cuzik/sidekiq-unique-jobs that referenced this pull request Nov 11, 2023
mhenrixon pushed a commit that referenced this pull request Nov 11, 2023
…ob was successfully executed [v8] (#810)

fix: following what #806 did to the 7.1
@srobaudo srobaudo deleted the loop_with_while_executing branch September 18, 2024 19:34
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.

5 participants