feat(portal,console-v3): make container command/args configurable#371
feat(portal,console-v3): make container command/args configurable#371Dav-14 wants to merge 4 commits into
Conversation
|
Warning Review limit reached
Your plan includes 1 review of capacity. Refill in 17 minutes and 1 second. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more review capacity refills, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (15)
📒 Files selected for processing (8)
WalkthroughCoordinated Helm chart releases across four charts (Cloudprem 6.0.0, Console-V3 5.0.0, Portal 5.0.0, Formance 2.0.0) with migration guides documenting breaking changes in container entrypoints and migration runners, plus Go toolchain upgrade to 1.25. ChangesHelm Chart Release Documentation
Go Toolchain Update
🎯 2 (Simple) | ⏱️ ~8 minutes Possibly Related PRs
Suggested Reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
bc9e6c5 to
e8fa36e
Compare
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@charts/cloudprem/README.md`:
- Around line 285-301: The legacy override example uses incorrect pnpm commands;
update the migration and start commands under the portal and console-v3 blocks
so they match the previous pnpm usage: use "pnpm run start:prod" for starting
and "pnpm run db:migrate" for migrations. Locate the portal and console-v3 YAML
entries and replace the command/args pairs in both the main command and the
nested config.migration command to reflect "pnpm run start:prod" and "pnpm run
db:migrate" respectively so legacy pnpm-based images upgrade correctly.
In `@charts/cloudprem/README.md.gotmpl`:
- Around line 281-297: Update the template overrides so the portal and
console-v3 entries use the legacy pnpm run commands instead of plain pnpm;
specifically change the top-level command/args for "portal" and "console-v3" and
the nested config.migration.command/args to use "pnpm run start:prod" for
startup and "pnpm run db:migrate" for migrations (i.e., update the command/args
tuples for the portal and console-v3 blocks and their config.migration blocks to
reflect the legacy run scripts).
In `@charts/formance/README.md`:
- Around line 42-59: Update the pnpm commands in the override so they invoke the
legacy scripts instead of bare commands: for cloudprem.portal set command/args
to use ["pnpm","run","start:prod"] and for its migration config use
["pnpm","run","db:migrate"]; do the same for cloudprem.console-v3 (set
command/args to ["pnpm","run","start:prod"] and migration to
["pnpm","run","db:migrate"]). Locate the entries under cloudprem.portal and
cloudprem.console-v3 (their command/args and config.migration.command/args) and
replace the existing ["pnpm"] + ["start"/"migrate","up"] values accordingly.
In `@charts/formance/README.md.gotmpl`:
- Around line 30-47: Update the templated commands for legacy pnpm images: in
the cloudprem.portal and cloudprem.console-v3 blocks, change the service start
command from using args ["start"] to the production script invocation args
["run","start:prod"], and change the migration override from args
["migrate","up"] to the pnpm run migration invocation args ["run","db:migrate"];
locate the migration config blocks named migration under cloudprem.portal and
cloudprem.console-v3 and replace the args accordingly so the template documents
the backward-compatible commands.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: dbefd547-8a85-4eba-b811-491b51b0244a
⛔ Files ignored due to path filters (15)
charts/cloudprem/Chart.lockis excluded by!**/*.lock,!**/*.lockcharts/cloudprem/Chart.yamlis excluded by!**/*.yamlcharts/console-v3/Chart.yamlis excluded by!**/*.yamlcharts/console-v3/templates/deployment.yamlis excluded by!**/*.yamlcharts/console-v3/templates/job.yamlis excluded by!**/*.yamlcharts/console-v3/values.schema.jsonis excluded by!**/*.jsoncharts/console-v3/values.yamlis excluded by!**/*.yamlcharts/formance/Chart.lockis excluded by!**/*.lock,!**/*.lockcharts/formance/Chart.yamlis excluded by!**/*.yamlcharts/portal/Chart.yamlis excluded by!**/*.yamlcharts/portal/templates/deployment.yamlis excluded by!**/*.yamlcharts/portal/templates/job.yamlis excluded by!**/*.yamlcharts/portal/values.schema.jsonis excluded by!**/*.jsoncharts/portal/values.yamlis excluded by!**/*.yamlflake.lockis excluded by!**/*.lock,!**/*.lock
📒 Files selected for processing (8)
README.mdcharts/cloudprem/README.mdcharts/cloudprem/README.md.gotmplcharts/console-v3/README.mdcharts/formance/README.mdcharts/formance/README.md.gotmplcharts/portal/README.mdflake.nix
| ```yaml | ||
| portal: | ||
| command: ["pnpm"] | ||
| args: ["start"] | ||
| config: | ||
| migration: | ||
| command: ["pnpm"] | ||
| args: ["migrate", "up"] | ||
|
|
||
| console-v3: | ||
| command: ["pnpm"] | ||
| args: ["start"] | ||
| config: | ||
| migration: | ||
| command: ["pnpm"] | ||
| args: ["migrate", "up"] | ||
| ``` |
There was a problem hiding this comment.
Fix legacy override example to match actual previous pnpm commands.
The migration snippet uses pnpm start and pnpm migrate up, but the legacy behavior described in this PR context is pnpm run start:prod and pnpm run db:migrate. Following the current example can fail upgrades for existing pnpm-based images.
Suggested patch
portal:
command: ["pnpm"]
- args: ["start"]
+ args: ["run", "start:prod"]
config:
migration:
command: ["pnpm"]
- args: ["migrate", "up"]
+ args: ["run", "db:migrate"]
console-v3:
command: ["pnpm"]
- args: ["start"]
+ args: ["run", "start:prod"]
config:
migration:
command: ["pnpm"]
- args: ["migrate", "up"]
+ args: ["run", "db:migrate"]📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ```yaml | |
| portal: | |
| command: ["pnpm"] | |
| args: ["start"] | |
| config: | |
| migration: | |
| command: ["pnpm"] | |
| args: ["migrate", "up"] | |
| console-v3: | |
| command: ["pnpm"] | |
| args: ["start"] | |
| config: | |
| migration: | |
| command: ["pnpm"] | |
| args: ["migrate", "up"] | |
| ``` |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@charts/cloudprem/README.md` around lines 285 - 301, The legacy override
example uses incorrect pnpm commands; update the migration and start commands
under the portal and console-v3 blocks so they match the previous pnpm usage:
use "pnpm run start:prod" for starting and "pnpm run db:migrate" for migrations.
Locate the portal and console-v3 YAML entries and replace the command/args pairs
in both the main command and the nested config.migration command to reflect
"pnpm run start:prod" and "pnpm run db:migrate" respectively so legacy
pnpm-based images upgrade correctly.
| ```yaml | ||
| portal: | ||
| command: ["pnpm"] | ||
| args: ["start"] | ||
| config: | ||
| migration: | ||
| command: ["pnpm"] | ||
| args: ["migrate", "up"] | ||
|
|
||
| console-v3: | ||
| command: ["pnpm"] | ||
| args: ["start"] | ||
| config: | ||
| migration: | ||
| command: ["pnpm"] | ||
| args: ["migrate", "up"] | ||
| ``` |
There was a problem hiding this comment.
Update template migration overrides to the real legacy pnpm commands.
This snippet currently suggests pnpm start / pnpm migrate up, which does not match the prior defaults described for legacy behavior (pnpm run start:prod and pnpm run db:migrate).
Suggested patch
portal:
command: ["pnpm"]
- args: ["start"]
+ args: ["run", "start:prod"]
config:
migration:
command: ["pnpm"]
- args: ["migrate", "up"]
+ args: ["run", "db:migrate"]
console-v3:
command: ["pnpm"]
- args: ["start"]
+ args: ["run", "start:prod"]
config:
migration:
command: ["pnpm"]
- args: ["migrate", "up"]
+ args: ["run", "db:migrate"]🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@charts/cloudprem/README.md.gotmpl` around lines 281 - 297, Update the
template overrides so the portal and console-v3 entries use the legacy pnpm run
commands instead of plain pnpm; specifically change the top-level command/args
for "portal" and "console-v3" and the nested config.migration.command/args to
use "pnpm run start:prod" for startup and "pnpm run db:migrate" for migrations
(i.e., update the command/args tuples for the portal and console-v3 blocks and
their config.migration blocks to reflect the legacy run scripts).
| ```yaml | ||
| cloudprem: | ||
| portal: | ||
| command: ["pnpm"] | ||
| args: ["start"] | ||
| config: | ||
| migration: | ||
| command: ["pnpm"] | ||
| args: ["migrate", "up"] | ||
|
|
||
| console-v3: | ||
| command: ["pnpm"] | ||
| args: ["start"] | ||
| config: | ||
| migration: | ||
| command: ["pnpm"] | ||
| args: ["migrate", "up"] | ||
| ``` |
There was a problem hiding this comment.
Correct formance-level legacy override example for pnpm-based images.
The provided override uses pnpm start and pnpm migrate up; to preserve prior behavior it should use pnpm run start:prod and pnpm run db:migrate.
Suggested patch
cloudprem:
portal:
command: ["pnpm"]
- args: ["start"]
+ args: ["run", "start:prod"]
config:
migration:
command: ["pnpm"]
- args: ["migrate", "up"]
+ args: ["run", "db:migrate"]
console-v3:
command: ["pnpm"]
- args: ["start"]
+ args: ["run", "start:prod"]
config:
migration:
command: ["pnpm"]
- args: ["migrate", "up"]
+ args: ["run", "db:migrate"]🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@charts/formance/README.md` around lines 42 - 59, Update the pnpm commands in
the override so they invoke the legacy scripts instead of bare commands: for
cloudprem.portal set command/args to use ["pnpm","run","start:prod"] and for its
migration config use ["pnpm","run","db:migrate"]; do the same for
cloudprem.console-v3 (set command/args to ["pnpm","run","start:prod"] and
migration to ["pnpm","run","db:migrate"]). Locate the entries under
cloudprem.portal and cloudprem.console-v3 (their command/args and
config.migration.command/args) and replace the existing ["pnpm"] +
["start"/"migrate","up"] values accordingly.
| ```yaml | ||
| cloudprem: | ||
| portal: | ||
| command: ["pnpm"] | ||
| args: ["start"] | ||
| config: | ||
| migration: | ||
| command: ["pnpm"] | ||
| args: ["migrate", "up"] | ||
|
|
||
| console-v3: | ||
| command: ["pnpm"] | ||
| args: ["start"] | ||
| config: | ||
| migration: | ||
| command: ["pnpm"] | ||
| args: ["migrate", "up"] | ||
| ``` |
There was a problem hiding this comment.
Fix templated migration override commands for legacy pnpm images.
This template currently documents pnpm start / pnpm migrate up; for backward-compat upgrades it should document pnpm run start:prod / pnpm run db:migrate.
Suggested patch
cloudprem:
portal:
command: ["pnpm"]
- args: ["start"]
+ args: ["run", "start:prod"]
config:
migration:
command: ["pnpm"]
- args: ["migrate", "up"]
+ args: ["run", "db:migrate"]
console-v3:
command: ["pnpm"]
- args: ["start"]
+ args: ["run", "start:prod"]
config:
migration:
command: ["pnpm"]
- args: ["migrate", "up"]
+ args: ["run", "db:migrate"]📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ```yaml | |
| cloudprem: | |
| portal: | |
| command: ["pnpm"] | |
| args: ["start"] | |
| config: | |
| migration: | |
| command: ["pnpm"] | |
| args: ["migrate", "up"] | |
| console-v3: | |
| command: ["pnpm"] | |
| args: ["start"] | |
| config: | |
| migration: | |
| command: ["pnpm"] | |
| args: ["migrate", "up"] | |
| ``` |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@charts/formance/README.md.gotmpl` around lines 30 - 47, Update the templated
commands for legacy pnpm images: in the cloudprem.portal and
cloudprem.console-v3 blocks, change the service start command from using args
["start"] to the production script invocation args ["run","start:prod"], and
change the migration override from args ["migrate","up"] to the pnpm run
migration invocation args ["run","db:migrate"]; locate the migration config
blocks named migration under cloudprem.portal and cloudprem.console-v3 and
replace the args accordingly so the template documents the backward-compatible
commands.
The portal and console-v3 charts hardcoded `command: [pnpm]`, `args: [run, start:prod]` for the deployment and `[pnpm, run, db:migrate]` for the pre-install/upgrade migrate Job. That breaks any consumer shipping a slim image without `pnpm` — the prod-remix runtime in platform-ui PR #1194 strips pnpm to save ~30 MB and unblock workspace pruning, but the chart then crashloops with `exec: "pnpm": executable file not found`. This commit exposes the two pairs through values: command: [pnpm] # default keeps current behaviour args: [run, start:prod] config.migration.command: [pnpm] # default keeps current behaviour config.migration.args: [run, db:migrate] Slim-image consumers override with e.g.: command: [node_modules/.bin/react-router-serve] args: [./build/server/index.js] config.migration.enabled: false # or override the command No behaviour change for existing consumers — `helm template` against the defaults emits identical YAML. Chart version bumped to 3.6.0 (minor — additive, backward-compatible values).
…runner Flips the defaults landed earlier in this PR from "preserve historical pnpm behaviour, let consumers override" to "match the new slim image out of the box." Old `pnpm`-bearing images can still override values to restore the old defaults. - `command` / `args` default → `[node_modules/.bin/react-router-serve]` / `[./build/server/index.js]` (the slim prod-remix entrypoint). - `config.migration.command` / `config.migration.args` default → `[node]` / `[dist/migrate.cjs]` (the bundled migration runner shipped by platform-ui#1195; SQL files at `./dist/migrations` resolved via the image's `MIGRATIONS_FOLDER` env). - Chart versions: 3.6.0 → 4.0.0 (defaults break old-image consumers without an override, hence the major bump). Verified: helm template t charts/portal -n t # deployment: react-router-serve, migrate: node dist/migrate.cjs helm template t charts/console-v3 -n t # same
e8fa36e to
faa9d95
Compare
…udprem 5, formance 2 Cascades the breaking-default change from the previous commit (slim prod-remix entrypoint: react-router-serve / node dist/migrate.cjs) through the dependency tree: - portal: chart 3.5.1 -> 4.0.0, appVersion v2.5.1 -> v3.0.0 - console-v3: chart 3.5.1 -> 4.0.0, appVersion v2.5.1 -> v3.0.0 - cloudprem: chart 4.6.2 -> 5.0.0, deps portal/console-v3 3.X -> 4.X - formance: chart 1.10.1 -> 2.0.0, dep cloudprem 4.X -> 5.X Adds migration notes (and a new formance/README.md.gotmpl so helm-docs preserves them) explaining how legacy pnpm-based images can override command/args to keep the previous behavior. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
golangci-lint shipped via nix was built with go1.24 and failed to load tools/readme (go 1.25.0). Bumping the flake's pinned nixpkgs + goVersion to 25 fixes `just lint` / `just pre-commit`. Also regenerates portal/console-v3 values.schema.json to include the new top-level `command`/`args` and migration `command`/`args` fields. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
faa9d95 to
759505a
Compare
Exposes
command/args(both for the main container and the migration Job) through values on the portal and console-v3 charts, flips the defaults to the new slim production entrypoint, and cascades the major-version bumps throughcloudpremandformance.Why
platform-ui#1194 and #1195 ship a prod-remix runtime image that drops
pnpm(~30 MB) and a bundled migration runner. The new defaults:react-router-serve ./build/server/index.jsnode ./dist/migrate.cjs(SQL files resolved viaMIGRATIONS_FOLDER)vs the previous
pnpm run start:prod/pnpm run db:migrate. This cuts portal/console-v3 image size ~64 % (423→154 MB compressed).Since the charts hardcoded
pnpm-based commands, bumping to the slim image previously caused both Pods to crashloop withexec: "pnpm": executable file not found in $PATH.What this PR does
Configurability (
feat(portal,console-v3): make container command/args configurable)charts/{portal,console-v3}/templates/deployment.yaml: replace hardcodedcommand/argswith{{ toYaml .Values.command }}/{{ toYaml .Values.args }}.charts/{portal,console-v3}/templates/job.yaml: same forconfig.migration.command/config.migration.args.charts/{portal,console-v3}/values.yaml: declare overridable defaults.Default flip (
feat(portal,console-v3): default to bundled-cjs entrypoint + migrate runner)command/argsdefault →[node_modules/.bin/react-router-serve]/[./build/server/index.js]config.migration.command/config.migration.argsdefault →[node]/[dist/migrate.cjs]Consumers still running legacy
pnpm-based images must override these values to keep the previous behavior — see migration notes in each chart's README.Major bumps (
chore(release)!)portal3.5.1/v2.5.14.0.0/v3.0.0console-v33.5.1/v2.5.14.0.0/v3.0.0cloudprem4.6.25.0.0portal/console-v33.X → 4.Xformance1.10.12.0.0cloudprem4.X → 5.XMigration sections added to
cloudprem/README.md(with override snippet) and a newformance/README.md.gotmpl(sohelm-docspreserves the migration block).Tooling (
chore(nix): bump goVersion to 25 and nixpkgs)tools/readme/go.moddeclaresgo 1.25.0; the nix-pinnedgolangci-lintwas built withgo1.24and refused to load the config. Bumps the flake'sgoVersionto 25 and pinnednixpkgssojust lint/just pre-commitwork again.Verified
Override example (legacy pnpm image)
Risk
pnpm-bearing image without overridingcommand/args. Documented in each chart's Migration section; the major bumps signal it.