From 93afba35ecf59afab7b643707b217cb6c47dba7a Mon Sep 17 00:00:00 2001 From: Justin Gordon Date: Mon, 14 Sep 2026 22:27:52 -1000 Subject: [PATCH 1/3] Give review release jobs enough memory to start Rails images --- .controlplane/controlplane.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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. From 03448dfc87a20207ef052295a2776a31dd0e1a3f Mon Sep 17 00:00:00 2001 From: Justin Gordon Date: Mon, 14 Sep 2026 23:11:10 -1000 Subject: [PATCH 2/3] Start the renderer with the Node executable installed in the image --- .controlplane/readme.md | 2 +- .controlplane/shakacode-team.md | 2 +- .controlplane/templates/node-renderer.yml | 2 +- bin/test-cpflow-github-flow | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.controlplane/readme.md b/.controlplane/readme.md index 99679694..4b7eed0d 100644 --- a/.controlplane/readme.md +++ b/.controlplane/readme.md @@ -593,7 +593,7 @@ 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 +`/usr/local/node/bin/node renderer/node-renderer.js`. 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..375bba3e 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 before `/usr/local/node/bin/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..639e0c33 100644 --- a/.controlplane/templates/node-renderer.yml +++ b/.controlplane/templates/node-renderer.yml @@ -27,7 +27,7 @@ spec: # 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 /usr/local/node/bin/node renderer/node-renderer.js ports: - number: 3800 # The React on Rails Pro Node Renderer speaks cleartext HTTP/2 (h2c). diff --git a/bin/test-cpflow-github-flow b/bin/test-cpflow-github-flow index 37f8357b..382e14cb 100755 --- a/bin/test-cpflow-github-flow +++ b/bin/test-cpflow-github-flow @@ -43,7 +43,7 @@ expected_args = [ # 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 /usr/local/node/bin/node renderer/node-renderer.js SHELL ] expected_ports = [{ "number" => 3800, "protocol" => "http2" }] From a0be59f952e41a394271dfb7b587d7ed0df59d79 Mon Sep 17 00:00:00 2001 From: Justin Gordon Date: Mon, 14 Sep 2026 23:16:32 -1000 Subject: [PATCH 3/3] Preserve the image Node path during renderer boot --- .controlplane/readme.md | 3 ++- .controlplane/shakacode-team.md | 2 +- .controlplane/templates/node-renderer.yml | 4 ++-- bin/test-cpflow-github-flow | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.controlplane/readme.md b/.controlplane/readme.md index 4b7eed0d..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 -`/usr/local/node/bin/node renderer/node-renderer.js`. 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 375bba3e..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 `/usr/local/node/bin/node renderer/node-renderer.js` 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 639e0c33..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 /usr/local/node/bin/node renderer/node-renderer.js + exec node renderer/node-renderer.js ports: - number: 3800 # The React on Rails Pro Node Renderer speaks cleartext HTTP/2 (h2c). diff --git a/bin/test-cpflow-github-flow b/bin/test-cpflow-github-flow index 382e14cb..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 /usr/local/node/bin/node renderer/node-renderer.js + exec node renderer/node-renderer.js SHELL ] expected_ports = [{ "number" => 3800, "protocol" => "http2" }]