From 88f0583ed90a4bdb28237d1f58e63e23b1bd6f93 Mon Sep 17 00:00:00 2001 From: Loic Nageleisen Date: Thu, 2 Jul 2026 09:47:07 +0200 Subject: [PATCH 1/2] Add Rails 8 / Ruby 4 / Bundler 4 SSI weblog app Introduce a Ruby 4.0 SSI target so lib-injection is exercised against Ruby 4, RubyGems 4, and Bundler 4. - Add the RB40 runtime (Ruby 4.0.1) to docker_ssi_runtimes.json. - Give Ruby 4.0 RubyGems/Bundler 4.0.14 in the SSI base image (ruby_install_runtimes.sh), replacing the 2.7.2 default, so the Bundler 4 path is actually exercised. - Add lib_injection_rails80_app: a copy of the Rails 7.0 lib-injection app upgraded to Rails 8.0 (load_defaults 8.0, Ruby 4.0.1) with a Bundler 4.0.14 lockfile. nokogiri is pinned to the ruby platform so it builds against the local glibc. - Add rails8-app SSI Dockerfiles (plain, deployment, vendored) that build from the new app. - Register rails8-app* in docker_ssi.json weblog lists and weblog specs (allowed_runtime_versions RB40). The ruby-app* weblogs stay on RB27-RB34: they build the Rails 7.0 app, which is not Ruby 4 ready. --- .../lib_injection_rails80_app/.gitattributes | 7 + .../ruby/lib_injection_rails80_app/.gitignore | 29 ++ .../lib_injection_rails80_app/.ruby-version | 1 + .../ruby/lib_injection_rails80_app/Gemfile | 25 ++ .../lib_injection_rails80_app/Gemfile.lock | 325 ++++++++++++++++++ .../ruby/lib_injection_rails80_app/README.md | 24 ++ .../ruby/lib_injection_rails80_app/Rakefile | 6 + .../app/assets/config/manifest.js | 2 + .../app/assets/images/.keep | 0 .../app/assets/stylesheets/application.css | 15 + .../app/controllers/application_controller.rb | 2 + .../app/controllers/concerns/.keep | 0 .../app/controllers/datadog_controller.rb | 96 ++++++ .../app/helpers/application_helper.rb | 2 + .../app/models/application_record.rb | 3 + .../app/models/concerns/.keep | 0 .../app/views/layouts/application.html.erb | 15 + .../ruby/lib_injection_rails80_app/bin/bundle | 114 ++++++ .../ruby/lib_injection_rails80_app/bin/rails | 4 + .../ruby/lib_injection_rails80_app/bin/rake | 4 + .../ruby/lib_injection_rails80_app/bin/setup | 33 ++ .../ruby/lib_injection_rails80_app/config.ru | 6 + .../config/application.rb | 37 ++ .../lib_injection_rails80_app/config/boot.rb | 3 + .../config/database.yml | 25 ++ .../config/environment.rb | 5 + .../config/environments/development.rb | 62 ++++ .../config/environments/production.rb | 75 ++++ .../config/environments/test.rb | 50 +++ .../config/initializers/assets.rb | 12 + .../initializers/content_security_policy.rb | 25 ++ .../initializers/filter_parameter_logging.rb | 8 + .../config/initializers/inflections.rb | 16 + .../config/initializers/permissions_policy.rb | 11 + .../config/locales/en.yml | 33 ++ .../lib_injection_rails80_app/config/puma.rb | 43 +++ .../config/routes.rb | 7 + .../lib_injection_rails80_app/db/seeds.rb | 7 + .../lib/assets/.keep | 0 .../lib_injection_rails80_app/lib/tasks/.keep | 0 .../lib_injection_rails80_app/public/404.html | 67 ++++ .../lib_injection_rails80_app/public/422.html | 67 ++++ .../lib_injection_rails80_app/public/500.html | 66 ++++ .../public/apple-touch-icon-precomposed.png | 0 .../public/apple-touch-icon.png | 0 .../public/favicon.ico | 0 .../public/robots.txt | 1 + .../test/controllers/.keep | 0 .../test/fixtures/files/.keep | 0 .../test/helpers/.keep | 0 .../test/integration/.keep | 0 .../test/models/.keep | 0 .../test/test_helper.rb | 13 + utils/build/ssi/base/ruby_install_runtimes.sh | 2 +- .../rails8-app-deployment-mode.Dockerfile | 18 + .../ruby/rails8-app-vendored-mode.Dockerfile | 19 + utils/build/ssi/ruby/rails8-app.Dockerfile | 18 + utils/docker_ssi/docker_ssi_runtimes.json | 6 +- .../scripts/ci_orchestrators/docker_ssi.json | 56 +++ 59 files changed, 1463 insertions(+), 2 deletions(-) create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/.gitattributes create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/.gitignore create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/.ruby-version create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/Gemfile create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/Gemfile.lock create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/README.md create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/Rakefile create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/app/assets/config/manifest.js create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/app/assets/images/.keep create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/app/assets/stylesheets/application.css create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/app/controllers/application_controller.rb create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/app/controllers/concerns/.keep create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/app/controllers/datadog_controller.rb create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/app/helpers/application_helper.rb create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/app/models/application_record.rb create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/app/models/concerns/.keep create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/app/views/layouts/application.html.erb create mode 100755 lib-injection/build/docker/ruby/lib_injection_rails80_app/bin/bundle create mode 100755 lib-injection/build/docker/ruby/lib_injection_rails80_app/bin/rails create mode 100755 lib-injection/build/docker/ruby/lib_injection_rails80_app/bin/rake create mode 100755 lib-injection/build/docker/ruby/lib_injection_rails80_app/bin/setup create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/config.ru create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/config/application.rb create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/config/boot.rb create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/config/database.yml create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/config/environment.rb create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/config/environments/development.rb create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/config/environments/production.rb create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/config/environments/test.rb create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/config/initializers/assets.rb create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/config/initializers/content_security_policy.rb create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/config/initializers/filter_parameter_logging.rb create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/config/initializers/inflections.rb create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/config/initializers/permissions_policy.rb create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/config/locales/en.yml create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/config/puma.rb create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/config/routes.rb create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/db/seeds.rb create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/lib/assets/.keep create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/lib/tasks/.keep create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/public/404.html create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/public/422.html create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/public/500.html create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/public/apple-touch-icon-precomposed.png create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/public/apple-touch-icon.png create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/public/favicon.ico create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/public/robots.txt create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/test/controllers/.keep create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/test/fixtures/files/.keep create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/test/helpers/.keep create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/test/integration/.keep create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/test/models/.keep create mode 100644 lib-injection/build/docker/ruby/lib_injection_rails80_app/test/test_helper.rb create mode 100644 utils/build/ssi/ruby/rails8-app-deployment-mode.Dockerfile create mode 100644 utils/build/ssi/ruby/rails8-app-vendored-mode.Dockerfile create mode 100644 utils/build/ssi/ruby/rails8-app.Dockerfile diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/.gitattributes b/lib-injection/build/docker/ruby/lib_injection_rails80_app/.gitattributes new file mode 100644 index 00000000000..31eeee0b6ac --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/.gitattributes @@ -0,0 +1,7 @@ +# See https://git-scm.com/docs/gitattributes for more about git attribute files. + +# Mark the database schema as having been generated. +db/schema.rb linguist-generated + +# Mark any vendored files as having been vendored. +vendor/* linguist-vendored diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/.gitignore b/lib-injection/build/docker/ruby/lib_injection_rails80_app/.gitignore new file mode 100644 index 00000000000..4857d33b6db --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/.gitignore @@ -0,0 +1,29 @@ +# See https://help.github.com/articles/ignoring-files for more about ignoring files. +# +# If you find yourself ignoring temporary files generated by your text editor +# or operating system, you probably want to add a global ignore instead: +# git config --global core.excludesfile '~/.gitignore_global' + +# Ignore bundler config. +/.bundle + +# Ignore the default SQLite database. +/db/*.sqlite3 +/db/*.sqlite3-* + +# Ignore all logfiles and tempfiles. +/log/* +/tmp/* +!/log/.keep +!/tmp/.keep + +# Ignore pidfiles, but keep the directory. +/tmp/pids/* +!/tmp/pids/ +!/tmp/pids/.keep + + +/public/assets + +# Ignore master key for decrypting credentials and more. +/config/master.key diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/.ruby-version b/lib-injection/build/docker/ruby/lib_injection_rails80_app/.ruby-version new file mode 100644 index 00000000000..1454f6ed4b7 --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/.ruby-version @@ -0,0 +1 @@ +4.0.1 diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/Gemfile b/lib-injection/build/docker/ruby/lib_injection_rails80_app/Gemfile new file mode 100644 index 00000000000..21d142d4405 --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/Gemfile @@ -0,0 +1,25 @@ +source "https://rubygems.org" +git_source(:github) { |repo| "https://github.com/#{repo}.git" } + +# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main" +gem "rails", "~> 8.0.0" + +# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails] +gem "sprockets-rails" + +# Use sqlite3 as the database for Active Record +gem "sqlite3", ">= 2.1" + +# Use the Puma web server [https://github.com/puma/puma] +gem "puma", "~> 6.0" + +# Force the Ruby-platform build so it compiles against the local glibc +gem "nokogiri", force_ruby_platform: true + +# Windows does not include zoneinfo files, so bundle the tzinfo-data gem +gem "tzinfo-data", platforms: %i[ windows jruby ] + +group :development, :test do + # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem + gem "debug", platforms: %i[ mri windows ] +end diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/Gemfile.lock b/lib-injection/build/docker/ruby/lib_injection_rails80_app/Gemfile.lock new file mode 100644 index 00000000000..dfef5ea88fe --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/Gemfile.lock @@ -0,0 +1,325 @@ +GEM + remote: https://rubygems.org/ + specs: + actioncable (8.0.5) + actionpack (= 8.0.5) + activesupport (= 8.0.5) + nio4r (~> 2.0) + websocket-driver (>= 0.6.1) + zeitwerk (~> 2.6) + actionmailbox (8.0.5) + actionpack (= 8.0.5) + activejob (= 8.0.5) + activerecord (= 8.0.5) + activestorage (= 8.0.5) + activesupport (= 8.0.5) + mail (>= 2.8.0) + actionmailer (8.0.5) + actionpack (= 8.0.5) + actionview (= 8.0.5) + activejob (= 8.0.5) + activesupport (= 8.0.5) + mail (>= 2.8.0) + rails-dom-testing (~> 2.2) + actionpack (8.0.5) + actionview (= 8.0.5) + activesupport (= 8.0.5) + nokogiri (>= 1.8.5) + rack (>= 2.2.4) + rack-session (>= 1.0.1) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + useragent (~> 0.16) + actiontext (8.0.5) + actionpack (= 8.0.5) + activerecord (= 8.0.5) + activestorage (= 8.0.5) + activesupport (= 8.0.5) + globalid (>= 0.6.0) + nokogiri (>= 1.8.5) + actionview (8.0.5) + activesupport (= 8.0.5) + builder (~> 3.1) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + activejob (8.0.5) + activesupport (= 8.0.5) + globalid (>= 0.3.6) + activemodel (8.0.5) + activesupport (= 8.0.5) + activerecord (8.0.5) + activemodel (= 8.0.5) + activesupport (= 8.0.5) + timeout (>= 0.4.0) + activestorage (8.0.5) + actionpack (= 8.0.5) + activejob (= 8.0.5) + activerecord (= 8.0.5) + activesupport (= 8.0.5) + marcel (~> 1.0) + activesupport (8.0.5) + base64 + benchmark (>= 0.3) + bigdecimal + concurrent-ruby (~> 1.0, >= 1.3.1) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + logger (>= 1.4.2) + minitest (>= 5.1) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) + uri (>= 0.13.1) + base64 (0.3.0) + benchmark (0.5.0) + bigdecimal (4.1.2) + builder (3.3.0) + concurrent-ruby (1.3.7) + connection_pool (3.0.2) + crass (1.0.7) + date (3.5.1) + debug (1.11.1) + irb (~> 1.10) + reline (>= 0.3.8) + drb (2.2.3) + erb (6.0.4) + erubi (1.13.1) + globalid (1.4.0) + activesupport (>= 6.1) + i18n (1.15.2) + concurrent-ruby (~> 1.0) + io-console (0.8.2) + irb (1.18.0) + pp (>= 0.6.0) + prism (>= 1.3.0) + rdoc (>= 4.0.0) + reline (>= 0.4.2) + logger (1.7.0) + loofah (2.25.1) + crass (~> 1.0.2) + nokogiri (>= 1.12.0) + mail (2.9.1) + logger + mini_mime (>= 0.1.1) + net-imap + net-pop + net-smtp + marcel (1.2.1) + mini_mime (1.1.5) + mini_portile2 (2.8.9) + minitest (6.0.6) + drb (~> 2.0) + prism (~> 1.5) + net-imap (0.6.4.1) + date + net-protocol + net-pop (0.1.2) + net-protocol + net-protocol (0.2.2) + timeout + net-smtp (0.5.1) + net-protocol + nio4r (2.7.5) + nokogiri (1.19.4) + mini_portile2 (~> 2.8.2) + racc (~> 1.4) + pp (0.6.4) + prettyprint + prettyprint (0.2.0) + prism (1.9.0) + puma (6.6.1) + nio4r (~> 2.0) + racc (1.8.1) + rack (3.2.6) + rack-session (2.1.2) + base64 (>= 0.1.0) + rack (>= 3.0.0) + rack-test (2.2.0) + rack (>= 1.3) + rackup (2.3.1) + rack (>= 3) + rails (8.0.5) + actioncable (= 8.0.5) + actionmailbox (= 8.0.5) + actionmailer (= 8.0.5) + actionpack (= 8.0.5) + actiontext (= 8.0.5) + actionview (= 8.0.5) + activejob (= 8.0.5) + activemodel (= 8.0.5) + activerecord (= 8.0.5) + activestorage (= 8.0.5) + activesupport (= 8.0.5) + bundler (>= 1.15.0) + railties (= 8.0.5) + rails-dom-testing (2.3.0) + activesupport (>= 5.0.0) + minitest + nokogiri (>= 1.6) + rails-html-sanitizer (1.7.0) + loofah (~> 2.25) + nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) + railties (8.0.5) + actionpack (= 8.0.5) + activesupport (= 8.0.5) + irb (~> 1.13) + rackup (>= 1.0.0) + rake (>= 12.2) + thor (~> 1.0, >= 1.2.2) + tsort (>= 0.2) + zeitwerk (~> 2.6) + rake (13.4.2) + rbs (4.0.3) + logger + prism (>= 1.6.0) + tsort + rdoc (8.0.0) + erb + prism (>= 1.6.0) + rbs (>= 4.0.0) + tsort + reline (0.6.3) + io-console (~> 0.5) + securerandom (0.4.1) + sprockets (4.2.2) + concurrent-ruby (~> 1.0) + logger + rack (>= 2.2.4, < 4) + sprockets-rails (3.5.2) + actionpack (>= 6.1) + activesupport (>= 6.1) + sprockets (>= 3.0.0) + sqlite3 (2.9.5) + mini_portile2 (~> 2.8.0) + sqlite3 (2.9.5-aarch64-linux-gnu) + sqlite3 (2.9.5-aarch64-linux-musl) + sqlite3 (2.9.5-arm-linux-gnu) + sqlite3 (2.9.5-arm-linux-musl) + sqlite3 (2.9.5-arm64-darwin) + sqlite3 (2.9.5-x86-linux-gnu) + sqlite3 (2.9.5-x86-linux-musl) + sqlite3 (2.9.5-x86_64-darwin) + sqlite3 (2.9.5-x86_64-linux-gnu) + sqlite3 (2.9.5-x86_64-linux-musl) + thor (1.5.0) + timeout (0.6.1) + tsort (0.2.0) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + uri (1.1.1) + useragent (0.16.11) + websocket-driver (0.8.2) + base64 + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.5) + zeitwerk (2.8.2) + +PLATFORMS + aarch64-linux-gnu + aarch64-linux-musl + arm-linux-gnu + arm-linux-musl + arm64-darwin + ruby + x86-linux-gnu + x86-linux-musl + x86_64-darwin + x86_64-linux-gnu + x86_64-linux-musl + +DEPENDENCIES + debug + nokogiri + puma (~> 6.0) + rails (~> 8.0.0) + sprockets-rails + sqlite3 (>= 2.1) + tzinfo-data + +CHECKSUMS + actioncable (8.0.5) sha256=01a1d1a48b63b1a643fae6b7b4eb2859af55f507b335fca9ab869a5c6742bb8b + actionmailbox (8.0.5) sha256=2651a87c0cc3dd1243a3afe64c052e71138f99006b3a5d3fa519198735500054 + actionmailer (8.0.5) sha256=7918fac842cfe985ed21692f3d212c914a0c816e30e6fa68633177bb22f38561 + actionpack (8.0.5) sha256=c9de868975dd124a0956499140bd5e63c367865deca01292df7c3195c8da4b35 + actiontext (8.0.5) sha256=12f3ce3d6326230728316ba14eeac27b2100d6e7d9bfcb4b01fb27b187a812e1 + actionview (8.0.5) sha256=6d0fa9e63df0cf2729b1f54d0988336c149eb2bbc6049f4c2834d7b62f351413 + activejob (8.0.5) sha256=2dabe5c3bfe284aba4687c52b930564335435dde3a60b047821f9d3bd0d2ea10 + activemodel (8.0.5) sha256=c796813d46dc1373f4c6c0ec91dfc520b53683ea773c3b3f9a12c4b3eb145bc2 + activerecord (8.0.5) sha256=89b261b6cd910c9431cf2475f3f6e5e2f5ce589805043a33ef2b004376a129e6 + activestorage (8.0.5) sha256=25898a3f8f8aced15ea6a8578cb56955acf3a96ad931e000b2e77e9c8db43df3 + activesupport (8.0.5) sha256=37f213ff6a37cf3fadfa1a28c1a9678e2cb73b59bb9ebd0eeeca653cccadcb23 + base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b + benchmark (0.5.0) sha256=465df122341aedcb81a2a24b4d3bd19b6c67c1530713fd533f3ff034e419236c + bigdecimal (4.1.2) sha256=53d217666027eab4280346fba98e7d5b66baaae1b9c3c1c0ffe89d48188a3fbd + builder (3.3.0) sha256=497918d2f9dca528fdca4b88d84e4ef4387256d984b8154e9d5d3fe5a9c8835f + bundler (4.0.14) sha256=d09a0a965cf772266a7e49e83610be7c2f4e49e61134c42a56804bb383cc24b8 + concurrent-ruby (1.3.7) sha256=4412caec3a5ea2e5fdc52076724c071a81f2c0593d83b2ac8cbb8ca63b3151b0 + connection_pool (3.0.2) sha256=33fff5ba71a12d2aa26cb72b1db8bba2a1a01823559fb01d29eb74c286e62e0a + crass (1.0.7) sha256=94868719948664c89ddcaf0a37c65048413dfcb1c869470a5f7a7ceb5390b295 + date (3.5.1) sha256=750d06384d7b9c15d562c76291407d89e368dda4d4fff957eb94962d325a0dc0 + debug (1.11.1) sha256=2e0b0ac6119f2207a6f8ac7d4a73ca8eb4e440f64da0a3136c30343146e952b6 + drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373 + erb (6.0.4) sha256=38e3803694be357fe2bfe312487c74beaf9fb4e5beb3e22498952fe1645b95d9 + erubi (1.13.1) sha256=a082103b0885dbc5ecf1172fede897f9ebdb745a4b97a5e8dc63953db1ee4ad9 + globalid (1.4.0) sha256=037f12fbf1d9d7a014d501c2d5c77356fd4ddd96d7a7991d6700bba96706f427 + i18n (1.15.2) sha256=00f9eb62412fe593b2a65a97daa75300d37abb8f7202ec748e94b6d46a9dd1b5 + io-console (0.8.2) sha256=d6e3ae7a7cc7574f4b8893b4fca2162e57a825b223a177b7afa236c5ef9814cc + irb (1.18.0) sha256=de9454a0703a54704b9811a5ef31a60c86949fbf4013fcf244fabc7c775248e3 + logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203 + loofah (2.25.1) sha256=d436c73dbd0c1147b16c4a41db097942d217303e1f7728704b37e4df9f6d2e04 + mail (2.9.1) sha256=06574eca475253d6c18145dd70af80d0eb970182d55053497c5f4d797ea160e8 + marcel (1.2.1) sha256=1678e9360e32f9eafa917c80029e2f6d10b2715c66a4b87b6d0da9b9cd1f859f + mini_mime (1.1.5) sha256=8681b7e2e4215f2a159f9400b5816d85e9d8c6c6b491e96a12797e798f8bccef + mini_portile2 (2.8.9) sha256=0cd7c7f824e010c072e33f68bc02d85a00aeb6fce05bb4819c03dfd3c140c289 + minitest (6.0.6) sha256=153ea36d1d987a62942382b61075745042a2b3123b1cd48f4c3675af9cc7d6f1 + net-imap (0.6.4.1) sha256=29f0360d75a7efd3539f16ac1957dea5c0a51ddeceb348db4553c3120914ea0d + net-pop (0.1.2) sha256=848b4e982013c15b2f0382792268763b748cce91c9e91e36b0f27ed26420dff3 + net-protocol (0.2.2) sha256=aa73e0cba6a125369de9837b8d8ef82a61849360eba0521900e2c3713aa162a8 + net-smtp (0.5.1) sha256=ed96a0af63c524fceb4b29b0d352195c30d82dd916a42f03c62a3a70e5b70736 + nio4r (2.7.5) sha256=6c90168e48fb5f8e768419c93abb94ba2b892a1d0602cb06eef16d8b7df1dca1 + nokogiri (1.19.4) sha256=50c951611c92bca05c51411aef45f1cbc50f2821c4802758c5c6d34696533ab5 + pp (0.6.4) sha256=dfcb0fce700c41456265922884f9fe195d7fbb0674a3578e6c0f69588e82b570 + prettyprint (0.2.0) sha256=2bc9e15581a94742064a3cc8b0fb9d45aae3d03a1baa6ef80922627a0766f193 + prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85 + puma (6.6.1) sha256=b9b56e4a4ea75d1bfa6d9e1972ee2c9f43d0883f011826d914e8e37b3694ea1e + racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f + rack (3.2.6) sha256=5ed78e1f73b2e25679bec7d45ee2d4483cc4146eb1be0264fc4d94cb5ef212c2 + rack-session (2.1.2) sha256=595434f8c0c3473ae7d7ac56ecda6cc6dfd9d37c0b2b5255330aa1576967ffe8 + rack-test (2.2.0) sha256=005a36692c306ac0b4a9350355ee080fd09ddef1148a5f8b2ac636c720f5c463 + rackup (2.3.1) sha256=6c79c26753778e90983761d677a48937ee3192b3ffef6bc963c0950f94688868 + rails (8.0.5) sha256=4cb40f90948be292fa15cc7cb37757b97266585145c6e76957464b40edfd5be6 + rails-dom-testing (2.3.0) sha256=8acc7953a7b911ca44588bf08737bc16719f431a1cc3091a292bca7317925c1d + rails-html-sanitizer (1.7.0) sha256=28b145cceaf9cc214a9874feaa183c3acba036c9592b19886e0e45efc62b1e89 + railties (8.0.5) sha256=ad98c6e9a096b7e8cf63c70872b60ec6c1d4152be2a4ffa63483ec02a837a9d5 + rake (13.4.2) sha256=cb825b2bd5f1f8e91ca37bddb4b9aaf345551b4731da62949be002fa89283701 + rbs (4.0.3) sha256=5a7bf70e2628549d9a1f44eae447b2cfe55968a9c60cfff52693a4bdcc020e14 + rdoc (8.0.0) sha256=03bf8c08a9639658855a0cfd77c0abca8325c227693f7f33f82957811348c469 + reline (0.6.3) sha256=1198b04973565b36ec0f11542ab3f5cfeeec34823f4e54cebde90968092b1835 + securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1 + sprockets (4.2.2) sha256=761e5a49f1c288704763f73139763564c845a8f856d52fba013458f8af1b59b1 + sprockets-rails (3.5.2) sha256=a9e88e6ce9f8c912d349aa5401509165ec42326baf9e942a85de4b76dbc4119e + sqlite3 (2.9.5) sha256=04572973a3f943ad50a8adfffc8dd752a5f06e4c3db2026f71838fed8a982606 + sqlite3 (2.9.5-aarch64-linux-gnu) sha256=78075b6337d3d182c6d2b4691049ed45cd220826160c9ea18946bf6a1de200dc + sqlite3 (2.9.5-aarch64-linux-musl) sha256=18c801185deb4adc01ddb281e8f672a39e3d1729979ca91e39439cd3eac0402d + sqlite3 (2.9.5-arm-linux-gnu) sha256=1bdfca0c7d63998c60b0f4a8e3c8df2d33800ccc4abd2d612eddbbbc92a4c48b + sqlite3 (2.9.5-arm-linux-musl) sha256=bae1109d12b2e9f588455967729b008e1ff4feb7761749df695019c9079913c6 + sqlite3 (2.9.5-arm64-darwin) sha256=d0cf444a70fc9395d513cfbcc1e6719e224aa645314e3824cb0474c721425aa2 + sqlite3 (2.9.5-x86-linux-gnu) sha256=c94b96b16f17796be6fa099d15218b52e396f55690c4760faaaefa21ebab9dd5 + sqlite3 (2.9.5-x86-linux-musl) sha256=063a8c13cbadfe7f29453b1706cbdf91fca4a78d244f816ff20bac4fb259f1e4 + sqlite3 (2.9.5-x86_64-darwin) sha256=8e9caae38bd7ebb29cbeee3e7ab1d12dc2327d9a1b92c7fcf0dda05589627a81 + sqlite3 (2.9.5-x86_64-linux-gnu) sha256=233dbcb6714148dd23bc5aeb33e8efd6eac974969564ddd5794c23d5f52b231e + sqlite3 (2.9.5-x86_64-linux-musl) sha256=e7d3a7474e8af0f96150c21abc203fbab5437206bfcdf11deab7741c0ca516f2 + thor (1.5.0) sha256=e3a9e55fe857e44859ce104a84675ab6e8cd59c650a49106a05f55f136425e73 + timeout (0.6.1) sha256=78f57368a7e7bbadec56971f78a3f5ecbcfb59b7fcbb0a3ed6ddc08a5094accb + tsort (0.2.0) sha256=9650a793f6859a43b6641671278f79cfead60ac714148aabe4e3f0060480089f + tzinfo (2.0.6) sha256=8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b + uri (1.1.1) sha256=379fa58d27ffb1387eaada68c749d1426738bd0f654d812fcc07e7568f5c57c6 + useragent (0.16.11) sha256=700e6413ad4bb954bb63547fa098dddf7b0ebe75b40cc6f93b8d54255b173844 + websocket-driver (0.8.2) sha256=97c556b019bf3410b4961002ac501621e9322d3f8a7bc02161a09301cc4c4146 + websocket-extensions (0.1.5) sha256=1c6ba63092cda343eb53fc657110c71c754c56484aad42578495227d717a8241 + zeitwerk (2.8.2) sha256=7212a61311083c604184b1ea2574b9aa05cd14f855a0841c06985cabe9181d12 + +BUNDLED WITH + 4.0.14 diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/README.md b/lib-injection/build/docker/ruby/lib_injection_rails80_app/README.md new file mode 100644 index 00000000000..7db80e4ca1b --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/README.md @@ -0,0 +1,24 @@ +# README + +This README would normally document whatever steps are necessary to get the +application up and running. + +Things you may want to cover: + +* Ruby version + +* System dependencies + +* Configuration + +* Database creation + +* Database initialization + +* How to run the test suite + +* Services (job queues, cache servers, search engines, etc.) + +* Deployment instructions + +* ... diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/Rakefile b/lib-injection/build/docker/ruby/lib_injection_rails80_app/Rakefile new file mode 100644 index 00000000000..9a5ea7383aa --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/Rakefile @@ -0,0 +1,6 @@ +# Add your own tasks in files placed in lib/tasks ending in .rake, +# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. + +require_relative "config/application" + +Rails.application.load_tasks diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/app/assets/config/manifest.js b/lib-injection/build/docker/ruby/lib_injection_rails80_app/app/assets/config/manifest.js new file mode 100644 index 00000000000..591819335f0 --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/app/assets/config/manifest.js @@ -0,0 +1,2 @@ +//= link_tree ../images +//= link_directory ../stylesheets .css diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/app/assets/images/.keep b/lib-injection/build/docker/ruby/lib_injection_rails80_app/app/assets/images/.keep new file mode 100644 index 00000000000..e69de29bb2d diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/app/assets/stylesheets/application.css b/lib-injection/build/docker/ruby/lib_injection_rails80_app/app/assets/stylesheets/application.css new file mode 100644 index 00000000000..288b9ab7182 --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/app/assets/stylesheets/application.css @@ -0,0 +1,15 @@ +/* + * This is a manifest file that'll be compiled into application.css, which will include all the files + * listed below. + * + * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's + * vendor/assets/stylesheets directory can be referenced here using a relative path. + * + * You're free to add application-wide styles to this file and they'll appear at the bottom of the + * compiled file so the styles you add here take precedence over styles defined in any other CSS + * files in this directory. Styles in this file should be added after the last require_* statement. + * It is generally better to create a new file per style scope. + * + *= require_tree . + *= require_self + */ diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/app/controllers/application_controller.rb b/lib-injection/build/docker/ruby/lib_injection_rails80_app/app/controllers/application_controller.rb new file mode 100644 index 00000000000..09705d12ab4 --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/app/controllers/application_controller.rb @@ -0,0 +1,2 @@ +class ApplicationController < ActionController::Base +end diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/app/controllers/concerns/.keep b/lib-injection/build/docker/ruby/lib_injection_rails80_app/app/controllers/concerns/.keep new file mode 100644 index 00000000000..e69de29bb2d diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/app/controllers/datadog_controller.rb b/lib-injection/build/docker/ruby/lib_injection_rails80_app/app/controllers/datadog_controller.rb new file mode 100644 index 00000000000..cbd1e5d153c --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/app/controllers/datadog_controller.rb @@ -0,0 +1,96 @@ +class DatadogController < ApplicationController + def crashme + Process.kill('SEGV', Process.pid) + end + + def fork_and_crash + pid = Process.fork do + Process.kill('SEGV', Process.pid) + end + + Process.wait(pid) + end + + def child_pids + current_pid = Process.pid + child_pids = [] + + begin + # Iterate over all the directories in /proc + Dir.foreach('/proc') do |pid| + # Skip non-numeric directories + next unless pid =~ /^\d+$/ + + status_path = "/proc/#{pid}/status" + + # Read the status file for each process + if File.exist?(status_path) + File.open(status_path) do |file| + file.each_line do |line| + if line.start_with?("PPid:") + ppid = line.split[1].to_i + if ppid == current_pid + child_pids << pid + end + break + end + end + end + end + end + + # Render the response with the list of child PIDs + render plain: "#{child_pids.join(', ')}" + rescue => e + # Handle any errors that might occur during reading from /proc + render plain: "Error: #{e.message}", status: 500 + end + end + + def zombies + zombie_processes = [] + + begin + # Iterate over all the directories in /proc + Dir.foreach('/proc') do |pid| + # Skip non-numeric directories + next unless pid =~ /^\d+$/ + + status_path = "/proc/#{pid}/status" + + # Read the status file for each process + if File.exist?(status_path) + name = nil + state = nil + ppid = nil + + File.open(status_path) do |file| + file.each_line do |line| + if line.start_with?("Name:") + name = line.split[1] + elsif line.start_with?("State:") + state = line.split[1] + elsif line.start_with?("PPid:") + ppid = line.split[1] + end + + # Break early if all information is found + break if name && state && ppid + end + end + + # Check if the process state is 'Z' (zombie) + if state == "Z" + zombie_processes << "#{name} (PID: #{pid}, PPID: #{ppid})" + end + end + end + + # Render the response with the list of zombie processes + render plain: zombie_processes.join(', ') + rescue => e + # Handle any errors that might occur during reading from /proc + render plain: "Error: #{e.message}", status: 500 + end + end + end diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/app/helpers/application_helper.rb b/lib-injection/build/docker/ruby/lib_injection_rails80_app/app/helpers/application_helper.rb new file mode 100644 index 00000000000..de6be7945c6 --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/app/helpers/application_helper.rb @@ -0,0 +1,2 @@ +module ApplicationHelper +end diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/app/models/application_record.rb b/lib-injection/build/docker/ruby/lib_injection_rails80_app/app/models/application_record.rb new file mode 100644 index 00000000000..b63caeb8a5c --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/app/models/application_record.rb @@ -0,0 +1,3 @@ +class ApplicationRecord < ActiveRecord::Base + primary_abstract_class +end diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/app/models/concerns/.keep b/lib-injection/build/docker/ruby/lib_injection_rails80_app/app/models/concerns/.keep new file mode 100644 index 00000000000..e69de29bb2d diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/app/views/layouts/application.html.erb b/lib-injection/build/docker/ruby/lib_injection_rails80_app/app/views/layouts/application.html.erb new file mode 100644 index 00000000000..98ae3eeccac --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/app/views/layouts/application.html.erb @@ -0,0 +1,15 @@ + + + + LibInjectionRailsApp + + <%= csrf_meta_tags %> + <%= csp_meta_tag %> + + <%= stylesheet_link_tag "application" %> + + + + <%= yield %> + + diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/bin/bundle b/lib-injection/build/docker/ruby/lib_injection_rails80_app/bin/bundle new file mode 100755 index 00000000000..981e650b686 --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/bin/bundle @@ -0,0 +1,114 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'bundle' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require "rubygems" + +m = Module.new do + module_function + + def invoked_as_script? + File.expand_path($0) == File.expand_path(__FILE__) + end + + def env_var_version + ENV["BUNDLER_VERSION"] + end + + def cli_arg_version + return unless invoked_as_script? # don't want to hijack other binstubs + return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update` + bundler_version = nil + update_index = nil + ARGV.each_with_index do |a, i| + if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN + bundler_version = a + end + next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/ + bundler_version = $1 + update_index = i + end + bundler_version + end + + def gemfile + gemfile = ENV["BUNDLE_GEMFILE"] + return gemfile if gemfile && !gemfile.empty? + + File.expand_path("../Gemfile", __dir__) + end + + def lockfile + lockfile = + case File.basename(gemfile) + when "gems.rb" then gemfile.sub(/\.rb$/, gemfile) + else "#{gemfile}.lock" + end + File.expand_path(lockfile) + end + + def lockfile_version + return unless File.file?(lockfile) + lockfile_contents = File.read(lockfile) + return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/ + Regexp.last_match(1) + end + + def bundler_requirement + @bundler_requirement ||= + env_var_version || cli_arg_version || + bundler_requirement_for(lockfile_version) + end + + def bundler_requirement_for(version) + return "#{Gem::Requirement.default}.a" unless version + + bundler_gem_version = Gem::Version.new(version) + + requirement = bundler_gem_version.approximate_recommendation + + return requirement unless Gem.rubygems_version < Gem::Version.new("2.7.0") + + requirement += ".a" if bundler_gem_version.prerelease? + + requirement + end + + def load_bundler! + ENV["BUNDLE_GEMFILE"] ||= gemfile + + activate_bundler + end + + def activate_bundler + gem_error = activation_error_handling do + gem "bundler", bundler_requirement + end + return if gem_error.nil? + require_error = activation_error_handling do + require "bundler/version" + end + return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION)) + warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`" + exit 42 + end + + def activation_error_handling + yield + nil + rescue StandardError, LoadError => e + e + end +end + +m.load_bundler! + +if m.invoked_as_script? + load Gem.bin_path("bundler", "bundle") +end diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/bin/rails b/lib-injection/build/docker/ruby/lib_injection_rails80_app/bin/rails new file mode 100755 index 00000000000..efc0377492f --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/bin/rails @@ -0,0 +1,4 @@ +#!/usr/bin/env ruby +APP_PATH = File.expand_path("../config/application", __dir__) +require_relative "../config/boot" +require "rails/commands" diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/bin/rake b/lib-injection/build/docker/ruby/lib_injection_rails80_app/bin/rake new file mode 100755 index 00000000000..4fbf10b960e --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/bin/rake @@ -0,0 +1,4 @@ +#!/usr/bin/env ruby +require_relative "../config/boot" +require "rake" +Rake.application.run diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/bin/setup b/lib-injection/build/docker/ruby/lib_injection_rails80_app/bin/setup new file mode 100755 index 00000000000..ec47b79b3b3 --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/bin/setup @@ -0,0 +1,33 @@ +#!/usr/bin/env ruby +require "fileutils" + +# path to your application root. +APP_ROOT = File.expand_path("..", __dir__) + +def system!(*args) + system(*args) || abort("\n== Command #{args} failed ==") +end + +FileUtils.chdir APP_ROOT do + # This script is a way to set up or update your development environment automatically. + # This script is idempotent, so that you can run it at any time and get an expectable outcome. + # Add necessary setup steps to this file. + + puts "== Installing dependencies ==" + system! "gem install bundler --conservative" + system("bundle check") || system!("bundle install") + + # puts "\n== Copying sample files ==" + # unless File.exist?("config/database.yml") + # FileUtils.cp "config/database.yml.sample", "config/database.yml" + # end + + puts "\n== Preparing database ==" + system! "bin/rails db:prepare" + + puts "\n== Removing old logs and tempfiles ==" + system! "bin/rails log:clear tmp:clear" + + puts "\n== Restarting application server ==" + system! "bin/rails restart" +end diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/config.ru b/lib-injection/build/docker/ruby/lib_injection_rails80_app/config.ru new file mode 100644 index 00000000000..4a3c09a6889 --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/config.ru @@ -0,0 +1,6 @@ +# This file is used by Rack-based servers to start the application. + +require_relative "config/environment" + +run Rails.application +Rails.application.load_server diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/application.rb b/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/application.rb new file mode 100644 index 00000000000..f87804eaf41 --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/application.rb @@ -0,0 +1,37 @@ +require_relative "boot" + +require "rails" +# Pick the frameworks you want: +require "active_model/railtie" +# require "active_job/railtie" +require "active_record/railtie" +# require "active_storage/engine" +require "action_controller/railtie" +# require "action_mailer/railtie" +# require "action_mailbox/engine" +# require "action_text/engine" +require "action_view/railtie" +# require "action_cable/engine" +require "rails/test_unit/railtie" + +# Require the gems listed in Gemfile, including any gems +# you've limited to :test, :development, or :production. +Bundler.require(*Rails.groups) + +module LibInjectionRailsApp + class Application < Rails::Application + # Initialize configuration defaults for originally generated Rails version. + config.load_defaults 8.0 + + # Configuration for the application, engines, and railties goes here. + # + # These settings can be overridden in specific environments using the files + # in config/environments, which are processed later. + # + # config.time_zone = "Central Time (US & Canada)" + # config.eager_load_paths << Rails.root.join("extras") + + # Don't generate system test files. + config.generators.system_tests = nil + end +end diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/boot.rb b/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/boot.rb new file mode 100644 index 00000000000..282011619d9 --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/boot.rb @@ -0,0 +1,3 @@ +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) + +require "bundler/setup" # Set up gems listed in the Gemfile. diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/database.yml b/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/database.yml new file mode 100644 index 00000000000..fcba57f19f0 --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/database.yml @@ -0,0 +1,25 @@ +# SQLite. Versions 3.8.0 and up are supported. +# gem install sqlite3 +# +# Ensure the SQLite 3 gem is defined in your Gemfile +# gem "sqlite3" +# +default: &default + adapter: sqlite3 + pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> + timeout: 5000 + +development: + <<: *default + database: db/development.sqlite3 + +# Warning: The database defined as "test" will be erased and +# re-generated from your development database when you run "rake". +# Do not set this db to the same as development or production. +test: + <<: *default + database: db/test.sqlite3 + +production: + <<: *default + database: db/production.sqlite3 diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/environment.rb b/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/environment.rb new file mode 100644 index 00000000000..cac53157752 --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/environment.rb @@ -0,0 +1,5 @@ +# Load the Rails application. +require_relative "application" + +# Initialize the Rails application. +Rails.application.initialize! diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/environments/development.rb b/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/environments/development.rb new file mode 100644 index 00000000000..5ab254920ff --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/environments/development.rb @@ -0,0 +1,62 @@ +require "active_support/core_ext/integer/time" + +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # In the development environment your application's code is reloaded any time + # it changes. This slows down response time but is perfect for development + # since you don't have to restart the web server when you make code changes. + config.cache_classes = false + + # Do not eager load code on boot. + config.eager_load = false + + # Show full error reports. + config.consider_all_requests_local = true + + # Enable server timing + config.server_timing = true + + # Enable/disable caching. By default caching is disabled. + # Run rails dev:cache to toggle caching. + if Rails.root.join("tmp/caching-dev.txt").exist? + config.action_controller.perform_caching = true + config.action_controller.enable_fragment_cache_logging = true + + config.cache_store = :memory_store + config.public_file_server.headers = { + "Cache-Control" => "public, max-age=#{2.days.to_i}" + } + else + config.action_controller.perform_caching = false + + config.cache_store = :null_store + end + + # Print deprecation notices to the Rails logger. + config.active_support.deprecation = :log + + # Raise exceptions for disallowed deprecations. + config.active_support.disallowed_deprecation = :raise + + # Tell Active Support which deprecation messages to disallow. + config.active_support.disallowed_deprecation_warnings = [] + + # Raise an error on page load if there are pending migrations. + config.active_record.migration_error = :page_load + + # Highlight code that triggered database queries in logs. + config.active_record.verbose_query_logs = true + + # Suppress logger output for asset requests. + config.assets.quiet = true + + # Raises error for missing translations. + # config.i18n.raise_on_missing_translations = true + + # Annotate rendered view with file names. + # config.action_view.annotate_rendered_view_with_filenames = true + + # Uncomment if you wish to allow Action Cable access from any origin. + # config.action_cable.disable_request_forgery_protection = true +end diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/environments/production.rb b/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/environments/production.rb new file mode 100644 index 00000000000..ac46ed41c36 --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/environments/production.rb @@ -0,0 +1,75 @@ +require "active_support/core_ext/integer/time" + +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # Code is not reloaded between requests. + config.cache_classes = true + + # Eager load code on boot. This eager loads most of Rails and + # your application in memory, allowing both threaded web servers + # and those relying on copy on write to perform better. + # Rake tasks automatically ignore this option for performance. + config.eager_load = true + + # Full error reports are disabled and caching is turned on. + config.consider_all_requests_local = false + config.action_controller.perform_caching = true + + # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"] + # or in config/master.key. This key is used to decrypt credentials (and other encrypted files). + # config.require_master_key = true + + # Disable serving static files from the `/public` folder by default since + # Apache or NGINX already handles this. + config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present? + + # Compress CSS using a preprocessor. + # config.assets.css_compressor = :sass + + # Do not fallback to assets pipeline if a precompiled asset is missed. + config.assets.compile = false + + # Enable serving of images, stylesheets, and JavaScripts from an asset server. + # config.asset_host = "http://assets.example.com" + + # Specifies the header that your server uses for sending files. + # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache + # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX + + # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. + # config.force_ssl = true + + # Include generic and useful information about system operation, but avoid logging too much + # information to avoid inadvertent exposure of personally identifiable information (PII). + config.log_level = :info + + # Prepend all log lines with the following tags. + config.log_tags = [ :request_id ] + + # Use a different cache store in production. + # config.cache_store = :mem_cache_store + + # Enable locale fallbacks for I18n (makes lookups for any locale fall back to + # the I18n.default_locale when a translation cannot be found). + config.i18n.fallbacks = true + + # Don't log any deprecations. + config.active_support.report_deprecations = false + + # Use default logging formatter so that PID and timestamp are not suppressed. + config.log_formatter = ::Logger::Formatter.new + + # Use a different logger for distributed setups. + # require "syslog/logger" + # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new "app-name") + + if ENV["RAILS_LOG_TO_STDOUT"].present? + logger = ActiveSupport::Logger.new(STDOUT) + logger.formatter = config.log_formatter + config.logger = ActiveSupport::TaggedLogging.new(logger) + end + + # Do not dump schema after migrations. + config.active_record.dump_schema_after_migration = false +end diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/environments/test.rb b/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/environments/test.rb new file mode 100644 index 00000000000..eb2f1716c4e --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/environments/test.rb @@ -0,0 +1,50 @@ +require "active_support/core_ext/integer/time" + +# The test environment is used exclusively to run your application's +# test suite. You never need to work with it otherwise. Remember that +# your test database is "scratch space" for the test suite and is wiped +# and recreated between test runs. Don't rely on the data there! + +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # Turn false under Spring and add config.action_view.cache_template_loading = true. + config.cache_classes = true + + # Eager loading loads your whole application. When running a single test locally, + # this probably isn't necessary. It's a good idea to do in a continuous integration + # system, or in some way before deploying your code. + config.eager_load = ENV["CI"].present? + + # Configure public file server for tests with Cache-Control for performance. + config.public_file_server.enabled = true + config.public_file_server.headers = { + "Cache-Control" => "public, max-age=#{1.hour.to_i}" + } + + # Show full error reports and disable caching. + config.consider_all_requests_local = true + config.action_controller.perform_caching = false + config.cache_store = :null_store + + # Raise exceptions instead of rendering exception templates. + config.action_dispatch.show_exceptions = false + + # Disable request forgery protection in test environment. + config.action_controller.allow_forgery_protection = false + + # Print deprecation notices to the stderr. + config.active_support.deprecation = :stderr + + # Raise exceptions for disallowed deprecations. + config.active_support.disallowed_deprecation = :raise + + # Tell Active Support which deprecation messages to disallow. + config.active_support.disallowed_deprecation_warnings = [] + + # Raises error for missing translations. + # config.i18n.raise_on_missing_translations = true + + # Annotate rendered view with file names. + # config.action_view.annotate_rendered_view_with_filenames = true +end diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/initializers/assets.rb b/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/initializers/assets.rb new file mode 100644 index 00000000000..2eeef966fe8 --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/initializers/assets.rb @@ -0,0 +1,12 @@ +# Be sure to restart your server when you modify this file. + +# Version of your assets, change this if you want to expire all your assets. +Rails.application.config.assets.version = "1.0" + +# Add additional assets to the asset load path. +# Rails.application.config.assets.paths << Emoji.images_path + +# Precompile additional assets. +# application.js, application.css, and all non-JS/CSS in the app/assets +# folder are already added. +# Rails.application.config.assets.precompile += %w( admin.js admin.css ) diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/initializers/content_security_policy.rb b/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/initializers/content_security_policy.rb new file mode 100644 index 00000000000..54f47cf15fe --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/initializers/content_security_policy.rb @@ -0,0 +1,25 @@ +# Be sure to restart your server when you modify this file. + +# Define an application-wide content security policy. +# See the Securing Rails Applications Guide for more information: +# https://guides.rubyonrails.org/security.html#content-security-policy-header + +# Rails.application.configure do +# config.content_security_policy do |policy| +# policy.default_src :self, :https +# policy.font_src :self, :https, :data +# policy.img_src :self, :https, :data +# policy.object_src :none +# policy.script_src :self, :https +# policy.style_src :self, :https +# # Specify URI for violation reports +# # policy.report_uri "/csp-violation-report-endpoint" +# end +# +# # Generate session nonces for permitted importmap and inline scripts +# config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s } +# config.content_security_policy_nonce_directives = %w(script-src) +# +# # Report violations without enforcing the policy. +# # config.content_security_policy_report_only = true +# end diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/initializers/filter_parameter_logging.rb b/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/initializers/filter_parameter_logging.rb new file mode 100644 index 00000000000..adc6568ce83 --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/initializers/filter_parameter_logging.rb @@ -0,0 +1,8 @@ +# Be sure to restart your server when you modify this file. + +# Configure parameters to be filtered from the log file. Use this to limit dissemination of +# sensitive information. See the ActiveSupport::ParameterFilter documentation for supported +# notations and behaviors. +Rails.application.config.filter_parameters += [ + :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn +] diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/initializers/inflections.rb b/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/initializers/inflections.rb new file mode 100644 index 00000000000..3860f659ead --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/initializers/inflections.rb @@ -0,0 +1,16 @@ +# Be sure to restart your server when you modify this file. + +# Add new inflection rules using the following format. Inflections +# are locale specific, and you may define rules for as many different +# locales as you wish. All of these examples are active by default: +# ActiveSupport::Inflector.inflections(:en) do |inflect| +# inflect.plural /^(ox)$/i, "\\1en" +# inflect.singular /^(ox)en/i, "\\1" +# inflect.irregular "person", "people" +# inflect.uncountable %w( fish sheep ) +# end + +# These inflection rules are supported but not enabled by default: +# ActiveSupport::Inflector.inflections(:en) do |inflect| +# inflect.acronym "RESTful" +# end diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/initializers/permissions_policy.rb b/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/initializers/permissions_policy.rb new file mode 100644 index 00000000000..00f64d71b03 --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/initializers/permissions_policy.rb @@ -0,0 +1,11 @@ +# Define an application-wide HTTP permissions policy. For further +# information see https://developers.google.com/web/updates/2018/06/feature-policy +# +# Rails.application.config.permissions_policy do |f| +# f.camera :none +# f.gyroscope :none +# f.microphone :none +# f.usb :none +# f.fullscreen :self +# f.payment :self, "https://secure.example.com" +# end diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/locales/en.yml b/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/locales/en.yml new file mode 100644 index 00000000000..8ca56fc74f3 --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/locales/en.yml @@ -0,0 +1,33 @@ +# Files in the config/locales directory are used for internationalization +# and are automatically loaded by Rails. If you want to use locales other +# than English, add the necessary files in this directory. +# +# To use the locales, use `I18n.t`: +# +# I18n.t "hello" +# +# In views, this is aliased to just `t`: +# +# <%= t("hello") %> +# +# To use a different locale, set it with `I18n.locale`: +# +# I18n.locale = :es +# +# This would use the information in config/locales/es.yml. +# +# The following keys must be escaped otherwise they will not be retrieved by +# the default I18n backend: +# +# true, false, on, off, yes, no +# +# Instead, surround them with single quotes. +# +# en: +# "true": "foo" +# +# To learn more, please read the Rails Internationalization guide +# available at https://guides.rubyonrails.org/i18n.html. + +en: + hello: "Hello world" diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/puma.rb b/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/puma.rb new file mode 100644 index 00000000000..daaf0369998 --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/puma.rb @@ -0,0 +1,43 @@ +# Puma can serve each request in a thread from an internal thread pool. +# The `threads` method setting takes two numbers: a minimum and maximum. +# Any libraries that use thread pools should be configured to match +# the maximum value specified for Puma. Default is set to 5 threads for minimum +# and maximum; this matches the default thread size of Active Record. +# +max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 } +min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count } +threads min_threads_count, max_threads_count + +# Specifies the `worker_timeout` threshold that Puma will use to wait before +# terminating a worker in development environments. +# +worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development" + +# Specifies the `port` that Puma will listen on to receive requests; default is 3000. +# +port ENV.fetch("PORT") { 3000 } + +# Specifies the `environment` that Puma will run in. +# +environment ENV.fetch("RAILS_ENV") { "development" } + +# Specifies the `pidfile` that Puma will use. +pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" } + +# Specifies the number of `workers` to boot in clustered mode. +# Workers are forked web server processes. If using threads and workers together +# the concurrency of the application would be max `threads` * `workers`. +# Workers do not work on JRuby or Windows (both of which do not support +# processes). +# +# workers ENV.fetch("WEB_CONCURRENCY") { 2 } + +# Use the `preload_app!` method when specifying a `workers` number. +# This directive tells Puma to first boot the application and load code +# before forking the application. This takes advantage of Copy On Write +# process behavior so workers use less memory. +# +# preload_app! + +# Allow puma to be restarted by `bin/rails restart` command. +plugin :tmp_restart diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/routes.rb b/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/routes.rb new file mode 100644 index 00000000000..3690cdaa6a8 --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/config/routes.rb @@ -0,0 +1,7 @@ +Rails.application.routes.draw do + root to: proc { [200, {}, ['OK']] } + get 'crashme', controller: 'datadog', action: :crashme + get 'fork_and_crash', controller: 'datadog', action: :fork_and_crash + get 'child_pids', controller: 'datadog', action: :child_pids + get 'zombies', controller: 'datadog', action: :zombies +end diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/db/seeds.rb b/lib-injection/build/docker/ruby/lib_injection_rails80_app/db/seeds.rb new file mode 100644 index 00000000000..bc25fce3061 --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/db/seeds.rb @@ -0,0 +1,7 @@ +# This file should contain all the record creation needed to seed the database with its default values. +# The data can then be loaded with the bin/rails db:seed command (or created alongside the database with db:setup). +# +# Examples: +# +# movies = Movie.create([{ name: "Star Wars" }, { name: "Lord of the Rings" }]) +# Character.create(name: "Luke", movie: movies.first) diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/lib/assets/.keep b/lib-injection/build/docker/ruby/lib_injection_rails80_app/lib/assets/.keep new file mode 100644 index 00000000000..e69de29bb2d diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/lib/tasks/.keep b/lib-injection/build/docker/ruby/lib_injection_rails80_app/lib/tasks/.keep new file mode 100644 index 00000000000..e69de29bb2d diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/public/404.html b/lib-injection/build/docker/ruby/lib_injection_rails80_app/public/404.html new file mode 100644 index 00000000000..2be3af26fc5 --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/public/404.html @@ -0,0 +1,67 @@ + + + + The page you were looking for doesn't exist (404) + + + + + + +
+
+

