-
Notifications
You must be signed in to change notification settings - Fork 74
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
THREESCALE-10180: Bump sidekiq from 6.4.2 to 7.1.5 #3576
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,8 +19,8 @@ gem 'rails', '~> 6.0' | |
# Also, upgrading makes this test fail: SendUserInvitationWorkerTest#test_handles_errors | ||
gem 'mail', '~> 2.7.1' | ||
|
||
gem "activejob-uniqueness" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you please also swap it with the next line? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done! |
||
# Needed for XML serialization of ActiveRecord::Base | ||
gem "activejob-uniqueness", github: "3scale/activejob-uniqueness", branch: "main" | ||
gem 'activemodel-serializers-xml' | ||
|
||
gem 'protected_attributes_continued', '~> 1.8.2' | ||
|
@@ -51,11 +51,11 @@ gem '3scale_time_range', '0.0.6' | |
gem 'statsd-ruby', require: false | ||
|
||
# Sidekiq | ||
gem 'sidekiq', '~> 6.4.0', require: %w[sidekiq sidekiq/web] | ||
gem 'sidekiq-batch' | ||
gem 'sidekiq', '~> 7', require: %w[sidekiq sidekiq/web] | ||
gem 'sidekiq-batch', github: '3scale/sidekiq-batch', branch: 'redis-client' | ||
akostadinov marked this conversation as resolved.
Show resolved
Hide resolved
|
||
gem 'sidekiq-cron', require: %w[sidekiq/cron sidekiq/cron/web] | ||
gem 'sidekiq-lock' | ||
gem 'sidekiq-throttled' | ||
gem 'sidekiq-throttled', '~> 1.0.0.alpha.1' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not especially happy using an alpha but it's the only available version supporting Sidekiq 7 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In rubygems most releases are alpha anyway... |
||
|
||
gem 'sidekiq-prometheus-exporter' | ||
|
||
|
@@ -75,7 +75,7 @@ gem 'formtastic', '~> 4.0' | |
gem 'htmlentities', '~>4.3', '>= 4.3.4' | ||
# TODO: Not actively maintained https://github.com/activeadmin/inherited_resources#notice replace with respond_with and fix things the rails way | ||
gem 'inherited_resources', '~> 1.12.0' | ||
gem 'json', '~> 2.3.0' | ||
gem 'json', '~> 2.3' | ||
|
||
gem 'mysql2', '~> 0.5.3' | ||
|
||
|
@@ -94,7 +94,7 @@ gem 'acts-as-taggable-on', '~> 8.0' | |
gem 'baby_squeel', '~> 1.4.3' | ||
gem 'browser' | ||
gem 'diff-lcs', '~> 1.2' | ||
gem 'hiredis', '~> 0.6.3' | ||
gem 'hiredis-client' | ||
gem 'httpclient', github: '3scale/httpclient', branch: 'ssl-env-cert' | ||
gem 'json-schema', git: 'https://github.com/3scale/json-schema.git' | ||
gem 'local-fastimage_resize', '~> 3.4.0', require: 'fastimage/resize' | ||
|
@@ -107,7 +107,7 @@ gem 'ratelimit' | |
gem 'recaptcha', '4.13.1', require: 'recaptcha/rails' | ||
gem 'redcarpet', '~>3.5.1', require: false | ||
gem 'RedCloth', '~>4.3', require: false | ||
gem 'redis', '~> 4.2.0', require: ['redis', 'redis/connection/hiredis'] | ||
gem 'redis', require: ['redis'] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, I actually misread it 😬 I thought this was for the new So, we have two gems: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm wondering, what if we use I guess the configs are compatible, so this will be more or less changing this line only? https://github.com/3scale/porta/blob/dependabot/bundler/sidekiq-7.1.5/app/lib/system/redis_pool.rb#L13 (and a couple of more) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All the Redis gems ecosystem is highly confusing, since all gems have basically the same name 😵💫. I'll try to summarize it:
So before updating
And now:
Kind of, porta uses
Because it doesn't support TLS (redis/hiredis-rb#58)
Porta uses There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OMG, this is extremely confusing indeed 😵💫 |
||
gem 'rest-client', '~> 2.0.2' | ||
gem 'rubyzip', '~>1.3.0', require: false | ||
gem 'svg-graph', require: false | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -139,7 +139,7 @@ def on_complete(_bid, options) | |
# The number of retries is usually controlled at the origin of the failure using ThreeScale::SidekiqRetrySupport::Worker#last_attempt?, | ||
# but in this case we are not really using Sidekiq retries, but rather re-enqueueing the job manually here | ||
manual_retry_count = options['manual_retry_count'].to_i + 1 | ||
perform_async(event.event_id, event.data, manual_retry_count) | ||
perform_async(event.event_id, event.data.to_json, manual_retry_count) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed a parameter not being sent as string to Redis. I wonder why this haven't reported errors to Bugsnag in production, as it's deprecated since Redis 6.4 |
||
end | ||
|
||
delegate :perform_async, to: :class | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
base: &default | ||
url: "<%= ENV.fetch('BACKEND_REDIS_URL', 'redis://localhost:6379/6') %>" | ||
timeout: <%= ENV.fetch('BACKEND_REDIS_TIMEOUT', 1) %> | ||
pool_size: <%= ENV.fetch('RAILS_MAX_THREADS', 5) %> | ||
size: <%= ENV.fetch('RAILS_MAX_THREADS', 5) %> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just a reminder, did you create a PR for SaaS with this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, but I think we don't need it just now, because it's backwards compatible: https://github.com/3scale/porta/pull/3576/files#diff-ad73aa14ad3c1b2d53ac0808de8bbf07f16747d251bf28258622caa5bc7b21c5R9 So, we can update it when it is already deployed. |
||
pool_timeout: 5 # this is in seconds | ||
sentinels: "<%= ENV['BACKEND_REDIS_SENTINEL_HOSTS'] %>" | ||
name: <%= ENV['BACKEND_REDIS_SENTINEL_NAME'] %> | ||
role: <%= ENV['BACKEND_REDIS_SENTINEL_ROLE'] %> | ||
|
||
development: | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
production: | ||
url: "<%= ENV.fetch('BACKEND_REDIS_URL', 'redis://backend-redis:6379') %>" | ||
timeout: <%= ENV.fetch('REDIS_BACKEND_TIMEOUT', 1) %> | ||
pool_size: <%= ENV.fetch('RAILS_MAX_THREADS', 5) %> | ||
size: <%= ENV.fetch('RAILS_MAX_THREADS', 5) %> | ||
jlledom marked this conversation as resolved.
Show resolved
Hide resolved
|
||
pool_timeout: 5 # this is in seconds | ||
sentinels: "<%= ENV['BACKEND_REDIS_SENTINEL_HOSTS'] %>" | ||
name: <%= ENV['BACKEND_REDIS_SENTINEL_NAME'] %> | ||
role: <%= ENV['BACKEND_REDIS_SENTINEL_ROLE'] %> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
production: | ||
url: "<%= ENV.fetch('REDIS_URL', 'redis://system-redis/1') %>" | ||
pool_size: <%= ENV.fetch('RAILS_MAX_THREADS', 5) %> | ||
size: <%= ENV.fetch('RAILS_MAX_THREADS', 5) %> | ||
pool_timeout: 5 # this is in seconds | ||
sentinels: "<%= ENV['REDIS_SENTINEL_HOSTS'] %>" | ||
name: <%= ENV['REDIS_SENTINEL_NAME'] %> | ||
role: <%= ENV['REDIS_SENTINEL_ROLE'] %> |
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.
Redis 4 is not supported by Sidekiq 7. CircleCI needs to upgrade it's image to 6.2. That's fine, since 6.2 is the only supported version also for porta: https://access.redhat.com/articles/2798521