-
Notifications
You must be signed in to change notification settings - Fork 368
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] delayed_sidekiq race condition #937
Conversation
e813b78
to
cf58036
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:wow: great!
please ping me once you are ready to merge. I'll release it |
Please fix rubocop issues, and something is odd with our specs and CI in general :/ |
Please take a look at your PR to see what's wrong. I created a separate PR to check CI and it seems to be working. #942 |
@skcc321 Please try rebasing on toptal/chewy master branch. |
9bb8bd7
to
a599453
Compare
Sorry for the delay, guys. |
a599453
to
f6e19b8
Compare
@@ -2,17 +2,18 @@ | |||
|
|||
if defined?(Sidekiq) | |||
require 'sidekiq/testing' | |||
require 'mock_redis' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need mock_redis gem after that?
Since you've started using real redis in specs, you have to redis service, smth like and provide proper env variables for sidekiq/redis depending how you want to test it. jobs:
ruby-3:
services:
redis:
# Docker Hub image
image: redis
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5 |
f6e19b8
to
d3f3081
Compare
done. let's try again the CI run. |
@skcc321 still failing :/ |
OK, I'll take a look tonight. |
649dc08
to
c07d05a
Compare
@konalegi one more attempt please |
c07d05a
to
7b546c1
Compare
7b546c1
to
784fe38
Compare
@konalegi looks like two failed checks are not related to the changes I made. |
@konalegi one of them has passed. Could you restart the last one? |
Great, merging! |
In the PR I'm addressing two issues with
delayed_sidekiq
strategy.I eliminated it using Lua script and making the combination of operations atomic.
Before submitting the PR make sure the following are checked:
[Fix #issue-number]
(if the related issue exists).master
(if not - rebase it).