Repository navigation
fix(api): refuse shipkeep.yml fields that no deployment applies yet - #431
Merged
Merged
Conversation
volumes, databases, previews, deploy.strategy: recreate and deploy.keep_images were accepted and ignored: a volume was never mounted, so what an application wrote there was lost at its next deployment. They are now refused on save and on deploy, with the field's JSON pointer. Signed-off-by: samuel mbabhazi <[email protected]>
…ting volumes in the UI Signed-off-by: samuel mbabhazi <[email protected]>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 19 minutes. View limit details
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. |
This was referenced Nov 23, 2026
samuelmbabhazi
added a commit
that referenced
this pull request
Nov 23, 2026
…rt of #246) (#432) Part of #246: the `shipkeep.yml` reference of the documentation site, generated from the JSON Schema. Stacked on #430. **Merge it after #431**: the page says that some fields are refused, which is true only once #431 is merged. ## What changed - **`tools/gen/config-reference.mjs`** writes `apps/docs/src/content/docs/reference/shipkeep-yml.md` from `packages/config-schema/shipkeep.schema.json`. - It runs with `pnpm gen:config`. The "Generated code is up to date" job then fails when the page is stale, and the page is never edited by hand. Prettier leaves it alone. - Each field gets its type, bounds, pattern, whether it is required, and the schema's description. - **What the control plane does with a field** is not in the schema, so the generator holds two short lists: - `DEFAULTS`: the values the pipeline uses when a field is left out, such as health check interval `5s`, one replica, spread `node`, release timeout `10m`, drain `30s` (at most `5m`), and the default resources. - `NOTES`: - only `build.type: image` works; - the fields refused until applied (SPEC 2.2, #431); - how the health check, the release command, domains and secrets behave; - `run.healthcheck.unhealthy_threshold` is accepted but not applied yet. - The generator's header says to keep both lists in step with `UNAPPLIED` and the pipeline. - **ADR 0027** says that this reference is generated, and that the CLI reference will follow the same way. - The **Reference** group in the sidebar. ## How it was tested - `pnpm gen:config` runs clean, and the output is the same over two runs. - `nx run docs:build` builds 6 pages. - `eslint` on the generator. - Each default was read from the pipeline: `container-plan.ts`, `pipeline.ts`, `placement.ts` and `DEFAULT_RESOURCES`. ## Security considerations Documentation only. The generator reads the schema and writes one Markdown file. --------- Signed-off-by: samuel mbabhazi <[email protected]>
samuelmbabhazi
added a commit
that referenced
this pull request
Nov 23, 2026
…435) Part of #246: the migration guide. Stacked on #434. With it, the site covers every page the issue lists: install, concepts, the `shipkeep.yml` reference, the CLI reference, and migration. Merge after #431, since the guide says that volumes are refused. ## What changed **Move an application to Shipkeep** (`guides/move-an-application.md`), under a new **Guides** group: - **What cannot move yet.** Data on a volume, builds and Compose files. A stateful service stays where it runs and is reached through a secret. The Coolify import of SPEC 13 is named as planned. - **Getting an image.** An existing image, or one built in CI and pushed to a registry, with registry credentials for a private one. - **From Compose to `shipkeep.yml`.** A table maps each Compose setting: image, ports, command, environment and secrets, health check, replicas, limits, domains, volumes, `depends_on`. A complete example follows. - **Deploying next to the old platform** on a second name, while both share the database. - **Switching the domain**: lower the TTL, add the domain, point the record. It is undone by pointing the record back. ## How it was tested - `nx run docs:build` builds 8 pages. - Each mapping was checked against the schema and the pipeline: - `run.command` is an argv list; - nothing is published on the host (`placement.ts`); - the health check is probed over HTTP on `run.port`; - the release command runs before a new release takes the traffic. ## Security considerations Documentation only. The guide keeps secrets in the environment and names them in `shipkeep.yml`, never their values. --------- Signed-off-by: samuel mbabhazi <[email protected]>
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.
Found while writing the documentation site (#246):
shipkeep.ymlaccepted fields that no deployment applies, and ignored them without a word.The problem
The JSON Schema describes features that are planned. The control plane accepted them, and the pipeline ignored them:
volumes: nothing was mounted (agent-steps.tsmounts only the/tmptmpfs ofrun.read_only_root). An application that declared a volume wrote into its container's own layer instead, and lost that data at its next deployment, when the container was replaced. Nothing said so, and the application page's storage section even listed the volume.databasesandpreviews: no managed database and no preview environment ever appeared.deploy.strategy: recreate: every deployment is rolling: the new replicas start before the previous ones stop.deploy.keep_images: servers remove no image yet.What changed
assertConfigApplied(apps/domain/application.ts) refuses each of these withunsupported_config_field, the field's JSON pointer, and the reason. For example:volumes is not supported yet: nothing would be mounted, and what the application writes there would be lost at its next deployment.volumesordatabases,previews.enabled: false,strategy: rolling, anddrain_timeout, which the pipeline applies.applicationConfig(creation, configuration change and environment clone), and again on deploy. A configuration stored before this change cannot start a release that ignores what it says, which is the same pattern asassertDomainsAvailable.How it was tested
volumesand changing tostrategy: recreateare refused;volumeswritten straight into the database is refused when deployed, and no release is created;Security considerations