The page you were looking for doesn't exist.

+

You may have mistyped the address or the page may have moved.

+
+

If you are the application owner check the logs for more information.

+
+ + diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/public/422.html b/lib-injection/build/docker/ruby/lib_injection_rails80_app/public/422.html new file mode 100644 index 00000000000..c08eac0d1df --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/public/422.html @@ -0,0 +1,67 @@ + + + + The change you wanted was rejected (422) + + + + + + +
+
+

The change you wanted was rejected.

+

Maybe you tried to change something you didn't have access to.

+
+

If you are the application owner check the logs for more information.

+
+ + diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/public/500.html b/lib-injection/build/docker/ruby/lib_injection_rails80_app/public/500.html new file mode 100644 index 00000000000..78a030af22e --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/public/500.html @@ -0,0 +1,66 @@ + + + + We're sorry, but something went wrong (500) + + + + + + +
+
+

We're sorry, but something went wrong.

+
+

If you are the application owner check the logs for more information.

+
+ + diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/public/apple-touch-icon-precomposed.png b/lib-injection/build/docker/ruby/lib_injection_rails80_app/public/apple-touch-icon-precomposed.png new file mode 100644 index 00000000000..e69de29bb2d diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/public/apple-touch-icon.png b/lib-injection/build/docker/ruby/lib_injection_rails80_app/public/apple-touch-icon.png new file mode 100644 index 00000000000..e69de29bb2d diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/public/favicon.ico b/lib-injection/build/docker/ruby/lib_injection_rails80_app/public/favicon.ico new file mode 100644 index 00000000000..e69de29bb2d diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/public/robots.txt b/lib-injection/build/docker/ruby/lib_injection_rails80_app/public/robots.txt new file mode 100644 index 00000000000..c19f78ab683 --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/public/robots.txt @@ -0,0 +1 @@ +# See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/test/controllers/.keep b/lib-injection/build/docker/ruby/lib_injection_rails80_app/test/controllers/.keep new file mode 100644 index 00000000000..e69de29bb2d diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/test/fixtures/files/.keep b/lib-injection/build/docker/ruby/lib_injection_rails80_app/test/fixtures/files/.keep new file mode 100644 index 00000000000..e69de29bb2d diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/test/helpers/.keep b/lib-injection/build/docker/ruby/lib_injection_rails80_app/test/helpers/.keep new file mode 100644 index 00000000000..e69de29bb2d diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/test/integration/.keep b/lib-injection/build/docker/ruby/lib_injection_rails80_app/test/integration/.keep new file mode 100644 index 00000000000..e69de29bb2d diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/test/models/.keep b/lib-injection/build/docker/ruby/lib_injection_rails80_app/test/models/.keep new file mode 100644 index 00000000000..e69de29bb2d diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/test/test_helper.rb b/lib-injection/build/docker/ruby/lib_injection_rails80_app/test/test_helper.rb new file mode 100644 index 00000000000..d713e377c94 --- /dev/null +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/test/test_helper.rb @@ -0,0 +1,13 @@ +ENV["RAILS_ENV"] ||= "test" +require_relative "../config/environment" +require "rails/test_help" + +class ActiveSupport::TestCase + # Run tests in parallel with specified workers + parallelize(workers: :number_of_processors) + + # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. + fixtures :all + + # Add more helper methods to be used by all tests here... +end diff --git a/utils/build/ssi/base/ruby_install_runtimes.sh b/utils/build/ssi/base/ruby_install_runtimes.sh index 68cbd764a9e..93910fdaa8d 100755 --- a/utils/build/ssi/base/ruby_install_runtimes.sh +++ b/utils/build/ssi/base/ruby_install_runtimes.sh @@ -100,6 +100,6 @@ case "$RB_VERSION" in gem update --system '3.7.2' ;; 4.0.*) - gem update --system '3.7.2' + gem update --system '4.0.14' ;; esac diff --git a/utils/build/ssi/ruby/rails8-app-deployment-mode.Dockerfile b/utils/build/ssi/ruby/rails8-app-deployment-mode.Dockerfile new file mode 100644 index 00000000000..858f768215e --- /dev/null +++ b/utils/build/ssi/ruby/rails8-app-deployment-mode.Dockerfile @@ -0,0 +1,18 @@ +ARG BASE_IMAGE + +FROM ${BASE_IMAGE} +WORKDIR /app + +ENV RAILS_ENV="production" +ENV SECRET_KEY_BASE="1234567890abcdef" +ENV RAILS_LOG_TO_STDOUT="1" +ENV RAILS_SERVE_STATIC_FILES="1" + +COPY lib-injection/build/docker/ruby/lib_injection_rails80_app/ . +RUN rm -vf .ruby-version +ENV HOME /root +ENV RBENV_ROOT $HOME/.rbenv +ENV PATH $RBENV_ROOT/shims:$RBENV_ROOT/bin:$PATH +RUN env DD_APM_INSTRUMENTATION_DEBUG=false sh -c 'bundle lock --update && bundle config set --local deployment true && bundle install && rbenv rehash' +EXPOSE 18080 +CMD bin/rails server -b 0.0.0.0 -p 18080 diff --git a/utils/build/ssi/ruby/rails8-app-vendored-mode.Dockerfile b/utils/build/ssi/ruby/rails8-app-vendored-mode.Dockerfile new file mode 100644 index 00000000000..3654602550e --- /dev/null +++ b/utils/build/ssi/ruby/rails8-app-vendored-mode.Dockerfile @@ -0,0 +1,19 @@ +ARG BASE_IMAGE + +FROM ${BASE_IMAGE} +WORKDIR /app + +ENV RAILS_ENV="production" +ENV SECRET_KEY_BASE="1234567890abcdef" +ENV RAILS_LOG_TO_STDOUT="1" +ENV RAILS_SERVE_STATIC_FILES="1" + +COPY lib-injection/build/docker/ruby/lib_injection_rails80_app/ . +RUN rm -vf .ruby-version +ENV HOME /root +ENV RBENV_ROOT $HOME/.rbenv +ENV PATH $RBENV_ROOT/shims:$RBENV_ROOT/bin:$PATH +ENV BUNDLE_PATH=/bundle +RUN env DD_APM_INSTRUMENTATION_DEBUG=false bundle install && rbenv rehash +EXPOSE 18080 +CMD bin/rails server -b 0.0.0.0 -p 18080 diff --git a/utils/build/ssi/ruby/rails8-app.Dockerfile b/utils/build/ssi/ruby/rails8-app.Dockerfile new file mode 100644 index 00000000000..66554720ba9 --- /dev/null +++ b/utils/build/ssi/ruby/rails8-app.Dockerfile @@ -0,0 +1,18 @@ +ARG BASE_IMAGE + +FROM ${BASE_IMAGE} +WORKDIR /app + +ENV RAILS_ENV="production" +ENV SECRET_KEY_BASE="1234567890abcdef" +ENV RAILS_LOG_TO_STDOUT="1" +ENV RAILS_SERVE_STATIC_FILES="1" + +COPY lib-injection/build/docker/ruby/lib_injection_rails80_app/ . +RUN rm -vf .ruby-version +ENV HOME /root +ENV RBENV_ROOT $HOME/.rbenv +ENV PATH $RBENV_ROOT/shims:$RBENV_ROOT/bin:$PATH +RUN env DD_APM_INSTRUMENTATION_DEBUG=false bundle install && rbenv rehash +EXPOSE 18080 +CMD bin/rails server -b 0.0.0.0 -p 18080 diff --git a/utils/docker_ssi/docker_ssi_runtimes.json b/utils/docker_ssi/docker_ssi_runtimes.json index 622bbf4a202..1ba32aec859 100644 --- a/utils/docker_ssi/docker_ssi_runtimes.json +++ b/utils/docker_ssi/docker_ssi_runtimes.json @@ -176,6 +176,10 @@ { "version_id": "RB34", "version": "3.4.7" + }, + { + "version_id": "RB40", + "version": "4.0.1" } ], "dotnet": [ @@ -193,4 +197,4 @@ } ] } -} \ No newline at end of file +} diff --git a/utils/scripts/ci_orchestrators/docker_ssi.json b/utils/scripts/ci_orchestrators/docker_ssi.json index b2c32fe7e91..b210d0cd730 100644 --- a/utils/scripts/ci_orchestrators/docker_ssi.json +++ b/utils/scripts/ci_orchestrators/docker_ssi.json @@ -18,6 +18,9 @@ "rails6-app-deployment-mode", "rails6-app-vendored-mode", "rails6-app", + "rails8-app-deployment-mode", + "rails8-app-vendored-mode", + "rails8-app", "ruby-app-deployment-mode", "ruby-app-vendored-mode", "ruby-app" @@ -45,6 +48,7 @@ ], "ruby": [ "rails6-app", + "rails8-app", "ruby-app" ], "python": [ @@ -61,6 +65,7 @@ { "ruby": [ "rails6-app", + "rails8-app", "ruby-app" ], "java": [ @@ -321,6 +326,57 @@ ] } ] + }, + { + "name": "rails8-app-deployment-mode", + "supported_images": [ + { + "name": "Ubuntu_22_arm64", + "allowed_runtime_versions": [ + "RB40" + ] + }, + { + "name": "Ubuntu_22_amd64", + "allowed_runtime_versions": [ + "RB40" + ] + } + ] + }, + { + "name": "rails8-app-vendored-mode", + "supported_images": [ + { + "name": "Ubuntu_22_arm64", + "allowed_runtime_versions": [ + "RB40" + ] + }, + { + "name": "Ubuntu_22_amd64", + "allowed_runtime_versions": [ + "RB40" + ] + } + ] + }, + { + "name": "rails8-app", + "supported_images": [ + { + "name": "Ubuntu_22_arm64", + "allowed_runtime_versions": [ + "RB40" + ] + }, + { + "name": "Ubuntu_22_amd64", + "allowed_runtime_versions": [ + "RB40" + ] + } + ] } ], "python": [ From e591e675491c258d1289325d1d2cf7f61db07ea9 Mon Sep 17 00:00:00 2001 From: Loic Nageleisen Date: Fri, 3 Jul 2026 09:42:24 +0200 Subject: [PATCH 2/2] Fix RB40 runtime to Ruby 4.0.5 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The RB40 runtime used Ruby 4.0.1, which ruby-build (used by the SSI base image via rbenv) does not provide — only 4.0.5 — so base image builds failed. The docker_ssi scenario also rejected 4.0.1 because RubyRuntimeInstallableVersions had no RB40 entry. - docker_ssi_runtimes.json: RB40 -> 4.0.5. - docker_ssi_definitions.py: add the RB40 installable version (4.0.5). - lib_injection_rails80_app/.ruby-version: 4.0.5 for consistency (the SSI Dockerfiles strip it, but keep it aligned with the runtime). --- .../build/docker/ruby/lib_injection_rails80_app/.ruby-version | 2 +- utils/docker_ssi/docker_ssi_definitions.py | 2 ++ utils/docker_ssi/docker_ssi_runtimes.json | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib-injection/build/docker/ruby/lib_injection_rails80_app/.ruby-version b/lib-injection/build/docker/ruby/lib_injection_rails80_app/.ruby-version index 1454f6ed4b7..7636e75650d 100644 --- a/lib-injection/build/docker/ruby/lib_injection_rails80_app/.ruby-version +++ b/lib-injection/build/docker/ruby/lib_injection_rails80_app/.ruby-version @@ -1 +1 @@ -4.0.1 +4.0.5 diff --git a/utils/docker_ssi/docker_ssi_definitions.py b/utils/docker_ssi/docker_ssi_definitions.py index daffda22c5b..76b564ded44 100644 --- a/utils/docker_ssi/docker_ssi_definitions.py +++ b/utils/docker_ssi/docker_ssi_definitions.py @@ -181,6 +181,7 @@ class RubyRuntimeInstallableVersions: RB32 = RuntimeInstallableVersion("RB32", "3.2.9") RB33 = RuntimeInstallableVersion("RB33", "3.3.9") RB34 = RuntimeInstallableVersion("RB34", "3.4.7") + RB40 = RuntimeInstallableVersion("RB40", "4.0.5") @staticmethod def get_all_versions() -> list["RuntimeInstallableVersion"]: @@ -192,6 +193,7 @@ def get_all_versions() -> list["RuntimeInstallableVersion"]: RubyRuntimeInstallableVersions.RB32, RubyRuntimeInstallableVersions.RB33, RubyRuntimeInstallableVersions.RB34, + RubyRuntimeInstallableVersions.RB40, ] @staticmethod diff --git a/utils/docker_ssi/docker_ssi_runtimes.json b/utils/docker_ssi/docker_ssi_runtimes.json index 1ba32aec859..4cb7fc8bcac 100644 --- a/utils/docker_ssi/docker_ssi_runtimes.json +++ b/utils/docker_ssi/docker_ssi_runtimes.json @@ -179,7 +179,7 @@ }, { "version_id": "RB40", - "version": "4.0.1" + "version": "4.0.5" } ], "dotnet": [