Repository navigation
[INFRA-478] Upgrade Ruby to 3.4.12 and gemstash to 2.8.2 - #24
Merged
Merged
Conversation
Ruby 2.6 reached end of life in 2022 and gemstash 2.8 needs Ruby 3.1 or newer. Every dependency is relocked for Ruby 3.4, which moves pg to 1.x (0.18 no longer builds), puma to 7, sinatra to 4 and rack to 3. The lockfile targets the two musl platforms so pg and sqlite3 install as precompiled gems, and BUNDLE_FROZEN fails the build if it drifts. Gemstash 2.8 adds one migration that adds a nullable name column to authorizations. It runs on start, and 2.0 keeps working against the migrated database, so reverting the image remains a rollback path. The image now pins Bundler 4.0.23 instead of updating RubyGems to whatever is latest, adds yaml-dev for psych, drops the unused su-exec and creates the data directory owned by the gemstash user. The removed --no-daemonize flag only prints a warning now, so it is dropped too.
itskingori
force-pushed
the
ruby-3-4-gemstash-2-8
branch
from
October 27, 2026 13:00
c45d542 to
003f866
Compare
itskingori
force-pushed
the
ruby-3-4-gemstash-2-8
branch
from
October 27, 2026 13:13
003f866 to
6ee1e76
Compare
itskingori
marked this pull request as ready for review
October 27, 2026 13:53
Member
Author
|
Configuration review between gemstash 2.0.0 and 2.8.2, for the record. Every key in Behaviour that changes without any configuration change:
The only schema change is the |
This file contains hidden or 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
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.
Upgrades the image from Ruby 2.6.3, which is end of life, to Ruby 3.4.12 with gemstash 2.8.2. This is released as 2.8.2.
Background
The last published image is 1.4.1 from September 2020, and the current Dockerfile no longer builds:
gem update --systemfails on Ruby 2.6.3 because current RubyGems needs Ruby 3.2 or newer.Changes
ruby:3.4.12-alpine, and gemstash 2.8.2, which needs Ruby 3.1 or newer.x86_64-linux-muslandaarch64-linux-musl, so pg and sqlite3 install as precompiled gems.BUNDLE_FROZENfails the build if the lockfile drifts.yaml-devfor psych, drops the unusedsu-exec, creates the data directory owned by thegemstashuser, and drops--no-daemonize, which gemstash now only warns about.Every locked gem was released at least 7 days before locking. sqlite3 is held at 2.10.1 because 2.10.2 came out on 26 October. Ruby 3.4.12 itself is newer than that (23 October); I took it anyway because it includes the fix for a regexp security issue.
Risk
Gemstash 2.8 adds one migration,
05_authorization_names, which adds a nullablenamecolumn and a unique index toauthorizations. It runs automatically on first start against an existing database. Existing API keys keep working. 1.4.1 also starts and serves against the migrated database, so reverting the image tag is a working rollback. Snapshotting the data volume before upgrading is still worthwhile.Testing
I built the image and ran an upgrade on a SQLite data volume, with
RACK_ENV=production,GEMSTASH_PROTECTED_FETCH=true, user 9999 and all capabilities dropped:/healthreturns 200 with every check OK./specs.4.8.gzall return 200.linux/amd64build (under emulation) also starts on the migrated volume, passes/healthand serves the private gem.This repository has no CI of its own until the release workflows land, so this PR shows no build checks. The multi-arch test build passed against this branch's Dockerfile in an earlier run: https://github.com/Intellection/docker-gemstash/actions/runs/40500481883
I didn't exercise the MySQL and PostgreSQL compose setups, and their database images are unchanged.
Rollout
Merge this, then the release workflows PR, then tag
2.8.2onmasterto publish the image.Related
References