diff --git a/.controlplane/controlplane.yml b/.controlplane/controlplane.yml index 78612cc2..557a9fa3 100644 --- a/.controlplane/controlplane.yml +++ b/.controlplane/controlplane.yml @@ -83,10 +83,10 @@ apps: <<: *common # match_if_app_name_starts_with is used to identify these "qa" apps. match_if_app_name_starts_with: true - # These review-app one-off defaults request app-sized resources and set a - # 15-minute server-side active deadline. + # Review-app one-off jobs need 2Gi to start the Rails image reliably and + # retain a 15-minute server-side active deadline. runner_job_default_cpu: "300m" - runner_job_default_memory: "1Gi" + runner_job_default_memory: "2Gi" runner_job_timeout: 900 image_retention_days: 5 stale_app_image_deployed_days: 5 # If the app is older than 5 days, the nightly automations will clean stale apps. diff --git a/.controlplane/readme.md b/.controlplane/readme.md index 99679694..7bed8fa8 100644 --- a/.controlplane/readme.md +++ b/.controlplane/readme.md @@ -593,7 +593,8 @@ renderer first, wait for it to become healthy, and then deploy `rails` plus The renderer workload uses the same application image as Rails, runs `react_on_rails_pro:pre_seed_renderer_cache` at container boot, and then starts -`yarn node-renderer`. Rails gets `RENDERER_URL` from +`node renderer/node-renderer.js`. Its non-login `bash -c` command preserves the +Dockerfile's Node `PATH` during boot. Rails gets `RENDERER_URL` from `.controlplane/templates/app.yml` and reaches the renderer at `http://node-renderer..cpln.local:3800`. diff --git a/.controlplane/shakacode-team.md b/.controlplane/shakacode-team.md index ab884ea9..7d0f695e 100644 --- a/.controlplane/shakacode-team.md +++ b/.controlplane/shakacode-team.md @@ -6,7 +6,7 @@ Deployments are handled by Control Plane configuration in this repo and GitHub A ### Renderer Workload - `node-renderer` is an app workload and deploys before `rails` through `deploy_order`. -- `node-renderer` runs the React on Rails Pro boot seed before `yarn node-renderer` so the new renderer cache is warm before Rails rolls. +- `node-renderer` runs the React on Rails Pro boot seed in a non-login shell before `node renderer/node-renderer.js` so the new renderer cache is warm before Rails rolls. - Rails reaches the renderer through `RENDERER_URL=http://node-renderer..cpln.local:3800`. - Keep `ROLLING_DEPLOY_TOKEN` populated in the app secret dictionary; Rails and the renderer use it for rolling-deploy bundle pulls. - For existing staging/production apps, populate `ROLLING_DEPLOY_TOKEN`, apply templates with `node-renderer`, validate staging, then promote production. Do not combine the production template cutover with missing secrets. diff --git a/.controlplane/templates/node-renderer.yml b/.controlplane/templates/node-renderer.yml index 48a8eaa1..031e0273 100644 --- a/.controlplane/templates/node-renderer.yml +++ b/.controlplane/templates/node-renderer.yml @@ -21,13 +21,13 @@ spec: image: {{APP_IMAGE_LINK}} args: - bash - - -lc + - -c - | # The rake task warns and continues on bundle fetch misses so rollout # does not wedge; unexpected task failures still stop the shell. set -e bundle exec rake react_on_rails_pro:pre_seed_renderer_cache - exec yarn node-renderer + exec node renderer/node-renderer.js ports: - number: 3800 # The React on Rails Pro Node Renderer speaks cleartext HTTP/2 (h2c). diff --git a/Gemfile b/Gemfile index 664c097f..c01c5897 100644 --- a/Gemfile +++ b/Gemfile @@ -6,7 +6,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" } ruby "3.4.6" gem "cpflow", "5.3.0", require: false -gem "react_on_rails_pro", "17.0.0" +gem "react_on_rails_pro", "17.1.0.rc.5" gem "shakapacker", "10.2.0" # Bundle edge Rails instead: gem "rails", github: "rails/rails" diff --git a/Gemfile.lock b/Gemfile.lock index ddb15b9f..165153a4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -78,24 +78,20 @@ GEM addressable (2.9.0) public_suffix (>= 2.0.2, < 8.0) ast (2.4.3) - async (2.42.0) + async (2.46.0) console (~> 1.29) fiber-annotation - io-event (~> 1.11) - metrics (~> 0.12) - traces (~> 0.18) - async-http (0.95.1) - async (>= 2.10.2) + io-event (~> 1.21) + async-http (0.99.0) + async (>= 2.35.1) async-pool (~> 0.11) io-endpoint (~> 0.14) - io-stream (~> 0.6) - metrics (~> 0.12) - protocol-http (~> 0.62) + io-stream (~> 0.14) + protocol-http (~> 0.66) protocol-http1 (~> 0.39) protocol-http2 (~> 0.26) protocol-url (~> 0.2) - traces (~> 0.10) - async-pool (0.11.2) + async-pool (0.12.0) async (>= 2.0) autoprefixer-rails (10.4.16.0) execjs (~> 2) @@ -134,7 +130,7 @@ GEM coffee-script-source (1.12.2) concurrent-ruby (1.3.7) connection_pool (3.0.2) - console (1.37.0) + console (1.38.0) fiber-annotation fiber-local (~> 1.1) json @@ -191,8 +187,8 @@ GEM interception (0.5) io-console (0.8.2) io-endpoint (0.17.2) - io-event (1.19.2) - io-stream (0.13.2) + io-event (1.22.0) + io-stream (0.14.0) openssl (>= 3.3) irb (1.18.0) pp (>= 0.6.0) @@ -222,7 +218,6 @@ GEM marcel (1.2.1) matrix (0.4.2) method_source (1.1.0) - metrics (0.15.0) mini_mime (1.1.5) minitest (6.0.6) drb (~> 2.0) @@ -260,13 +255,13 @@ GEM protocol (2.0.0) ruby_parser (~> 3.0) protocol-hpack (1.5.1) - protocol-http (0.63.0) - protocol-http1 (0.39.0) - protocol-http (~> 0.62) - protocol-http2 (0.26.1) + protocol-http (0.72.0) + protocol-http1 (0.41.0) + protocol-http (~> 0.68) + protocol-http2 (0.28.0) protocol-hpack (~> 1.4) protocol-http (~> 0.62) - protocol-url (0.4.0) + protocol-url (0.19.0) pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) @@ -348,21 +343,21 @@ GEM erb psych (>= 4.0.0) tsort - react_on_rails (17.0.0) + react_on_rails (17.1.0.rc.5) addressable connection_pool execjs (~> 2.5) rails (>= 5.2) rainbow (~> 3.0) shakapacker (>= 6.0) - react_on_rails_pro (17.0.0) + react_on_rails_pro (17.1.0.rc.5) async (>= 2.29) async-http (~> 0.95) execjs (~> 2.9) io-endpoint (~> 0.17.0) jwt (>= 2.5, < 4) nokogiri (>= 1.12, < 2) - react_on_rails (= 17.0.0) + react_on_rails (= 17.1.0.rc.5) redcarpet (3.6.0) redis (5.3.0) redis-client (>= 0.22.0) @@ -486,7 +481,6 @@ GEM tins (1.33.0) bigdecimal sync - traces (0.18.2) tsort (0.2.0) turbo-rails (2.0.11) actionpack (>= 6.0.0) @@ -550,7 +544,7 @@ DEPENDENCIES rails-html-sanitizer rails_best_practices rainbow - react_on_rails_pro (= 17.0.0) + react_on_rails_pro (= 17.1.0.rc.5) redcarpet redis (~> 5.0) rspec-rails (~> 6.0.0) diff --git a/README.md b/README.md index 577df05c..2479f686 100644 --- a/README.md +++ b/README.md @@ -184,13 +184,13 @@ assets_bundler: rspack ### Version Targets -- `react_on_rails_pro` gem: `17.0.0.rc.9` -- `react-on-rails-pro` npm package: `17.0.0-rc.9` -- `react-on-rails-pro-node-renderer` npm package: `17.0.0-rc.9` -- `react-on-rails-rsc` npm package: `19.2.1-rc.1` +- `react_on_rails_pro` gem: `17.1.0.rc.5` +- `react-on-rails-pro` npm package: `17.1.0-rc.5` +- `react-on-rails-pro-node-renderer` npm package: `17.1.0-rc.5` +- `react-on-rails-rsc` npm package: `19.3.0-rc.4` - `shakapacker` gem/npm package: `10.2.0` - `@rspack/core` and `@rspack/cli`: `2.0.4` -- `react`: `~19.2.7` (minimum for React Server Components) +- `react`, `react-dom`, and `react-server-dom-webpack`: `19.2.8` (exact RC validation pins) ### Why Rspack diff --git a/bin/test-cpflow-github-flow b/bin/test-cpflow-github-flow index 37f8357b..83a44fb0 100755 --- a/bin/test-cpflow-github-flow +++ b/bin/test-cpflow-github-flow @@ -37,13 +37,13 @@ container = spec.fetch("containers").fetch(0) expected_args = [ "bash", - "-lc", + "-c", <<~'SHELL', # The rake task warns and continues on bundle fetch misses so rollout # does not wedge; unexpected task failures still stop the shell. set -e bundle exec rake react_on_rails_pro:pre_seed_renderer_cache - exec yarn node-renderer + exec node renderer/node-renderer.js SHELL ] expected_ports = [{ "number" => 3800, "protocol" => "http2" }] diff --git a/package.json b/package.json index 4c93b0ec..9efbd740 100644 --- a/package.json +++ b/package.json @@ -78,18 +78,18 @@ "postcss-loader": "7.3.3", "postcss-preset-env": "^8.5.0", "prop-types": "^15.8.1", - "react": "~19.2.7", - "react-dom": "~19.2.7", + "react": "19.2.8", + "react-dom": "19.2.8", "react-error-boundary": "^4.1.2", "react-intl": "^6.4.4", - "react-on-rails-pro": "17.0.0", - "react-on-rails-pro-node-renderer": "17.0.0", - "react-on-rails-rsc": "19.2.1", + "react-on-rails-pro": "17.1.0-rc.5", + "react-on-rails-pro-node-renderer": "17.1.0-rc.5", + "react-on-rails-rsc": "19.3.0-rc.4", "react-redux": "^8.1.0", "react-router": "^6.13.0", "react-router-dom": "^6.13.0", "react-router-redux": "^4.0.8", - "react-server-dom-webpack": "~19.2.7", + "react-server-dom-webpack": "19.2.8", "react-transition-group": "4.4.5", "redux": "^4.2.1", "redux-thunk": "^2.2.0", diff --git a/yarn.lock b/yarn.lock index 24b7d7f8..301b42b3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -218,11 +218,21 @@ resolved "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz" integrity sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA== +"@babel/helper-string-parser@^7.29.7": + version "7.29.7" + resolved "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz#7f0871d99824d23137d60f86fcf6130fd5a1b51f" + integrity sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw== + "@babel/helper-validator-identifier@^7.27.1": version "7.27.1" resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz" integrity sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow== +"@babel/helper-validator-identifier@^7.29.7": + version "7.29.7" + resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz#bd87084ced0c796ec46bda492de6e83d29e89fc2" + integrity sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg== + "@babel/helper-validator-option@^7.27.1": version "7.27.1" resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz" @@ -252,6 +262,13 @@ dependencies: "@babel/types" "^7.28.4" +"@babel/parser@^7.28.5": + version "7.29.8" + resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.29.8.tgz#9653716a2f10c677b98fbc63d4bfb000c302cf17" + integrity sha512-E8lTAYNB1KW+FH+VGJuZM1ioAx2E6oVlvQFRrf5P8ZZmsiJXYAD9vTFV7yyEURNzgh1dFqMZuO6tUwcARbqFCA== + dependencies: + "@babel/types" "^7.29.8" + "@babel/plugin-bugfix-firefox-class-in-computed-class-key@^7.27.1": version "7.27.1" resolved "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.27.1.tgz" @@ -1004,6 +1021,14 @@ "@babel/helper-string-parser" "^7.27.1" "@babel/helper-validator-identifier" "^7.27.1" +"@babel/types@^7.29.8": + version "7.29.8" + resolved "https://registry.npmjs.org/@babel/types/-/types-7.29.8.tgz#1229eef31d85156d70fa3f4cd859376d0eaf6863" + integrity sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg== + dependencies: + "@babel/helper-string-parser" "^7.29.7" + "@babel/helper-validator-identifier" "^7.29.7" + "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz" @@ -8722,10 +8747,10 @@ react-deep-force-update@^1.0.0: resolved "https://registry.npmjs.org/react-deep-force-update/-/react-deep-force-update-1.1.2.tgz" integrity sha512-WUSQJ4P/wWcusaH+zZmbECOk7H5N2pOIl0vzheeornkIMhu+qrNdGFm0bDZLCb0hSF0jf/kH1SgkNGfBdTc4wA== -react-dom@~19.2.7: - version "19.2.7" - resolved "https://registry.npmjs.org/react-dom/-/react-dom-19.2.7.tgz#0450dc9ae9ddbff76ef196401cd8b8c7fb466ccc" - integrity sha512-t0BRVXvbiE/o20Hfw669rLbMCDWtYZLvmJigy2f0MxsXF+71pxhR3xOkspmsO8h3ZlNzyibAmtCa3l4lYKk6gQ== +react-dom@19.2.8: + version "19.2.8" + resolved "https://registry.npmjs.org/react-dom/-/react-dom-19.2.8.tgz#3b46b9eeda877cdff2cf13d2770fff4ae36c2ec2" + integrity sha512-rVprimfGBG3DR+Tq0IQG2DT5PxKth1WIGDmj5yPmlzr4YBe7uyE+Du4oVqTDXZSHGGGXRtTJEGSSePyQCMBglQ== dependencies: scheduler "^0.27.0" @@ -8767,10 +8792,10 @@ react-is@^18.0.0, react-is@^18.3.1: resolved "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz" integrity sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg== -react-on-rails-pro-node-renderer@17.0.0: - version "17.0.0" - resolved "https://registry.yarnpkg.com/react-on-rails-pro-node-renderer/-/react-on-rails-pro-node-renderer-17.0.0.tgz#5aec3ffb90b70e2465df1b8495a3f6b4bc432789" - integrity sha512-82yuZubo1iaoVpnH8adznf0rVLoZvsSWxYbLYdbKhrdwPjt9MxtyJG6//sqd77hSRX3EVnXQONvkiiur8qLQtw== +react-on-rails-pro-node-renderer@17.1.0-rc.5: + version "17.1.0-rc.5" + resolved "https://registry.npmjs.org/react-on-rails-pro-node-renderer/-/react-on-rails-pro-node-renderer-17.1.0-rc.5.tgz#d2521f208718918f9693ca9c1b07c356597c7466" + integrity sha512-JcYxoDIq8uiiGj9tB/8iTnHI+jeUQ335QTTcfUB8IWyfcWpfcMPFZklb4EEnlT29u6xYLvI49fJzEVJIGvvIgA== dependencies: "@fastify/formbody" "^7.4.0 || ^8.0.2" "@fastify/multipart" "^8.3.1 || ^9.0.3" @@ -8780,27 +8805,28 @@ react-on-rails-pro-node-renderer@17.0.0: lockfile "^1.0.4" pino "^9.14.0 || ^10.1.0" -react-on-rails-pro@17.0.0: - version "17.0.0" - resolved "https://registry.yarnpkg.com/react-on-rails-pro/-/react-on-rails-pro-17.0.0.tgz#831e4cbe48d7b4d60185fecbae7e7fb6ea1d2a6f" - integrity sha512-4eEOnr0K5d5POR9iwaaJGZWrNZUUL1gehhlQDfx83T8Nk3PIb4xVQkOVGkQBko4Wj/fCs9TSUFpMm741+9bNwg== +react-on-rails-pro@17.1.0-rc.5: + version "17.1.0-rc.5" + resolved "https://registry.npmjs.org/react-on-rails-pro/-/react-on-rails-pro-17.1.0-rc.5.tgz#5daa72c7825ef8a7170db06dad8fb89d93b6fdff" + integrity sha512-GHhqjMx0v6PPK6RymQAevlflbMX+EYDNwcafleuS79kzxlN0p3+5IQKqj8c62Z90URipwP6BpvyW1nIJs6Lzeg== dependencies: - react-on-rails "17.0.0" + react-on-rails "17.1.0-rc.5" -react-on-rails-rsc@19.2.1: - version "19.2.1" - resolved "https://registry.npmjs.org/react-on-rails-rsc/-/react-on-rails-rsc-19.2.1.tgz#c7fc623119d31224a27f24ff0bc500d99fa8821a" - integrity sha512-PQ+Ly+cCA3flJ4EJMczSv0rD6boP0wcXCLmaSfj3HOt+7XxP7DkJyu5IiEGb86vIQjMwaTPs68XN9wlnnx+pUw== +react-on-rails-rsc@19.3.0-rc.4: + version "19.3.0-rc.4" + resolved "https://registry.npmjs.org/react-on-rails-rsc/-/react-on-rails-rsc-19.3.0-rc.4.tgz#b0bc0ddd910fba3ba8ea98bb3c988c8f47bea5a1" + integrity sha512-+oJbP947a1e8Pg8GzhsWJxXmtiEyNJCGlX9oxmOGFonVxS9znet8sPpq8imaSi5ak6heNd4SlY6cX4cbgAbVhw== dependencies: + "@babel/parser" "^7.28.5" acorn-loose "^8.3.0" neo-async "^2.6.1" - react-server-dom-webpack "~19.2.7" + react-server-dom-webpack "~19.2.8" webpack-sources "^3.2.0" -react-on-rails@17.0.0: - version "17.0.0" - resolved "https://registry.yarnpkg.com/react-on-rails/-/react-on-rails-17.0.0.tgz#5bc518fb73c6c250fb8cbf1aa4d3bc36b0093c1f" - integrity sha512-jVJmaXJaVsCVoZCWMQ3ePACWaGkq3hOlmbeR0LniQKLr8+kDDgL0RbZ/6D1J2tMAsd1CxS+sOu0PCyO0ZfAQ+g== +react-on-rails@17.1.0-rc.5: + version "17.1.0-rc.5" + resolved "https://registry.npmjs.org/react-on-rails/-/react-on-rails-17.1.0-rc.5.tgz#6c4cfe0899eee1de954d76869a5d0dcd6924c53f" + integrity sha512-5RSkSjZBBSX9kus1meFqVTJl+yu19VDEKXlgtnwP5tCK7zyc3nzkudSlvCYQ7YjpyqNTuLtzshQv81NgZIA+Ow== react-proxy@^1.1.7: version "1.1.8" @@ -8847,10 +8873,10 @@ react-router@6.30.1, react-router@^6.13.0: dependencies: "@remix-run/router" "1.23.0" -react-server-dom-webpack@~19.2.7: - version "19.2.7" - resolved "https://registry.npmjs.org/react-server-dom-webpack/-/react-server-dom-webpack-19.2.7.tgz#ec4ca821297a039df2c6119a5fe14e49c9423573" - integrity sha512-bYfuvqPJnHB4CHo2Ze7fQyJAO77TUu1W/aKFt81ICXbLiOTg5jHaO/NPDlpvGWUALoEGaGb7Oi1uXAaO+Bw6jw== +react-server-dom-webpack@19.2.8, react-server-dom-webpack@~19.2.8: + version "19.2.8" + resolved "https://registry.npmjs.org/react-server-dom-webpack/-/react-server-dom-webpack-19.2.8.tgz#f25752bedff5173500579e72055281a3ee5b7638" + integrity sha512-rFO1VJZ+cH9ZH6hGy9+qmIsmZHZpCMKJZXhWHqT71UnSfg+w+W+gwrwp58MVzMqdFquG8GF1c6C8q0OGphkEdg== dependencies: acorn-loose "^8.3.0" neo-async "^2.6.1" @@ -8874,10 +8900,10 @@ react-transition-group@4.4.5: loose-envify "^1.4.0" prop-types "^15.6.2" -react@~19.2.7: - version "19.2.7" - resolved "https://registry.npmjs.org/react/-/react-19.2.7.tgz#1f47a1bfc06f8ec885752c6f4af14369a9f8260b" - integrity sha512-HNe9WslTbXmFK8o8cmwgAeJFSBvt1bPdHCVKtaaV+WlAN36mpT4hcRpwbf3fY56ar2oIXzsBpOAiIRHAdY0OlQ== +react@19.2.8: + version "19.2.8" + resolved "https://registry.npmjs.org/react/-/react-19.2.8.tgz#a80663dbb58d69c6fe3fd291d3cb324e8a7dff2d" + integrity sha512-PWaYA1L/q9u2u7xYQi+Y3L3Yfnie7XyLeaJICV1MGD6LprsBxcAqGjYyr0eY3p+QdsA+x/Irkt4Qif8D63+Sbw== read-cache@^1.0.0: version "1.0.0"