extend integration CI workflow to rails-five and rails-six#5785
extend integration CI workflow to rails-five and rails-six#5785p-datadog wants to merge 3 commits into
Conversation
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: bb4134b | Docs | Datadog PR Page | Give us feedback! |
Extends the integration test workflow (introduced for rails-seven in PR #5696) to also run rails-five (Ruby 3.0) and rails-six (Ruby 3.3). Re-shapes the workflow as a single matrix-driven job. Applies the same two bit-rot fixes that rails-seven needed: - Ruby 3.0 / 3.3 base images: switch the yarn repo install from the removed `apt-key add` to the modern `gpg --dearmor` + signed-by keyring pattern, so the image still builds on Debian 13. - rails-five / rails-six docker-compose.ci.yml: add the database name to DATABASE_URL so `bin/rails db:prepare` does not abort with "No database selected" under Rails 7's URL-merging rules.
Two follow-ups from the first CI run on this PR:
- rails-five's script/ci explicitly rejects Ruby 3.0 ("Ruby 3 is not
supported by Rails 5"). Switch the matrix to 2.7, the latest version
the script and build-images both accept.
- rails-six failed with `NameError: ActiveJob::QueueAdapters::AbstractAdapter`.
Cause: Gemfile leaves resque unpinned, so it resolves to 3.0 which
requires Rails 7+. rails-six runs Rails 6.1. Pin `~> 2` on both
rails-five and rails-six.
8587007 to
c921b98
Compare
BenchmarksBenchmark execution time: 2026-05-27 21:24:54 Comparing candidate commit bb4134b in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 45 metrics, 1 unstable metrics.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bb4134b91e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - "3.4" | ||
| include: | ||
| - app: rails-five | ||
| ruby: "2.7" |
There was a problem hiding this comment.
Fix the Ruby 2.7 image before adding rails-five
This new matrix entry drives ./integration/script/build-images -v 2.7, which uses integration/images/ruby/2.7/Dockerfile; that Dockerfile still has the old Yarn apt-key add setup, while this change only applies the keyring fix to the 3.0 and 3.3 images. In the GitHub Actions runner this means the newly added rails-five leg still hits the same Yarn/apt bit-rot that this patch is fixing for the other selected images, so the workflow can fail before the Rails app is even built. Please either apply the same Dockerfile fix to the 2.7 image or select an image that has been fixed.
Useful? React with 👍 / 👎.
ivoanjo
left a comment
There was a problem hiding this comment.
👍 LGTM
I see the new jobs running:
- https://github.com/DataDog/dd-trace-rb/actions/runs/26538435444/job/78173402691?pr=5785
- https://github.com/DataDog/dd-trace-rb/actions/runs/26538435444/job/78173402705?pr=5785
- https://github.com/DataDog/dd-trace-rb/actions/runs/26538435444/job/78173402749?pr=5785
...and they seem to be working fine!
On a meta level, we do have a bunch of rails variants in system-tests as well so there may be some duplication between these tests and system-tests but... this is more "food for thought and consideration if it makes sense to merge/move things there" than a "for this PR" kinda note.
What does this PR do?
Extends the integration test workflow added in #5696 to also run
rails-five(Ruby 3.0) andrails-six(Ruby 3.3) integration apps. Stacks on top of #5696 — once that lands, this diff narrows to just the rails-five/six additions.Motivation:
The rails-seven workflow restored execution for the
rails-seven/spec/integration/di_spec.rbthat had been silently skipped since CircleCI was retired (commit 3e3511b, Feb 2025). The same orphan exists inrails-five/spec/integration/di_spec.rbandrails-six/spec/integration/di_spec.rb. This PR wires them up.Approach:
{rails-five, 3.0},{rails-six, 3.3},{rails-seven, 3.4}.apt-key addto the moderngpg --dearmor+ signed-by keyring pattern.rails-five/rails-sixdocker-compose.ci.yml: add the database name toDATABASE_URLsobin/rails db:preparedoes not abort with "No database selected" under Rails 7's URL-merging rules.Change log entry
None.