Skip to content

Bump ruby 3 bump gems#60

Merged
jbat merged 8 commits intodevelopfrom
bump-ruby-3-bump-gems
Nov 26, 2025
Merged

Bump ruby 3 bump gems#60
jbat merged 8 commits intodevelopfrom
bump-ruby-3-bump-gems

Conversation

@jbat
Copy link
Member

@jbat jbat commented Nov 19, 2025

Loosens a number of dependencies

  • updates gemspec required Ruby required_ruby_version = ">= 3"
  • for local running via bin/console .. sets .ruby-version to 3.4.4
  • and for local running in docker, bump Dockerfile to use 3.4.4
  • loosens constraints on a number of gems to use '>=' over the more restrictive '~='
  • bump Version from 0.2.7 to 0.3.0

@jbat jbat force-pushed the bump-ruby-3-bump-gems branch from 2efebf6 to 3c7f72a Compare November 19, 2025 04:40
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR upgrades the gem to require Ruby 3.x and loosens dependency version constraints. However, there are several critical issues that need to be addressed before merging:

Key Changes:

  • Updates minimum Ruby version requirement from 2.7.8 to 3.0
  • Loosens most gem dependency constraints from pessimistic (~>) to open-ended (>=)
  • Updates test expectations to match Ruby 3's hash inspection format changes

Reviewed changes

