From cf75d3bc70b4fd9e7ccb3d1add747c0f4d5f5231 Mon Sep 17 00:00:00 2001 From: yuenmichelle1 Date: Wed, 21 Jan 2026 15:52:22 -0600 Subject: [PATCH] Rails 7.1 on Production - update deploy_staging template to build from Dockerfile - update Dockerfile with adding libyaml version that has a compatible psych native extension used in rails 7.1 - update Gemfile and Gemfile.lock to run Rails 7.1 --- .github/workflows/deploy_staging.yml | 7 +- Dockerfile | 4 +- Gemfile | 2 +- Gemfile.lock | 194 +++++++++++++++++---------- 4 files changed, 129 insertions(+), 78 deletions(-) diff --git a/.github/workflows/deploy_staging.yml b/.github/workflows/deploy_staging.yml index 0e82f4dc..173dc3df 100644 --- a/.github/workflows/deploy_staging.yml +++ b/.github/workflows/deploy_staging.yml @@ -12,8 +12,7 @@ jobs: uses: zooniverse/ci-cd/.github/workflows/build_and_push_image.yaml@main with: repo_name: talk-api - commit_id: ${{ github.sha }}-next - file: Dockerfile.rails-next + commit_id: ${{ github.sha }} latest: true db_migration_staging: @@ -23,7 +22,7 @@ jobs: with: app_name: talk-api environment: staging - commit_id: ${{ github.sha }}-next + commit_id: ${{ github.sha }} secrets: creds: ${{ secrets.AZURE_AKS }} @@ -34,7 +33,7 @@ jobs: with: app_name: talk-api repo_name: talk-api - commit_id: ${{ github.sha }}-next + commit_id: ${{ github.sha }} environment: staging secrets: creds: ${{ secrets.AZURE_AKS }} diff --git a/Dockerfile b/Dockerfile index c3b5712d..71861074 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,9 @@ RUN --mount=type=cache,id=talk-apt-cache,target=/var/cache/apt --mount=type=cach build-essential \ git \ libpq-dev \ - tmpreaper + tmpreaper \ + libyaml-dev +# libyaml for compatible psych native extension one on rails 7.1 ARG RAILS_ENV=production diff --git a/Gemfile b/Gemfile index 00ba28c5..0e519a74 100644 --- a/Gemfile +++ b/Gemfile @@ -6,7 +6,7 @@ source 'https://rubygems.org' if next? gem 'rails', '7.1.6' else - gem 'rails', '7.0.8.7' + gem 'rails', '7.1.6' end gem 'aws-sdk-kinesis', '~> 1' diff --git a/Gemfile.lock b/Gemfile.lock index 9db9a0ee..7e33c3e1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -22,70 +22,84 @@ GIT GEM remote: https://rubygems.org/ specs: - actioncable (7.0.8.7) - actionpack (= 7.0.8.7) - activesupport (= 7.0.8.7) + actioncable (7.1.6) + actionpack (= 7.1.6) + activesupport (= 7.1.6) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.8.7) - actionpack (= 7.0.8.7) - activejob (= 7.0.8.7) - activerecord (= 7.0.8.7) - activestorage (= 7.0.8.7) - activesupport (= 7.0.8.7) + zeitwerk (~> 2.6) + actionmailbox (7.1.6) + actionpack (= 7.1.6) + activejob (= 7.1.6) + activerecord (= 7.1.6) + activestorage (= 7.1.6) + activesupport (= 7.1.6) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.8.7) - actionpack (= 7.0.8.7) - actionview (= 7.0.8.7) - activejob (= 7.0.8.7) - activesupport (= 7.0.8.7) + actionmailer (7.1.6) + actionpack (= 7.1.6) + actionview (= 7.1.6) + activejob (= 7.1.6) + activesupport (= 7.1.6) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp - rails-dom-testing (~> 2.0) - actionpack (7.0.8.7) - actionview (= 7.0.8.7) - activesupport (= 7.0.8.7) - rack (~> 2.0, >= 2.2.4) + rails-dom-testing (~> 2.2) + actionpack (7.1.6) + actionview (= 7.1.6) + activesupport (= 7.1.6) + cgi + nokogiri (>= 1.8.5) + racc + rack (>= 2.2.4) + rack-session (>= 1.0.1) rack-test (>= 0.6.3) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.8.7) - actionpack (= 7.0.8.7) - activerecord (= 7.0.8.7) - activestorage (= 7.0.8.7) - activesupport (= 7.0.8.7) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + actiontext (7.1.6) + actionpack (= 7.1.6) + activerecord (= 7.1.6) + activestorage (= 7.1.6) + activesupport (= 7.1.6) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.8.7) - activesupport (= 7.0.8.7) + actionview (7.1.6) + activesupport (= 7.1.6) builder (~> 3.1) - erubi (~> 1.4) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (7.0.8.7) - activesupport (= 7.0.8.7) + cgi + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + activejob (7.1.6) + activesupport (= 7.1.6) globalid (>= 0.3.6) - activemodel (7.0.8.7) - activesupport (= 7.0.8.7) - activerecord (7.0.8.7) - activemodel (= 7.0.8.7) - activesupport (= 7.0.8.7) - activestorage (7.0.8.7) - actionpack (= 7.0.8.7) - activejob (= 7.0.8.7) - activerecord (= 7.0.8.7) - activesupport (= 7.0.8.7) + activemodel (7.1.6) + activesupport (= 7.1.6) + activerecord (7.1.6) + activemodel (= 7.1.6) + activesupport (= 7.1.6) + timeout (>= 0.4.0) + activestorage (7.1.6) + actionpack (= 7.1.6) + activejob (= 7.1.6) + activerecord (= 7.1.6) + activesupport (= 7.1.6) marcel (~> 1.0) - mini_mime (>= 1.1.0) - activesupport (7.0.8.7) + activesupport (7.1.6) + base64 + benchmark (>= 0.3) + bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb i18n (>= 1.6, < 2) + logger (>= 1.4.2) minitest (>= 5.1) + mutex_m + securerandom (>= 0.3) tzinfo (~> 2.0) addressable (2.8.7) public_suffix (>= 2.0.2, < 7.0) @@ -110,9 +124,11 @@ GEM aws-sigv4 (1.11.0) aws-eventstream (~> 1, >= 1.0.2) base64 (0.2.0) + benchmark (0.5.0) benchmark-ips (2.14.0) bigdecimal (3.1.9) builder (3.3.0) + cgi (0.5.1) coderay (1.1.3) colorize (1.1.0) concurrent-ruby (1.3.4) @@ -124,10 +140,13 @@ GEM bigdecimal rexml crass (1.0.6) - date (3.4.1) + date (3.5.1) diff-lcs (1.6.0) docile (1.4.1) domain_name (0.6.20240107) + drb (2.2.3) + erb (4.0.4) + cgi (>= 0.3.3) erubi (1.13.1) et-orbi (1.2.11) tzinfo @@ -166,7 +185,7 @@ GEM fugit (1.11.1) et-orbi (~> 1, >= 1.2.11) raabro (~> 1.4) - globalid (1.2.1) + globalid (1.3.0) activesupport (>= 6.1) guard (2.19.1) formatador (>= 0.2.4) @@ -191,6 +210,11 @@ GEM domain_name (~> 0.5) i18n (1.14.7) concurrent-ruby (~> 1.0) + io-console (0.8.2) + irb (1.16.0) + pp (>= 0.6.0) + rdoc (>= 4.0.0) + reline (>= 0.4.2) jmespath (1.6.2) json-schema (2.8.1) addressable (>= 2.4) @@ -220,12 +244,13 @@ GEM crass (~> 1.0.2) nokogiri (>= 1.12.0) lumberjack (1.2.10) - mail (2.8.1) + mail (2.9.0) + logger mini_mime (>= 0.1.1) net-imap net-pop net-smtp - marcel (1.0.4) + marcel (1.1.0) method_source (1.1.0) mime-types (3.6.0) logger @@ -236,8 +261,9 @@ GEM minitest (5.25.5) mock_redis (0.41.0) multipart-post (2.4.1) + mutex_m (0.3.0) nenv (0.3.0) - net-imap (0.4.20) + net-imap (0.5.13) date net-protocol net-pop (0.1.2) @@ -257,9 +283,15 @@ GEM shellany (~> 0.0) ostruct (0.6.1) pg (1.5.9) + pp (0.6.3) + prettyprint + prettyprint (0.2.0) pry (0.15.2) coderay (~> 1.1) method_source (~> 1.0) + psych (5.3.1) + date + stringio public_suffix (5.1.1) puma (6.6.0) nio4r (~> 2.0) @@ -273,22 +305,27 @@ GEM rack-protection (3.2.0) base64 (>= 0.1.0) rack (~> 2.2, >= 2.2.4) + rack-session (1.0.2) + rack (< 3) rack-test (2.2.0) rack (>= 1.3) - rails (7.0.8.7) - actioncable (= 7.0.8.7) - actionmailbox (= 7.0.8.7) - actionmailer (= 7.0.8.7) - actionpack (= 7.0.8.7) - actiontext (= 7.0.8.7) - actionview (= 7.0.8.7) - activejob (= 7.0.8.7) - activemodel (= 7.0.8.7) - activerecord (= 7.0.8.7) - activestorage (= 7.0.8.7) - activesupport (= 7.0.8.7) + rackup (1.0.1) + rack (< 3) + webrick + rails (7.1.6) + actioncable (= 7.1.6) + actionmailbox (= 7.1.6) + actionmailer (= 7.1.6) + actionpack (= 7.1.6) + actiontext (= 7.1.6) + actionview (= 7.1.6) + activejob (= 7.1.6) + activemodel (= 7.1.6) + activerecord (= 7.1.6) + activestorage (= 7.1.6) + activesupport (= 7.1.6) bundler (>= 1.15.0) - railties (= 7.0.8.7) + railties (= 7.1.6) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest @@ -296,18 +333,27 @@ 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.0.8.7) - actionpack (= 7.0.8.7) - activesupport (= 7.0.8.7) - method_source + railties (7.1.6) + actionpack (= 7.1.6) + activesupport (= 7.1.6) + cgi + irb + rackup (>= 1.0.0) rake (>= 12.2) - thor (~> 1.0) - zeitwerk (~> 2.5) + thor (~> 1.0, >= 1.2.2) + tsort (>= 0.2) + zeitwerk (~> 2.6) rake (13.2.1) rb-fsevent (0.11.2) rb-inotify (0.11.1) ffi (~> 1.0) + rdoc (7.1.0) + erb + psych (>= 4.0.0) + tsort redis (3.3.5) + reline (0.6.3) + io-console (~> 0.5) request_store (1.7.0) rack (>= 1.4) rest-client (2.1.0) @@ -341,6 +387,7 @@ GEM rspec-support (~> 3.13) rspec-support (3.13.2) ruby2_keywords (0.0.5) + securerandom (0.4.1) shellany (0.0.1) sidekiq (5.2.9) connection_pool (~> 2.2, >= 2.2.2) @@ -362,6 +409,7 @@ GEM spring (4.2.1) spring-commands-rspec (1.0.4) spring (>= 0.9.1) + stringio (3.2.0) ten_years_rails (0.2.0) actionview activesupport @@ -369,14 +417,16 @@ GEM rest-client (>= 2.0.2) thor (1.3.2) timecop (0.9.10) - timeout (0.4.3) + timeout (0.6.0) + tsort (0.2.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) webmock (3.25.0) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - websocket-driver (0.7.7) + webrick (1.9.2) + websocket-driver (0.8.0) base64 websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) @@ -409,7 +459,7 @@ DEPENDENCIES puma pundit (~> 1.1.0) rack-cors (~> 1.0.5) - rails (= 7.0.8.7) + rails (= 7.1.6) redis (~> 3.3.0) restpack_serializer! rspec-its