-
Notifications
You must be signed in to change notification settings - Fork 17
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
Update Ruby and gem versions #135
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aaronsama
approved these changes
Aug 24, 2023
nicolas-fricke
force-pushed
the
update-ruby-and-gem-versions
branch
4 times, most recently
from
August 24, 2023 10:56
2d0d369
to
6e8e5b0
Compare
Ruby 2.6 has reached its EOL on April 12th 2022. This gem is committed to keep supporting versions until one year past their end of life. Therefore, dropping support for Ruby 2.6 and setting the minimum supported version to Ruby 2.7. Also, bump the development version up to 3.0 and add Ruby 3.2 to the test grid to ensure compatibility.
Postgres 15 has been released. To ensure compatibility with this newer version, add it to the testgrid.
Rails 5.2 and with it ActiveRecord 5.2 has reached its end of life (EOL) on June 1st 2022. This gem is committed to support versions up to one year past their EOL. Therefore, the minimum required `activerecord` version has now been bumped to 6.0 which has an EOL of June 1st 2023.
To ensure we're developing our code with up-to-date libraries, update the development dependencies and remove the version locks from the Gemfile. Rubocop will require a few code fixes, therefore its update will be done in a separate commit.
Version 1.56.1 of Rubocop complained about `Style/RedundantConstantBase` within some tests. Therefore, adjust the spec files accordingly and then update to the latest Rubocop gem version.
nicolas-fricke
force-pushed
the
update-ruby-and-gem-versions
branch
2 times, most recently
from
August 24, 2023 11:29
2fe5e11
to
10d627a
Compare
Given that the 18.04 Ubuntu image has been deprecated by Github, upgrade the Rubocop and Postgres jobs to run on Ubuntu 22. For MySQL this is a bit more complicated since newer versions of Ubuntu are incompatible with MySQL 5.7 but we still need to keep support for 5.7 as it still is a maintained MySQL version. Therefore, use MacOS for testing against MySQL 5.7 and Ubuntu to test MySQL 8. But since MacOS does not allow to install the `pg` gem unless Postgres is installed on the machine, remove the `pg` gem from the main Gemfile and install it only in the Postgres test flow via a custom Gemfile. The `mysql` gem is used for local testing and will therefore stay in the main Gemfile for now.
nicolas-fricke
force-pushed
the
update-ruby-and-gem-versions
branch
from
August 24, 2023 11:32
10d627a
to
eb13583
Compare
aaronsama
approved these changes
Aug 24, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To ensure a maintainable state of this gem, we need to ensure that it relies on up-to-date versions of its dependencies. This includes the Ruby version, as well as runtime dependencies and development dependencies. Therefore, multiple steps were taken to update this gem:
Drop support for Ruby 2.6 and use 3.0 for development
Ruby 2.6 has reached its EOL on April 12th 2022. This gem is committed to keep supporting versions until one year past their end of life. Therefore, dropping support for Ruby 2.6 and setting the minimum supported version to Ruby 2.7.
Also, bump the development version up to 3.0 and add Ruby 3.2 to the test grid to ensure compatibility.
Test against newer DB versions
MySQL 8.1 and Postgres 15 have been released. To ensure compatibility with these newer versions, add them to the testgrid.
Raise minimum supported ActiveRecord version to 6.0
Rails 5.2 and with it ActiveRecord 5.2 has reached its end of life (EOL) on June 1st 2022. This gem is committed to support versions up to one year past their EOL. Therefore, the minimum required
activerecord
version has now been bumped to 6.0 which has an EOL of June 1st 2023.Update development dependencies
To ensure we're developing our code with up-to-date libraries, update the development dependencies and remove the version locks from the Gemfile.
Rubocop will require a few code fixes, therefore its update will be done in a separate commit.
Update rubocop to latest version
Version 1.56.1 of Rubocop complained about
Style/RedundantConstantBase
within some tests. Therefore, adjust the spec files accordingly and then update to the latest Rubocop gem version.Fix Github actions workflows and deprecate Ubuntu 18 env
Given that the 18.04 Ubuntu image has been deprecated by Github, upgrade the Rubocop and Postgres jobs to run on Ubuntu 22.
For MySQL this is a bit more complicated since newer versions of Ubuntu are incompatible with MySQL 5.7 but we still need to keep support for 5.7 as it still is a maintained MySQL version.
Therefore, use MacOS for testing against MySQL 5.7 and Ubuntu to test MySQL 8.
But since MacOS does not allow to install the
pg
gem unless Postgres is installed on the machine, remove thepg
gem from the main Gemfile and install it only in the Postgres test flow via a custom Gemfile. Themysql
gem is used for local testing and will therefore stay in the main Gemfile for now.