Copilot reviewed 9 out of 13 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
superset.gemspec Updates required Ruby version to >= 3 and loosens dependency constraints
lib/superset/version.rb Bumps version from 0.2.7 to 0.3.0
Dockerfile Updates base image to Ruby 3.4.4
.ruby-version Changes Ruby version from 2.7.8 to 3.4.4
.rubocop.yml Updates target Ruby version from 2.6 to 3.0
README.md Updates documentation to reflect Ruby >= 3.0.0 requirement
spec/* Updates test expectations for Ruby 3 hash format (spaces around =>)
Gemfile.lock Reflects updated dependencies from gemspec changes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

superset.gemspec Outdated
spec.add_dependency "rollbar", "~> 3.4"
spec.add_dependency "require_all", "~> 3.0"
spec.add_dependency "rubyzip", "~> 1.0"
spec.add_dependency "rake", ">= 13.0"

This comment was marked as resolved.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no issue with leaving rake >= 13

superset.gemspec Outdated
spec.add_dependency "rake", ">= 13.0"
spec.add_dependency "rollbar", ">= 3.0"
spec.add_dependency "require_all", ">= 3.0"
spec.add_dependency "rubyzip", ">= 1.0"
Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using >= 1.0 for rubyzip is overly permissive. Rubyzip has had security vulnerabilities in the past, and allowing any version >= 1.0 could introduce known security issues or breaking changes. Consider using ~> 2.0 or at minimum >= 2.0 to avoid older versions with potential security vulnerabilities.

Suggested change
spec.add_dependency "rubyzip", ">= 1.0"
spec.add_dependency "rubyzip", "~> 2.0"

Copilot uses AI. Check for mistakes.
superset.gemspec Outdated
spec.add_dependency "dotenv", "~> 2.7"
spec.add_dependency "json", "~> 2.6"
spec.add_dependency "dotenv", ">= 2.0"
spec.add_dependency "json", "~> 2.0"
Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The json dependency constraint was changed from ~> 2.6 to ~> 2.0, which is inconsistent with the stated goal of loosening constraints. This actually broadens the range of allowed versions (allowing older 2.x versions), but still uses the pessimistic constraint ~>. Consider whether this should be >= 2.0 to match the pattern of other loosened dependencies, or if ~> 2.0 is intentionally kept more restrictive.

Suggested change
spec.add_dependency "json", "~> 2.0"
spec.add_dependency "json", ">= 2.0"

Copilot uses AI. Check for mistakes.
README.md Outdated
## Setup Locally ( no docker )

Requires Ruby >= 2.6.0
Requires Ruby >= 3.0.0
Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation states "Requires Ruby >= 3.0.0" but the gemspec specifies required_ruby_version = ">= 3" which is semantically equivalent to >= 3.0.0. However, for consistency and clarity, consider updating the documentation to match the exact format used in the gemspec (">= 3") or vice versa.

Suggested change
Requires Ruby >= 3.0.0
Requires Ruby >= 3

Copilot uses AI. Check for mistakes.
["2", "birth_names", "{\"database_name\"=>\"examples\", \"id\"=>1}", "public", "bob"],
["3", "birth_days", "{\"database_name\"=>\"examples\", \"id\"=>1}", "public", "bob"]
["2", "birth_names", "{\"database_name\" => \"examples\", \"id\" => 1}", "public", "bob"],
["3", "birth_days", "{\"database_name\" => \"examples\", \"id\" => 1}", "public", "bob"]
Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's inconsistent spacing in the array elements - line 58 has one space after the comma between elements, while line 59 has two spaces after "birth_days". For consistency, both lines should have the same spacing pattern.

Suggested change
["3", "birth_days", "{\"database_name\" => \"examples\", \"id\" => 1}", "public", "bob"]
["3", "birth_days", "{\"database_name\" => \"examples\", \"id\" => 1}", "public", "bob"]

Copilot uses AI. Check for mistakes.
superset.gemspec Outdated
spec.add_dependency "require_all", "~> 3.0"
spec.add_dependency "rubyzip", "~> 1.0"
spec.add_dependency "rake", ">= 13.0"
spec.add_dependency "rollbar", ">= 3.0"

This comment was marked as resolved.

spec.add_development_dependency "rubocop", "~> 1.5"
spec.add_development_dependency "pry", "~> 0.14"
spec.add_development_dependency "rspec", ">= 3.0"
spec.add_development_dependency "rubocop", ">= 1.0"

This comment was marked as resolved.

superset.gemspec Outdated
# Uncomment to register a new dependency of your gem
spec.add_dependency "dotenv", "~> 2.7"
spec.add_dependency "json", "~> 2.6"
spec.add_dependency "dotenv", ">= 2.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make dotenv a development dependency instead?

superset.gemspec Outdated
spec.add_dependency "rollbar", "~> 3.4"
spec.add_dependency "require_all", "~> 3.0"
spec.add_dependency "rubyzip", "~> 1.0"
spec.add_dependency "rake", ">= 13.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make rake a development dependency instead?

superset.gemspec Outdated
spec.add_dependency "require_all", "~> 3.0"
spec.add_dependency "rubyzip", "~> 1.0"
spec.add_dependency "rake", ">= 13.0"
spec.add_dependency "rollbar", ">= 3.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make rollbar a development dependency instead? It would require changing its usage to be something like:

if defined?(Rollbar)
  Rollbar.error("Warm up cache failed for the dashboard #{dashboard_id.to_s} and for the dataset #{dataset["datasource_name"]} - #{e}")

This way the gem is not forcing all consumers to use rollbar (even though we are).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense .. I was thinking of pulling it into some configurable exception handling service class
but this is good enough for now.

spec.add_dependency "rubyzip", "~> 1.0"
spec.add_dependency "rake", ">= 13.0"
spec.add_dependency "rollbar", ">= 3.0"
spec.add_dependency "require_all", ">= 3.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the require_all gem really provide much value?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it does, yes.
If we remove it, there would be around 70 classes to explicitly require.

require_rel "superset" recursively loads all 70 files in lib/superset/ 
(including subdirectories like chart/, dashboard/, dataset/, database/, security/, services/, tag/, sqllab/, enumerations/)

spec.add_dependency "rollbar", ">= 3.0"
spec.add_dependency "require_all", ">= 3.0"
spec.add_dependency "rubyzip", ">= 1.3"
spec.add_dependency "faraday", "~> 1.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add some point we'll need to look into migrating our apps to faraday v2

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed .. some work on Happi gem started on that a few months ago, wip
https://github.com/rdytech/happi/releases. rc1

and
rdytech/happi#21 Rc2

@jbat jbat merged commit 6abd22d into develop Nov 26, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants