From b443161420b9be012765b8419808860ad07ceb63 Mon Sep 17 00:00:00 2001 From: "Marco (Polo) Ornelas" Date: Wed, 18 Mar 2026 14:25:27 -0400 Subject: [PATCH 01/10] ruby,rails, mongoid upgrade --- .docker/development/Dockerfile | 2 +- .docker/production/Dockerfile | 2 +- .docker/production/Dockerfile.gha | 6 +- .github/workflows/build_and_deploy.yml | 2 +- .github/workflows/ruby.yml | 6 +- .ruby-version | 2 +- Gemfile | 12 +- Gemfile.lock | 201 +++++++++++++------------ config/application.rb | 2 +- config/mongoid.yml | 14 +- config/routes.rb | 2 +- docker-compose.yml | 6 +- spec/rails_helper.rb | 4 +- 13 files changed, 131 insertions(+), 130 deletions(-) diff --git a/.docker/development/Dockerfile b/.docker/development/Dockerfile index 733b61b..54f9429 100644 --- a/.docker/development/Dockerfile +++ b/.docker/development/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.2.5 AS cartafact_base +FROM ruby:3.4.9 AS cartafact_base ENV HOME /cartafact diff --git a/.docker/production/Dockerfile b/.docker/production/Dockerfile index a21066b..a019cf3 100644 --- a/.docker/production/Dockerfile +++ b/.docker/production/Dockerfile @@ -2,7 +2,7 @@ ### app config ### ######################## -FROM ruby:3.2.5 AS app +FROM ruby:3.4.9 AS app ENV HOME /cartafact diff --git a/.docker/production/Dockerfile.gha b/.docker/production/Dockerfile.gha index 2c77731..aa14257 100644 --- a/.docker/production/Dockerfile.gha +++ b/.docker/production/Dockerfile.gha @@ -3,14 +3,14 @@ ############################################ # Taken from .ruby-version -ARG RUBY_VERSION=3.2.5 +ARG RUBY_VERSION=3.4.9 FROM ruby:$RUBY_VERSION-slim-bookworm AS base LABEL author="DCHBX" ARG DEBIAN_FRONTEND=noninteractive # Taken from Gemfile.lock -ARG BUNDLER_VERSION=2.4.19 +ARG BUNDLER_VERSION=2.6.9 ENV BUNDLER_VERSION=$BUNDLER_VERSION ARG NODE_MAJOR=20 @@ -64,7 +64,7 @@ ENV HOME=/cartafact ENV PATH=$HOME/bin:$BUNDLE_BIN:$GEM_HOME/gems/bin:$PATH # rubygems-update > 3.4.22 requires ruby >= 3.0.0 -RUN gem update --system 3.4.22\ +RUN gem update --system \ && rm -f /usr/local/bin/ruby/gems/*/specifications/default/bundler-*.gemspec \ && gem install bundler -v $BUNDLER_VERSION diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index 1841ade..4c0b844 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -49,7 +49,7 @@ jobs: runs-on: ubuntu-latest services: mongo: - image: mongo:4.2 + image: mongo:5.0 ports: - 27017:27017 options: >- diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 543a7e9..2b3e580 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -13,11 +13,11 @@ jobs: - name: Launch MongoDB uses: wbari/start-mongoDB@v0.2 with: - mongoDBVersion: 3.6 - - name: Set up Ruby 3.2.5 + mongoDBVersion: 5.0 + - name: Set up Ruby 3.4.9 uses: ruby/setup-ruby@v1 with: - ruby-version: 3.2.5 + ruby-version: 3.4.9 - name: Cache Gems uses: actions/cache@v4 with: diff --git a/.ruby-version b/.ruby-version index ac55709..a3808a4 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -ruby-3.2.5 +ruby-3.4.8 diff --git a/Gemfile b/Gemfile index 0f0b1e5..87175dd 100644 --- a/Gemfile +++ b/Gemfile @@ -3,11 +3,11 @@ source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } -ruby '3.2.5' +ruby '3.4.8' # NOTE: Update to 3.4.9 when available in rbenv -gem 'rails', '~> 7.2.0' +gem 'rails', '~> 8.0' -gem 'mongoid', '~> 8.1.5' +gem 'mongoid', '~> 9.0' # Use Puma as the app server gem 'puma', '~> 6.0' # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder @@ -47,7 +47,7 @@ gem 'dry-container', '~> 0.7' gem 'dry-auto_inject', '~> 0.6' gem 'dry-transaction', '~> 0.13' gem 'dry-initializer', '~> 3.0' -gem 'jwt', '~> 2.2.1' +gem 'jwt', '~> 2.9' group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console @@ -56,8 +56,8 @@ group :development, :test do gem 'shoulda-matchers' gem 'yard' gem 'climate_control' - gem 'factory_bot_rails', '~> 4.11' - gem 'database_cleaner', '~> 1.7' + gem 'factory_bot_rails', '~> 6.4' + gem 'database_cleaner-mongoid', '~> 2.0' gem 'pry-byebug' end diff --git a/Gemfile.lock b/Gemfile.lock index 5163669..2db2f44 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -20,79 +20,80 @@ GIT GEM remote: https://rubygems.org/ specs: - actioncable (7.2.3) - actionpack (= 7.2.3) - activesupport (= 7.2.3) + action_text-trix (2.1.17) + railties + actioncable (8.1.2) + actionpack (= 8.1.2) + activesupport (= 8.1.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (7.2.3) - actionpack (= 7.2.3) - activejob (= 7.2.3) - activerecord (= 7.2.3) - activestorage (= 7.2.3) - activesupport (= 7.2.3) + actionmailbox (8.1.2) + actionpack (= 8.1.2) + activejob (= 8.1.2) + activerecord (= 8.1.2) + activestorage (= 8.1.2) + activesupport (= 8.1.2) mail (>= 2.8.0) - actionmailer (7.2.3) - actionpack (= 7.2.3) - actionview (= 7.2.3) - activejob (= 7.2.3) - activesupport (= 7.2.3) + actionmailer (8.1.2) + actionpack (= 8.1.2) + actionview (= 8.1.2) + activejob (= 8.1.2) + activesupport (= 8.1.2) mail (>= 2.8.0) rails-dom-testing (~> 2.2) - actionpack (7.2.3) - actionview (= 7.2.3) - activesupport (= 7.2.3) - cgi + actionpack (8.1.2) + actionview (= 8.1.2) + activesupport (= 8.1.2) nokogiri (>= 1.8.5) - racc - rack (>= 2.2.4, < 3.3) + 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 (7.2.3) - actionpack (= 7.2.3) - activerecord (= 7.2.3) - activestorage (= 7.2.3) - activesupport (= 7.2.3) + actiontext (8.1.2) + action_text-trix (~> 2.1.15) + actionpack (= 8.1.2) + activerecord (= 8.1.2) + activestorage (= 8.1.2) + activesupport (= 8.1.2) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.2.3) - activesupport (= 7.2.3) + actionview (8.1.2) + activesupport (= 8.1.2) builder (~> 3.1) - cgi erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activejob (7.2.3) - activesupport (= 7.2.3) + activejob (8.1.2) + activesupport (= 8.1.2) globalid (>= 0.3.6) - activemodel (7.2.3) - activesupport (= 7.2.3) - activerecord (7.2.3) - activemodel (= 7.2.3) - activesupport (= 7.2.3) + activemodel (8.1.2) + activesupport (= 8.1.2) + activerecord (8.1.2) + activemodel (= 8.1.2) + activesupport (= 8.1.2) timeout (>= 0.4.0) - activestorage (7.2.3) - actionpack (= 7.2.3) - activejob (= 7.2.3) - activerecord (= 7.2.3) - activesupport (= 7.2.3) + activestorage (8.1.2) + actionpack (= 8.1.2) + activejob (= 8.1.2) + activerecord (= 8.1.2) + activesupport (= 8.1.2) marcel (~> 1.0) - activesupport (7.2.3) + activesupport (8.1.2) base64 - benchmark (>= 0.3) bigdecimal concurrent-ruby (~> 1.0, >= 1.3.1) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) + json logger (>= 1.4.2) minitest (>= 5.1) securerandom (>= 0.3) tzinfo (~> 2.0, >= 2.0.5) + uri (>= 0.13.1) addressable (2.8.8) public_suffix (>= 2.0.2, < 8.0) ast (2.4.3) @@ -116,22 +117,24 @@ GEM aws-sigv4 (1.12.1) aws-eventstream (~> 1, >= 1.0.2) base64 (0.3.0) - benchmark (0.5.0) bigdecimal (4.0.1) bindex (0.8.1) - bootsnap (1.21.1) + bootsnap (1.23.0) msgpack (~> 1.2) bson (5.2.0) builder (3.3.0) - byebug (12.0.0) - cgi (0.5.1) + byebug (13.0.0) + reline (>= 0.6.0) climate_control (1.2.0) coderay (1.1.3) concurrent-ruby (1.3.6) connection_pool (3.0.2) content_disposition (1.0.0) crass (1.0.6) - database_cleaner (1.99.0) + database_cleaner-core (2.0.1) + database_cleaner-mongoid (2.0.1) + database_cleaner-core (~> 2.0.0) + mongoid date (3.5.1) deep_merge (1.2.2) diff-lcs (1.6.2) @@ -205,14 +208,14 @@ GEM zeitwerk (~> 2.6) erb (6.0.1) erubi (1.13.1) - factory_bot (4.11.1) - activesupport (>= 3.0.0) - factory_bot_rails (4.11.1) - factory_bot (~> 4.11.1) - railties (>= 3.0.0) + factory_bot (6.5.6) + activesupport (>= 6.1.0) + factory_bot_rails (6.5.1) + factory_bot (~> 6.5) + railties (>= 6.1.0) fast_jsonapi (1.5) activesupport (>= 4.2) - ffi (1.17.3) + ffi (1.17.3-arm64-darwin) globalid (1.3.0) activesupport (>= 6.1) i18n (1.14.8) @@ -225,7 +228,11 @@ GEM reline (>= 0.4.2) jmespath (1.6.2) json (2.18.0) - jwt (2.2.3) + json-schema (6.2.0) + addressable (~> 2.8) + bigdecimal (>= 3.1, < 5) + jwt (2.10.2) + base64 language_server-protocol (3.17.0.5) lint_roller (1.1.0) listen (3.10.0) @@ -243,25 +250,25 @@ GEM net-pop net-smtp marcel (1.1.0) + mcp (0.8.0) + json-schema (>= 4.1) method_source (1.1.0) mime-types (3.7.0) logger mime-types-data (~> 3.2025, >= 3.2025.0507) mime-types-data (3.2026.0113) mini_mime (1.1.5) - mini_portile2 (2.8.9) minitest (6.0.1) prism (~> 1.5) - mongo (2.22.0) + mongo (2.23.0) base64 bson (>= 4.14.1, < 6.0.0) - mongoid (8.1.11) - activemodel (>= 5.1, < 8.1, != 7.0.0) + mongoid (9.0.10) + activemodel (>= 5.1, < 8.2, != 7.0.0) concurrent-ruby (>= 1.0.5, < 2.0) mongo (>= 2.18.0, < 3.0.0) - ruby2_keywords (~> 0.0.5) msgpack (1.8.0) - net-imap (0.6.2) + net-imap (0.6.3) date net-protocol net-pop (0.1.2) @@ -271,8 +278,7 @@ GEM net-smtp (0.5.1) net-protocol nio4r (2.7.5) - nokogiri (1.19.0) - mini_portile2 (~> 2.8.2) + nokogiri (1.19.1-arm64-darwin) racc (~> 1.4) ox (2.14.23) bigdecimal (>= 3.0) @@ -287,9 +293,9 @@ GEM pry (0.15.2) coderay (~> 1.1) method_source (~> 1.0) - pry-byebug (3.11.0) - byebug (~> 12.0) - pry (>= 0.13, < 0.16) + pry-byebug (3.12.0) + byebug (~> 13.0) + pry (>= 0.13, < 0.17) psych (5.3.1) date stringio @@ -297,7 +303,7 @@ GEM puma (6.6.1) nio4r (~> 2.0) racc (1.8.1) - rack (3.2.4) + rack (3.2.5) rack-cors (3.0.0) logger rack (>= 3.0.14) @@ -308,20 +314,20 @@ GEM rack (>= 1.3) rackup (2.3.1) rack (>= 3) - rails (7.2.3) - actioncable (= 7.2.3) - actionmailbox (= 7.2.3) - actionmailer (= 7.2.3) - actionpack (= 7.2.3) - actiontext (= 7.2.3) - actionview (= 7.2.3) - activejob (= 7.2.3) - activemodel (= 7.2.3) - activerecord (= 7.2.3) - activestorage (= 7.2.3) - activesupport (= 7.2.3) + rails (8.1.2) + actioncable (= 8.1.2) + actionmailbox (= 8.1.2) + actionmailer (= 8.1.2) + actionpack (= 8.1.2) + actiontext (= 8.1.2) + actionview (= 8.1.2) + activejob (= 8.1.2) + activemodel (= 8.1.2) + activerecord (= 8.1.2) + activestorage (= 8.1.2) + activesupport (= 8.1.2) bundler (>= 1.15.0) - railties (= 7.2.3) + railties (= 8.1.2) rails-dom-testing (2.3.0) activesupport (>= 5.0.0) minitest @@ -329,10 +335,9 @@ GEM rails-html-sanitizer (1.6.2) loofah (~> 2.21) 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 (7.2.3) - actionpack (= 7.2.3) - activesupport (= 7.2.3) - cgi + railties (8.1.2) + actionpack (= 8.1.2) + activesupport (= 8.1.2) irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) @@ -368,15 +373,16 @@ GEM rspec-mocks (~> 3.13) rspec-support (~> 3.13) rspec-support (3.13.6) - rubocop (1.82.1) + rubocop (1.85.1) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) + mcp (~> 0.6) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.9.3, < 3.0) - rubocop-ast (>= 1.48.0, < 2.0) + rubocop-ast (>= 1.49.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) rubocop-ast (1.49.0) @@ -388,7 +394,6 @@ GEM lint_roller (~> 1.1) rubocop (~> 1.81) ruby-progressbar (1.13.0) - ruby2_keywords (0.0.5) securerandom (0.4.1) shoulda-matchers (7.0.1) activesupport (>= 7.1) @@ -400,19 +405,19 @@ GEM shrine (>= 3.0.0.beta3, < 4) stringio (3.2.0) thor (1.5.0) - timeout (0.6.0) + timeout (0.6.1) tsort (0.2.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (3.2.0) unicode-emoji (~> 4.1) unicode-emoji (4.2.0) + uri (1.1.1) useragent (0.16.11) - web-console (4.2.1) - actionview (>= 6.0.0) - activemodel (>= 6.0.0) + web-console (4.3.0) + actionview (>= 8.0.0) bindex (>= 0.4.0) - railties (>= 6.0.0) + railties (>= 8.0.0) websocket-driver (0.8.0) base64 websocket-extensions (>= 0.1.0) @@ -421,14 +426,14 @@ GEM zeitwerk (2.7.4) PLATFORMS - ruby + arm64-darwin-25 DEPENDENCIES aws-sdk-s3 (~> 1.14) bootsnap (>= 1.4.2) byebug climate_control - database_cleaner (~> 1.7) + database_cleaner-mongoid (~> 2.0) dry-auto_inject (~> 0.6) dry-container (~> 0.7) dry-core (~> 0.4) @@ -442,15 +447,15 @@ DEPENDENCIES dry-transaction (~> 0.13) dry-types (~> 1.2) dry-validation (~> 1.2) - factory_bot_rails (~> 4.11) + factory_bot_rails (~> 6.4) fast_jsonapi - jwt (~> 2.2.1) + jwt (~> 2.9) listen (~> 3.3) - mongoid (~> 8.1.5) + mongoid (~> 9.0) pry-byebug puma (~> 6.0) rack-cors - rails (~> 7.2.0) + rails (~> 8.0) resource_registry! rspec-rails (~> 7.0) rubocop @@ -462,7 +467,7 @@ DEPENDENCIES yard RUBY VERSION - ruby 3.2.5p208 + ruby 3.4.8p72 BUNDLED WITH 2.4.19 diff --git a/config/application.rb b/config/application.rb index d327487..c02a9ae 100644 --- a/config/application.rb +++ b/config/application.rb @@ -23,7 +23,7 @@ module App class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. - config.load_defaults 7.1 + config.load_defaults 8.0 # Settings in config/environments/* take precedence over those specified here. # Application configuration can go into files in config/initializers diff --git a/config/mongoid.yml b/config/mongoid.yml index c76178b..d79d60f 100644 --- a/config/mongoid.yml +++ b/config/mongoid.yml @@ -20,11 +20,11 @@ development: # to master. (default: primary) # read: secondary_preferred - # How many times Moped should attempt to retry an operation after + # How many times the driver should attempt to retry an operation after # failure. (default: The number of nodes in the cluster) # max_retries: 20 - # The time in seconds that Moped should wait before retrying an + # The time in seconds that the driver should wait before retrying an # operation on failure. (default: 0.25) # retry_interval: 0.25 @@ -77,20 +77,16 @@ production: default: database: cartafact_production hosts: - - <%= ENV['CARTAFACT_DB_HOST'] %>:<%= ENV['CARTAFACT_DB_PORT'] %> + - <%= ENV.fetch('CARTAFACT_DB_HOST', 'localhost') %>:<%= ENV.fetch('CARTAFACT_DB_PORT', '27017') %> options: - <% if ENV['CARTAFACT_DB_AUTH'] == true %> +<% if ENV['CARTAFACT_DB_AUTH'] == true %> replica_set: <%= ENV['CARTAFACT_DB_REPLICA_SET_NAME'] %> - user: <%= ENV['CARTAFACT_DB_USERNAME'] %> password: <%= ENV['CARTAFACT_DB_PASSWORD'] %> auth_source: admin - write: w: 1 j: true - <% end %> - # In the test environment we lower the retries and retry interval to - # low amounts for fast failures. +<% end %> max_retries: 1 retry_interval: 0 diff --git a/config/routes.rb b/config/routes.rb index c3f9696..9880e2f 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -5,7 +5,7 @@ namespace :api do namespace :v1 do - resources :documents, only: [:index, :show, :create, :copy] do + resources :documents, only: [:index, :show, :create] do member do get :download get :copy diff --git a/docker-compose.yml b/docker-compose.yml index b7b9f69..450cd70 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,8 +6,8 @@ services: context: . dockerfile: ./.docker/development/Dockerfile args: - RUBY_VERSION: '3.2.5' - BUNDLER_VERSION: '2.4.19' + RUBY_VERSION: '3.4.9' + BUNDLER_VERSION: '2.6.9' image: cartafact-dev:0.1.0 volumes: - .:/app:cached @@ -27,7 +27,7 @@ services: - DB_PORT=${DB_PORT:-27017} db: - image: mongo:4.2 + image: mongo:5.0 volumes: - mongodb:/data/db - mongodb_config:/data/configdb diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index a4f0316..265cc75 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -63,10 +63,10 @@ config.filter_rails_from_backtrace! # arbitrary gems may also be filtered via: # config.filter_gems_from_backtrace("gem name") - DatabaseCleaner.strategy = :truncation + DatabaseCleaner[:mongoid].strategy = :deletion config.around(:each) do |example| - DatabaseCleaner.cleaning do + DatabaseCleaner[:mongoid].cleaning do example.run end end From 077d28522b465297d29367d6c965dd88e11e17d1 Mon Sep 17 00:00:00 2001 From: "Marco (Polo) Ornelas" Date: Wed, 18 Mar 2026 15:03:20 -0400 Subject: [PATCH 02/10] switch unmantained jsonapi-serializer --- Gemfile | 2 +- Gemfile.lock | 6 +++--- app/serializers/document_serializer.rb | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index 87175dd..86de4a9 100644 --- a/Gemfile +++ b/Gemfile @@ -30,7 +30,7 @@ gem "aws-sdk-s3", "~> 1.14" # Settings, validation and dependency injection # TODO: Use tagged release for resource_registry instead of branch gem 'resource_registry', git: 'https://github.com/ideacrew/resource_registry.git', tag: 'v0.10.1' -gem 'fast_jsonapi' +gem 'jsonapi-serializer' gem 'shrine-mongoid', '~> 1.0' diff --git a/Gemfile.lock b/Gemfile.lock index 2db2f44..e991568 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -213,8 +213,6 @@ GEM factory_bot_rails (6.5.1) factory_bot (~> 6.5) railties (>= 6.1.0) - fast_jsonapi (1.5) - activesupport (>= 4.2) ffi (1.17.3-arm64-darwin) globalid (1.3.0) activesupport (>= 6.1) @@ -231,6 +229,8 @@ GEM json-schema (6.2.0) addressable (~> 2.8) bigdecimal (>= 3.1, < 5) + jsonapi-serializer (2.2.0) + activesupport (>= 4.2) jwt (2.10.2) base64 language_server-protocol (3.17.0.5) @@ -448,7 +448,7 @@ DEPENDENCIES dry-types (~> 1.2) dry-validation (~> 1.2) factory_bot_rails (~> 6.4) - fast_jsonapi + jsonapi-serializer jwt (~> 2.9) listen (~> 3.3) mongoid (~> 9.0) diff --git a/app/serializers/document_serializer.rb b/app/serializers/document_serializer.rb index 8a5895e..b71b967 100644 --- a/app/serializers/document_serializer.rb +++ b/app/serializers/document_serializer.rb @@ -2,7 +2,7 @@ # Serializes a represented document for JSON resource format. class DocumentSerializer - include FastJsonapi::ObjectSerializer + include JSONAPI::Serializer attributes :title, :creator, :identifier, :description, :language, :format, :source, :date, :creator From 39076f1a359a502697f79840e6d19a850b50605c Mon Sep 17 00:00:00 2001 From: "Marco (Polo) Ornelas" Date: Thu, 19 Mar 2026 11:54:15 -0400 Subject: [PATCH 03/10] set all to 3.4.8 --- .docker/development/Dockerfile | 2 +- .docker/production/Dockerfile | 2 +- .docker/production/Dockerfile.gha | 2 +- .github/workflows/ruby.yml | 4 ++-- Gemfile | 2 +- docker-compose.yml | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.docker/development/Dockerfile b/.docker/development/Dockerfile index 54f9429..9b69a7e 100644 --- a/.docker/development/Dockerfile +++ b/.docker/development/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.4.9 AS cartafact_base +FROM ruby:3.4.8 AS cartafact_base ENV HOME /cartafact diff --git a/.docker/production/Dockerfile b/.docker/production/Dockerfile index a019cf3..8dc41d9 100644 --- a/.docker/production/Dockerfile +++ b/.docker/production/Dockerfile @@ -2,7 +2,7 @@ ### app config ### ######################## -FROM ruby:3.4.9 AS app +FROM ruby:3.4.8 AS app ENV HOME /cartafact diff --git a/.docker/production/Dockerfile.gha b/.docker/production/Dockerfile.gha index aa14257..d9ad57e 100644 --- a/.docker/production/Dockerfile.gha +++ b/.docker/production/Dockerfile.gha @@ -3,7 +3,7 @@ ############################################ # Taken from .ruby-version -ARG RUBY_VERSION=3.4.9 +ARG RUBY_VERSION=3.4.8 FROM ruby:$RUBY_VERSION-slim-bookworm AS base LABEL author="DCHBX" diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 2b3e580..2b32523 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -14,10 +14,10 @@ jobs: uses: wbari/start-mongoDB@v0.2 with: mongoDBVersion: 5.0 - - name: Set up Ruby 3.4.9 + - name: Set up Ruby 3.4.8 uses: ruby/setup-ruby@v1 with: - ruby-version: 3.4.9 + ruby-version: 3.4.8 - name: Cache Gems uses: actions/cache@v4 with: diff --git a/Gemfile b/Gemfile index 86de4a9..ca48f11 100644 --- a/Gemfile +++ b/Gemfile @@ -3,7 +3,7 @@ source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } -ruby '3.4.8' # NOTE: Update to 3.4.9 when available in rbenv +ruby '3.4.8' gem 'rails', '~> 8.0' diff --git a/docker-compose.yml b/docker-compose.yml index 450cd70..5bc93cd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,7 +6,7 @@ services: context: . dockerfile: ./.docker/development/Dockerfile args: - RUBY_VERSION: '3.4.9' + RUBY_VERSION: '3.4.8' BUNDLER_VERSION: '2.6.9' image: cartafact-dev:0.1.0 volumes: From ca9b1b823e0abc6e63b15c296cc265796c8dd87a Mon Sep 17 00:00:00 2001 From: "Marco (Polo) Ornelas" Date: Thu, 19 Mar 2026 13:31:58 -0400 Subject: [PATCH 04/10] clean up some references to 8.0 --- Gemfile | 2 +- Gemfile.lock | 2 +- config/application.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index ca48f11..ab45d00 100644 --- a/Gemfile +++ b/Gemfile @@ -5,7 +5,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" } ruby '3.4.8' -gem 'rails', '~> 8.0' +gem 'rails', '~> 8.1' gem 'mongoid', '~> 9.0' # Use Puma as the app server diff --git a/Gemfile.lock b/Gemfile.lock index e991568..d71b3bd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -455,7 +455,7 @@ DEPENDENCIES pry-byebug puma (~> 6.0) rack-cors - rails (~> 8.0) + rails (~> 8.1) resource_registry! rspec-rails (~> 7.0) rubocop diff --git a/config/application.rb b/config/application.rb index c02a9ae..3c5c2e8 100644 --- a/config/application.rb +++ b/config/application.rb @@ -23,7 +23,7 @@ module App class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. - config.load_defaults 8.0 + config.load_defaults 8.1 # Settings in config/environments/* take precedence over those specified here. # Application configuration can go into files in config/initializers From 9dd6185e836ee0013a6f8a4fd56fcb4b3afc6f3e Mon Sep 17 00:00:00 2001 From: "Marco (Polo) Ornelas" Date: Thu, 19 Mar 2026 13:45:24 -0400 Subject: [PATCH 05/10] push ruby to 3.4.9 --- .docker/development/Dockerfile | 2 +- .docker/production/Dockerfile | 2 +- .docker/production/Dockerfile.gha | 2 +- .github/workflows/ruby.yml | 4 ++-- .ruby-version | 2 +- Gemfile | 2 +- Gemfile.lock | 2 +- docker-compose.yml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.docker/development/Dockerfile b/.docker/development/Dockerfile index 9b69a7e..54f9429 100644 --- a/.docker/development/Dockerfile +++ b/.docker/development/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.4.8 AS cartafact_base +FROM ruby:3.4.9 AS cartafact_base ENV HOME /cartafact diff --git a/.docker/production/Dockerfile b/.docker/production/Dockerfile index 8dc41d9..a019cf3 100644 --- a/.docker/production/Dockerfile +++ b/.docker/production/Dockerfile @@ -2,7 +2,7 @@ ### app config ### ######################## -FROM ruby:3.4.8 AS app +FROM ruby:3.4.9 AS app ENV HOME /cartafact diff --git a/.docker/production/Dockerfile.gha b/.docker/production/Dockerfile.gha index d9ad57e..aa14257 100644 --- a/.docker/production/Dockerfile.gha +++ b/.docker/production/Dockerfile.gha @@ -3,7 +3,7 @@ ############################################ # Taken from .ruby-version -ARG RUBY_VERSION=3.4.8 +ARG RUBY_VERSION=3.4.9 FROM ruby:$RUBY_VERSION-slim-bookworm AS base LABEL author="DCHBX" diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 2b32523..2b3e580 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -14,10 +14,10 @@ jobs: uses: wbari/start-mongoDB@v0.2 with: mongoDBVersion: 5.0 - - name: Set up Ruby 3.4.8 + - name: Set up Ruby 3.4.9 uses: ruby/setup-ruby@v1 with: - ruby-version: 3.4.8 + ruby-version: 3.4.9 - name: Cache Gems uses: actions/cache@v4 with: diff --git a/.ruby-version b/.ruby-version index a3808a4..7bcbb38 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -ruby-3.4.8 +3.4.9 diff --git a/Gemfile b/Gemfile index ab45d00..16a4402 100644 --- a/Gemfile +++ b/Gemfile @@ -3,7 +3,7 @@ source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } -ruby '3.4.8' +ruby '3.4.9' gem 'rails', '~> 8.1' diff --git a/Gemfile.lock b/Gemfile.lock index d71b3bd..f07ac8d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -467,7 +467,7 @@ DEPENDENCIES yard RUBY VERSION - ruby 3.4.8p72 + ruby 3.4.9p82 BUNDLED WITH 2.4.19 diff --git a/docker-compose.yml b/docker-compose.yml index 5bc93cd..450cd70 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,7 +6,7 @@ services: context: . dockerfile: ./.docker/development/Dockerfile args: - RUBY_VERSION: '3.4.8' + RUBY_VERSION: '3.4.9' BUNDLER_VERSION: '2.6.9' image: cartafact-dev:0.1.0 volumes: From 9e7e7490c95cec77e0480a7ca2ea7c573acf95f5 Mon Sep 17 00:00:00 2001 From: "Marco (Polo) Ornelas" Date: Thu, 19 Mar 2026 14:45:17 -0400 Subject: [PATCH 06/10] attempt to fix psych-5.3.1 issue --- .github/workflows/ruby.yml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 2b3e580..4fee816 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -14,21 +14,13 @@ jobs: uses: wbari/start-mongoDB@v0.2 with: mongoDBVersion: 5.0 + - name: Install system dependencies + run: sudo apt-get update && sudo apt-get install -y libyaml-dev - name: Set up Ruby 3.4.9 uses: ruby/setup-ruby@v1 with: ruby-version: 3.4.9 - - name: Cache Gems - uses: actions/cache@v4 - with: - path: vendor/bundle - key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} - restore-keys: | - ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} - - name: Install Gems - run: | - bundle config path vendor/bundle - bundle install --jobs 4 --retry 3 + bundler-cache: true - name: Run RSpec run: | cp -f config/mongoid.gh_actions.yml config/mongoid.yml From 5f5b26af7af051d80906780f294c3366b310d962 Mon Sep 17 00:00:00 2001 From: "Marco (Polo) Ornelas" Date: Thu, 19 Mar 2026 14:56:02 -0400 Subject: [PATCH 07/10] second attempt to fix psych-5.3.1 issue --- .github/workflows/ruby.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 4fee816..3fc52c2 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -15,7 +15,7 @@ jobs: with: mongoDBVersion: 5.0 - name: Install system dependencies - run: sudo apt-get update && sudo apt-get install -y libyaml-dev + run: sudo apt-get update && sudo apt-get install -y libyaml-dev pkg-config - name: Set up Ruby 3.4.9 uses: ruby/setup-ruby@v1 with: From 29b9fcc74f43406438d1a8b9f84a90800f3ed5c6 Mon Sep 17 00:00:00 2001 From: "Marco (Polo) Ornelas" Date: Thu, 19 Mar 2026 15:00:31 -0400 Subject: [PATCH 08/10] rollback psych fix --- .github/workflows/ruby.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 3fc52c2..040e07a 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -14,17 +14,25 @@ jobs: uses: wbari/start-mongoDB@v0.2 with: mongoDBVersion: 5.0 - - name: Install system dependencies - run: sudo apt-get update && sudo apt-get install -y libyaml-dev pkg-config - name: Set up Ruby 3.4.9 uses: ruby/setup-ruby@v1 with: ruby-version: 3.4.9 - bundler-cache: true + - name: Cache Gems + uses: actions/cache@v4 + with: + path: vendor/bundle + key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} + restore-keys: | + ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} + - name: Install Gems + run: | + bundle config path vendor/bundle + bundle install --jobs 4 --retry 3 - name: Run RSpec run: | cp -f config/mongoid.gh_actions.yml config/mongoid.yml bundle exec rspec - name: Run Rubocop run: | - bundle exec rubocop \ No newline at end of file + bundle exec rubocop From 765241d907e7e5aec0b46f544342b508845a139e Mon Sep 17 00:00:00 2001 From: "Marco (Polo) Ornelas" Date: Thu, 19 Mar 2026 15:03:20 -0400 Subject: [PATCH 09/10] attempt to fix test GHA --- Gemfile.lock | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Gemfile.lock b/Gemfile.lock index f07ac8d..59df758 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -214,6 +214,7 @@ GEM factory_bot (~> 6.5) railties (>= 6.1.0) ffi (1.17.3-arm64-darwin) + ffi (1.17.3-x86_64-linux-gnu) globalid (1.3.0) activesupport (>= 6.1) i18n (1.14.8) @@ -280,6 +281,8 @@ GEM nio4r (2.7.5) nokogiri (1.19.1-arm64-darwin) racc (~> 1.4) + nokogiri (1.19.1-x86_64-linux-gnu) + racc (~> 1.4) ox (2.14.23) bigdecimal (>= 3.0) parallel (1.27.0) @@ -427,6 +430,7 @@ GEM PLATFORMS arm64-darwin-25 + x86_64-linux DEPENDENCIES aws-sdk-s3 (~> 1.14) From dd8d253919e0a5a14303d17d2d99d390eb5f206c Mon Sep 17 00:00:00 2001 From: "Marco (Polo) Ornelas" Date: Thu, 19 Mar 2026 15:29:08 -0400 Subject: [PATCH 10/10] 3rd attempt to fix psych --- .docker/production/Dockerfile.gha | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.docker/production/Dockerfile.gha b/.docker/production/Dockerfile.gha index aa14257..05049cd 100644 --- a/.docker/production/Dockerfile.gha +++ b/.docker/production/Dockerfile.gha @@ -44,6 +44,8 @@ RUN apt-get update \ unzip \ zip \ zlib1g \ + libyaml-dev \ + pkg-config \ libjemalloc2 \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \