Recipes
The steps for common changes. Each one touches several repositories, and missing a step usually shows up later somewhere else. Make one pull request per repository, in the order given.
Change the API
-
Nova. Write the handler and add its route in
api_router()inbackend/src/main.rs. Useadmin_router()for administrator routes. -
Annotate it with
#[utoipa::path], tag itpublicorinternal, deriveToSchemaon its types, and register it inbackend/src/openapi.rs. -
Serve it in demo mode too (
backend/src/demo.rs) if the interface uses it. -
Regenerate and commit the contract:
UPDATE_OPENAPI=1 cargo test -p stardelt-nova-backend openapi -
A breaking change to a
publicroute also bumps the version in Nova's backend crate. -
Python, after the Nova change is on
main, forpublicroutes: runpython scripts/sync_contract.pyand commitstardelt/operations.json. -
Docs, after the Nova change is on
main: runnpm run sync:reference && npm run gen:reference, and update the guide that describes the behaviour.
Change a resource
-
Operator. Change the type in
crates/stardelt-operator/src/crd.rs, with a doc comment on every field: it becomes the reference. Add a default so existing resources stay valid, and tests next to the type. -
Change the controller or planner that uses it.
-
Regenerate and commit:
cargo run --bin crdgen # writes chart/crds/ and schemas/ -
Demos, if you changed
Pipelinevalidation: keepdags/stardelt_pipelines/plan.pyin step withPipelineSpec::validate. -
Docs, after the change is on
main: runnpm run sync:reference && npm run gen:reference. -
On a running cluster: Helm does not upgrade CRDs, so run
kubectl apply --server-side -f chart/crds/.
Add a screen
- Nova. Add the route in
frontend/src/routes/, register it infrontend/src/App.tsx, and add the navigation entry infrontend/src/components/Shell.tsx. - Back it with an API route (Change the API), so it works from scripts too.
- Try it with
make demo, and check it withnpm --prefix frontend run build. - Docs. Use the same words as the screen, because readers look for the label they see.
Add or upgrade a service
Before you start, open an issue that names the published interface it sits behind and its license. It has to pass these criteria.
Platform:
- Pin the chart in the
Makefileas<COMPONENT>_VERSION. - Add
helm-values/<component>.yaml, withslim/overrides if needed for small nodes, and astep-<component>target. Add a step toscripts/platform.shif it belongs in the default install. - Add it to
chart/Chart.yamlandchart/values.yaml, off by default unless it belongs in the core. The versions must match:bash scripts/check-version-parity.sh. - Add a
helm templatestep to.github/workflows/ci.yml. - Generate secrets at install, with
scripts/app-secrets.shas the example. - Give each new volume a backup, or add an accepted exception:
make verify-backups-all.
Operator:
- Add the pin to
chart_versioninplanner.rsand the values tocrates/stardelt-operator/values/. Check withbash scripts/check-platform-pins.sh.
Nova, if people should see it: add it to the app list in backend/src/apps.rs.
Docs:
- Add a page at
docs/services/<component>.md; the sidebar picks it up. Add a row to Services. - If it signs users in, add it to per-component sign-in.
To upgrade only: Renovate proposes most pins. Read the upstream license and release notes, and update any copy that CI's version checks name.
Fix something on both install paths
- Fix it in
stardelt-platform, and add a test or check if you can. - Look for the same logic in
stardelt-operator.crates/stardelt-operator/src/has copies of scripts, andvalues/has copies of settings. - Fix the copy in a second pull request, with a test in the crate that pins the behaviour.
Document a feature
Write the page in the pull request that ships the behaviour, or straight after it. Then:
- Choose the place. Getting started for first steps, guides for working with data, operations for running it, architecture for how it fits, services for one component. Reference pages are generated.
- Lead with what the reader can do, then the steps, then the limits. Use the labels on the screen.
- Check every claim against
mainand a running install. Show commands you have run. - Say what is true now. A limit belongs in a short "Not available yet" list. Something not built belongs on the roadmap, never in a guide.
- Leave these out: issue numbers, milestones, dates of work, who built it, how a decision was made, other products, and any mention of internal notes.
- Run
npm run build. It fails on broken links.