-
Notifications
You must be signed in to change notification settings - Fork 79
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
Support Sidekiq Pro super_fetch #178
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #178 +/- ##
=======================================
Coverage 98.94% 98.95%
=======================================
Files 18 18
Lines 380 381 +1
Branches 53 53
=======================================
+ Hits 376 377 +1
Misses 4 4 ☔ View full report in Codecov by Sentry. |
Co-authored-by: Alexey Zapparov <alexey@zapparov.com> Signed-off-by: Mauricio Novelo <mauricio.novelo@gmail.com>
dc53aff
to
c39ca9a
Compare
Co-authored-by: Alexey Zapparov <alexey@zapparov.com> Signed-off-by: Mauricio Novelo <mauricio.novelo@gmail.com>
This comment was marked as resolved.
This comment was marked as resolved.
After taking another look, I think there's a better way to exclude Sidekiq-Pro specs when it's not available. Let's add this change to diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index cb34b71..661327d 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -61,6 +61,9 @@ RSpec.configure do |config|
# metadata: `fit`, `fdescribe` and `fcontext`, respectively.
config.filter_run_when_matching :focus
+ # Skip tests that require Sidekiq-Pro
+ config.filter_run_excluding sidekiq_pro: true unless defined? Sidekiq::Pro
+
# Allows RSpec to persist some state between runs in order to support
# the `--only-failures` and `--next-failure` CLI options. We recommend
# you configure your source control system to ignore this file. Then RSpec.describe Sidekiq::Throttled::Patches::SuperFetch, :sidekiq_pro do
let(:base_queue) { "default" }
... So that spec suite will run only when Sidekiq-Pro is available, or when one runs it explicitly with: bundle exec rspec --tag sidekiq_pro |
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.
Looks good to me. @freemanoid please take another look.
@mnovelo I've added the above proposals (and a bit more) to a separate branch |
Can you please check if the updated instructions make sense and specs pass for you https://github.com/ixti/sidekiq-throttled/tree/sidekiq-pro-super-fetch - and if so - I will merge it |
Thanks! I was just wrapping them up and taking care of the Rubocop |
Oh. hm... I wonder why |
Just added a change that removes some redundant safe operators since |
I'm gonna squash merge this PR in a bit! |
sorry, one moment. Specs aren't passing now |
Oh.. Yeah. I'll wait. |
Make sure to |
Oh it's the 6.5 specs that are failing. I had it set to skip Sidekiq Pro < 7 since it uses a different config. For some reason, now they're running |
Weird fluke in my local environment. Now everything is back and passing 😖 Anyway, ready to merge! |
@ixti I applied this suggestion using the GitHub UI but it didn't get signed. Do you need me to fix that or does it not matter since you're gonna squash and merge? |
@mnovelo Yeah. Gonna squash merge it. So. don't worry about commits not being signed :D |
@mnovelo Thank you very much! I'm gonna cut 1.3.0 release. and in 2.0.0 sidekiq 6.x will be fully dropped, so I am not worried about it :D |
Released. Thank you very much to all who participated in this journey! ❤️ |
Distilling the discussions in this issue and the work in this fork, this adds support for Sidekiq Pro's super_fetch for v1 of sidekiq-throttled and v7.x of Sidekiq Pro.