fix(apps): declare minEngine=0.6.6 on catalog entries that use commandArgv/stopGracePeriod (#599) - #685
Merged
Hydralerne merged 1 commit intoAug 21, 2026
Conversation
…dArgv/stopGracePeriod (fix oblien#599) Five bundled apps (posthog, clickhouse, minio, neon, redis) ship services that use post-release serviceSpec fields (commandArgv, stopGracePeriod). These fields were added to the template schema in commit 550fe22 and first shipped in v0.6.6, but no entry declared minEngine, so the engine-gate in catalog-source.ts had nothing to compare against and could not refuse a pre-0.6.6 install. The silently-dropped field produces wrong-role containers: PostHog worker installs without a command and runs the wrong role; MinIO exits with 'sh is not a minio sub-command' because the shell-wrapped command never reaches the entrypoint. Add minEngine='0.6.6' to each of the five entries, then add a regression test that fails the catalog if any service.commandArgv/stopGracePeriod is set without an entry-level minEngine >= 0.6.6. Verified locally with a sabotage run that removing the field from posthog.json makes the new test fail; restoring it makes the suite pass (27/27 catalog tests, 809/809 core tests). Signed-off-by: Santhi Prakash <b.santhiprakash@gmail.com>
Member
|
thank you |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Five bundled apps (posthog, clickhouse, minio, neon, redis) ship services that use post-release
serviceSpecfields (commandArgv,stopGracePeriod). These fields were added to the template schema in commit 550fe22 and first shipped in v0.6.6, but no entry declaredminEngine, so the engine-gate inapps/api/src/modules/apps/catalog-source.tshad nothing to compare against and could not refuse a pre-0.6.6 install.The silently-dropped field produces wrong-role containers:
'sh' is not a minio sub-commandbecause the shell-wrappedcommandnever reaches the entrypoint.Root cause
packages/core/src/apps/schema.tsdocuments the two fields as post-release additions (the commit message in 550fe22 spells out the same MinIO reproducer), but the schema-levelcommandArgv/stopGracePeriodare accepted by every entry without a correspondingminEngineclaim, so the engine-version check intemplateEngineOk(entry.minEngine, engineVersion)always returnstrue(becauseminEngineis undefined → always ok).The reporter's claim that "PostHog worker installs with no command" lines up exactly with this: on a pre-0.6.6 engine, the field is dropped and the container starts with whatever the image default is.
Fix
Add
"minEngine": "0.6.6"to each of the five catalog entries that use the post-release fields, so the engine-gate now has a real value to compare against:packages/core/src/apps/catalog/posthog.json— worker / web / ingestion-* usecommandArgvpackages/core/src/apps/catalog/clickhouse.json— usesstopGracePeriodpackages/core/src/apps/catalog/minio.json— usescommandArgv(the MinIO reproducer)packages/core/src/apps/catalog/neon.json— usesstopGracePeriodpackages/core/src/apps/catalog/redis.json— valkey usescommandArgvpackages/core/src/apps/catalog.jsonis regenerated viabun scripts/gen-catalog.tsto mirror the source-of-truthcatalog/*.jsonfiles.Verification
Regression test added in
packages/core/src/apps/catalog.test.tsthat walks every entry's services and asserts: any service that setscommandArgvorstopGracePeriodmust declareentry.minEnginethat satisfiestemplateEngineOk(minEngine, "0.6.6").Sabotage run: removed
minEnginefromposthog.json→ new test fails with:Restoring the field → full suite passes:
Targeted
apps/apichecks (INTERNAL_TOKEN=... DEPLOY_MODE=desktop OPENSHIP_AUTH_MODE=none bun test test/modules/apps/catalog-resolve.test.ts test/modules/apps/app-catalog-listing.test.ts) → 9 pass / 0 fail.Risks
minEngine: 0.6.6will surface a "requires update" placeholder for any user still running a pre-0.6.6 engine. That is exactly the desired behavior — it matches the comment on the issue ("the minEngine gate … is armed on nothing"). The bundled entries still install on every released engine ≥ 0.6.6 becauseresolveCatalogfalls back to the bundled copy when a too-new overlay overrides a bundled app; for users on a too-old engine, the placeholder guides them to upgrade instead of running the broken role.minEnginealready accepts any semver string andtemplateEngineOkalready gates it. Pure data fix.