-
Notifications
You must be signed in to change notification settings - Fork 161
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
Drop support for older rubies, rails and redis #566
Conversation
I also noticed, that there is a Also, there is a Line 11 in 204d2d8
forked_tests . These are not ran on CI currently and are broken. That should be also fixed.
I can help, if ok. |
@@ -4,7 +4,7 @@ source 'https://rubygems.org' | |||
|
|||
# Specify your gem's dependencies in coverband.gemspec | |||
gemspec | |||
gem 'rails', '~>7' |
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.
we might want a rails7 rails 7.1 and rails 7.2
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.
yes, we have gemfiles for 7.0, 7.1 and 7.2, thats github incorrectly displays this change as a renamed file 🤷
@@ -25,14 +25,14 @@ def initialize(redis, opts = {}) | |||
@save_report_batch_size = opts[:save_report_batch_size] || 100 | |||
@format_version = REDIS_STORAGE_FORMAT_VERSION | |||
@redis = redis | |||
raise "HashRedisStore requires redis >= 2.6.0" unless supported? | |||
raise "HashRedisStore requires redis >= 6.0.0" unless supported? |
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 have a reason to require redis 6, we were checking this based on features that redis supports but we aren't using any of the more modern and newer redis features.
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.
There is no reason, only as encouraging people upgrading their redis. I also doubt that people are on the latest version of coverband, but on the redis which is EOL many years ago. But happy to revert.
@@ -13,7 +13,7 @@ class RouteTracker < AbstractTracker | |||
TITLE = "Routes" | |||
|
|||
def initialize(options = {}) | |||
if Rails&.respond_to?(:version) && Gem::Version.new(Rails.version) >= Gem::Version.new("6.0.0") && Gem::Version.new(Rails.version) < Gem::Version.new("7.1.0") | |||
if Rails&.respond_to?(:version) && Gem::Version.new(Rails.version) < Gem::Version.new("7.1.0") | |||
require_relative "../utils/rails6_ext" |
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.
in this case we can delete this check and delete the rails6_ext file
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.
We still support rails 7.0, but the feature was added in 7.1 (rails/rails#43755)
Thanks... I guess we could start putting together a major release.
on Rubocop and Standard, I prefer standardrb for all my projects, I have rubocop as some editor tool chains seem to struggle with using standard as a auto formatter. Rubocop is supposed to use standard via the config file but appears not to do so...
|
I fixed the forked tests, I also fixed up the benchmark tasks.... those are all now running on CI. See the few comments I left after that I am happy to merge this. |
dd01a33
to
5ef4d19
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.
Updated PR with removing old dummy apps from test/
directory.
@@ -4,7 +4,7 @@ source 'https://rubygems.org' | |||
|
|||
# Specify your gem's dependencies in coverband.gemspec | |||
gemspec | |||
gem 'rails', '~>7' |
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.
yes, we have gemfiles for 7.0, 7.1 and 7.2, thats github incorrectly displays this change as a renamed file 🤷
@@ -25,14 +25,14 @@ def initialize(redis, opts = {}) | |||
@save_report_batch_size = opts[:save_report_batch_size] || 100 | |||
@format_version = REDIS_STORAGE_FORMAT_VERSION | |||
@redis = redis | |||
raise "HashRedisStore requires redis >= 2.6.0" unless supported? | |||
raise "HashRedisStore requires redis >= 6.0.0" unless supported? |
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.
There is no reason, only as encouraging people upgrading their redis. I also doubt that people are on the latest version of coverband, but on the redis which is EOL many years ago. But happy to revert.
@@ -13,7 +13,7 @@ class RouteTracker < AbstractTracker | |||
TITLE = "Routes" | |||
|
|||
def initialize(options = {}) | |||
if Rails&.respond_to?(:version) && Gem::Version.new(Rails.version) >= Gem::Version.new("6.0.0") && Gem::Version.new(Rails.version) < Gem::Version.new("7.1.0") | |||
if Rails&.respond_to?(:version) && Gem::Version.new(Rails.version) < Gem::Version.new("7.1.0") | |||
require_relative "../utils/rails6_ext" |
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.
We still support rails 7.0, but the feature was added in 7.1 (rails/rails#43755)
I honestly prefer rubocop over standardrb, because I like full control and also when trying to ignore something with standardrb it starts looking like a hack for me. So I suggest having only one of them. If you want to remove one of them, please do, or let me know and I can do this. |
yeah let's leave it with the older redis support... Many users of Coverband are trying to use it because they are maintaining old legacy apps, so we often have users that are way behind the curve in terms of updates. You can see various issues people open wanting support for older Ruby and Rails versions... I want to be able to update but I do try to keep a pretty wide support window for that reason.
yeah I understand on rubocop vs standardrb, everyone has some favorites there, I am more on the standardrb side of things as I don't want to tweak things to much... but I can try to totally remove rubocop as it seems like running Rubocop with the standardrb mode doesn't really work correctly. I will take a look at cleaning that up tonight. |
5ef4d19
to
1aa3cd6
Compare
Reverted redis changes. |
Thanks for all of this clean up, merged this main branch will be part of a major version release. |
Also a candidate for a new major release, imo.
This PR drops support for:
It also updates CI to check against newer railses.
There is a mention about jruby in the readme, but no tests on CI. I would suggest just dropping it, as I am not sure many people (anyone?) uses it in production to worth the effort.