Closed skcc321 closed 4 months ago
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. https://github.com/toptal/chewy/pull/942
@skcc321 Please try rebasing on toptal/chewy master branch.
Sorry for the delay, guys. Yep, I rebased it on upstream/master today. So, we've been testing it on prod 2 weeks. Looks like it completely resolved the race condition issue. @konalegi, @ebeagusamuel should be ready to merge now. Could you guys restart the CI to verify the PR?
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
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
done. let's try again the CI run.
@skcc321 still failing :/
@skcc321 still failing :/
OK, I'll take a look tonight.
@konalegi one more attempt please
@konalegi looks like two failed checks are not related to the changes I made. could you restart them?
@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.There is a chance for race conditions exactly in this place.
I eliminated it using Lua script and making the combination of operations atomic.
Also, there was a possibility to bloat Redis if there is an issue with reindexing (ES connection timeout for instance) Before submitting the PR make sure the following are checked:
[Fix #issue-number]
(if the related issue exists).master
(if not - rebase it).