Use backend initContainer migrations and remove Spin migration jobs#138
Conversation
1284aba to
a28c20a
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a28c20a4c8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
This PR updates SimBoard’s NERSC Spin operational workflow to run Alembic
migrations via a backend initContainer (rather than at backend startup) and
consolidates Spin workload configuration into a single runbook.
Changes:
- Add a Spin runbook documenting Rancher UI workload settings and initContainer
migration flow. - Update CI/CD deployment docs to describe initContainer-based migrations and the
new secret/env injection model (envFrom). - Simplify backend container startup to
servemode only (no startup-time
migrations).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| docs/deploy/spin.md | New Spin runbook (Rancher UI settings, initContainer migrations, archive mount guidance). |
| docs/cicd/DEPLOYMENT.md | Updates deployment guidance to reference initContainer migrations and Spin runbook. |
| docs/README.md | Adds docs/deploy/spin.md to the docs structure and links. |
| backend/entrypoint.sh | Removes migration-on-startup; supports serve mode only. |
| backend/app/scripts/README.md | Updates scripts domain description for db/. |
| backend/Dockerfile | Adds runtime env for uv cache location and HOME. |
You can also share your feedback on Copilot code review. Take the survey.
docs/deploy/spin.md
Outdated
| | Init container name | `migrate` | | ||
| | Init container image | `registry.nersc.gov/e3sm/simboard/backend:<tag>` | | ||
| | Init container command | `sh -c` | | ||
| | Init container args | `test -n "$DATABASE_URL" \\|\\| { echo "DATABASE_URL is required"; exit 1; }; alembic upgrade head` | |
There was a problem hiding this comment.
The initContainer command is shown with \\|\\| inside inline code. If an operator copy/pastes this, the shell will see literal \|\| and the command will fail. Consider moving the migration command out of the table into a fenced code block (or rewriting it without | so it can live safely in a table), and keep the actual shell operator as ||.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.
You can also share your feedback on Copilot code review. Take the survey.
Closes #117
This PR updates SimBoard’s NERSC Spin operational workflow to run Alembic migrations via a backend
initContainer(rather than at backend startup) and consolidates Spin workload configuration into a single runbook.Changes:
migration flow.
new secret/env injection model (
envFrom).servemode only (no startup-timemigrations).