Repository navigation
Update Ruby to 4.0.9 and Rails to 8.1.4.1 - #41
Merged
Merged
Conversation
The example timed out after 0.5s while the child it had just spawned still had to boot a Ruby interpreter and write its cue, so under load the reader never saw the output and the example failed on `expected "" to include "Hello"` roughly once in six runs (in isolation and in the full suite). Give the child 2s and keep the "returned before the 10s sleep" assertion at 5s. The example still exercises a timeout that fires after cues were written.
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.
What this does
Moves the app to Ruby 4.0.5 → 4.0.9 and Rails 8.1.4 → 8.1.4.1, and refreshes every gem the lock can resolve to a newer version. No application code changes.
Files:
.ruby-version,Dockerfile(ARG RUBY_VERSION),Gemfile(Rails floor~> 8.1.4,>= 8.1.4.1),Gemfile.lock,README.md(Ruby badge and the "Local development uses Ruby …" sentence). Theruby:4.0.9-slimtag exists in the registry, so the production image resolves.Gems that moved, and why
rails+ 10 framework gemsnokogirirails-html-sanitizer/loofah/crassrack/rack-testsolid_queuesqlite3tailwindcss-railscuprite/ferrumbootsnap,addressable,faraday,io-console,msgpack,net-scp,net-sftp,net-ssh,parser,rubocopBUNDLED WITHalso moved 4.0.12 → 4.0.23: that is the bundler shipped with Ruby 4.0.9, rewritten bybundle update(not--bundler). CI'sruby/setup-rubyreads.ruby-versionand installs the matching bundler, so no workflow change is needed.Four gems remain outdated because a dependent caps them:
diff-lcs1.6.2 (rspec-expectations/rspec-mocks< 2.0),marcel1.2.1 (activestorage~> 1.0),net-ssh7.3.8 (kamal~> 7.3),prism1.9.0 (rubocop-ast~> 1.7, minitest~> 1.5). They cannot move without upstream changes.Context and Motivation
Rails 8.1.4.1 is a security release. Reachability in this app:
ActionController::Live(GHSA-rwvh-fw6r-pwvp) — the fix for a stream blocking when a full buffer is closed or aborted lands intranscode_controller/direct_stream_controller, the app's streaming core. Reachable, and directly relevant to the write-timeout investigation ingotchas.md.RemoteIp(GHSA-2gff-2mmg-m73p) — requests carrying conflictingForwardedandX-Forwarded-Fornow raiseIpSpoofAttackError. The app sits behind Dokku's nginx, so this is the one to watch on the first deploy.Vary(GHSA-r9jg-fmfx-2gv6) — rendered responses now vary onAccept/X-Requested-Withwhen the format is not in the URL.safe_constantize(no MessagePack, noconstantize, no Action Cable), Action Viewstrip_tags/highlight/ tag-helper attribute names (none used), the CacheStore-session and skip-session-cookie fixes (CookieStore),Parameters#each_key(no mass assignment from it), and the whole Active Storage / Action Mailbox group (neither is installed — the ffmpeg demuxer whitelist does not touchMedia::Transcoder, which shells out itself).Regexp.new,Regexp.compile,Regexp.unionor interpolated regexp literal exists inapp/,lib/orconfig/, so there is no attacker-controlled pattern compilation.Test fixture
spec/services/media_transcoder_spec.rbhad a 0.5 second deadline on a child it had just spawned, so the child had to boot a Ruby interpreter and write its cue inside that window. Under load the reader never saw the output and the example failed onexpected "" to include "Hello"— about one run in six, in isolation as well as in the full suite, and matching the intermittent failure logged in.learnings/ERRORS.mdin July. The child now gets 2 s and the "returned before the 10 s sleep" assertion moved from 3 s to 5 s; the example still covers a timeout that fires after cues were written. 10/10 isolated runs and 3 consecutive full-suite runs are green after the change.Verification
Run locally on Ruby 4.0.9 / Rails 8.1.4.1:
bundle check— dependencies satisfiedbin/rails about— Rails 8.1.4.1, ruby 4.0.9, Rack 3.2.8, sqlite3 adapterRAILS_ENV=test SKIP_DB_UNIQUENESS_VALIDATOR_INDEX_CHECK=true bin/rails zeitwerk:check— "All is good!"bin/rubocop— 172 files inspected, no offensesbin/brakeman --no-pager -q— Security Warnings: 0, exit 0bin/bundler-audit— No vulnerabilities foundbin/importmap audit— No vulnerable packages foundnode --test spec/javascript/*_test.mjs— 500 pass, 0 failbin/rails tailwindcss:build— tailwindcss v4.3.3, 58k stylesheetThe whole suite ran locally because this repo's CI has no test job; it takes ~10 s.
No new deprecations: the
SimpleCov.add_filter/track_fileswarnings and Rack's:unprocessable_entity→:unprocessable_contentwarning are both emitted by gem versions already in the lock at the base commit.Not verified: the production Docker image build (tag existence checked only), and a real streaming session against the new
ActionController::Liveteardown.