Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .controlplane/controlplane.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good empirically-justified fix for the one-off runner job. One thing worth double-checking: the persistent rails workload template (.controlplane/templates/rails.yml:26) still requests only 1Gi as its baseline memory for booting the same Rails image (with capacityAI: true to grow it afterward). If a 1Gi cold start was hitting a startup-probe/connection failure for the one-off runner here, the persistent workload's very first boot on a fresh review app could plausibly hit the same problem before capacityAI has a chance to scale it up — worth confirming that path is actually distinct (no startup probe on rails.yml, or otherwise already covered) rather than assuming it's fine because it hasn't failed yet.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Codex (configured gpt-5.6-sol, medium): Confirmed in the effective head a0be59f review app: the persistent Rails workload retained 300m/1Gi, produced a replica, became ready and readyLatest, and served / and /server-components with HTTP 200. Its separate startup path worked; no Rails memory change was needed.

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.
3 changes: 2 additions & 1 deletion .controlplane/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.<app>.cpln.local:3800`.

Expand Down
2 changes: 1 addition & 1 deletion .controlplane/shakacode-team.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.<app>.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.
Expand Down
4 changes: 2 additions & 2 deletions .controlplane/templates/node-renderer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
4 changes: 2 additions & 2 deletions bin/test-cpflow-github-flow
Original file line number Diff line number Diff line change
Expand Up @@ -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" }]
Expand Down
Loading