fix(infra): nrc-init runs migrations only, not setup_configuration (refs #30)
With OpenZaak now coming up, nrc-init ran for the first time and failed:
nrc-init-1 | CommandError: No steps enabled, aborting.
NRC's setup_configuration/data.yaml is intentionally empty ({}) — the
OZ<->NRC wiring is deferred to S-06 — but /setup_configuration.sh runs
`manage.py setup_configuration` regardless, and NRC 1.16.1 aborts when no
steps are enabled. (This was masked until now: oz-init failed first, so
openzaak never became healthy and nrc-init, which waits on it, never ran.)
The documented intent is "init runs migrations only", so nrc-init now runs
`manage.py migrate` directly instead of /setup_configuration.sh, and the
dead RUN_SETUP_CONFIG env is dropped from the NRC services. nrc-web still
migrates + creates the superuser itself via /start.sh.
Also:
- Makefile: bump compose `--wait-timeout` 300 -> 420. The serial
oz-db -> oz-init -> openzaak(healthy) -> nrc-init -> nrc-web(healthy)
chain runs ~260 s on the runner; 420 s gives comfortable headroom.
- ci.yaml: widen the on-failure log dump to oz-init, openzaak, nrc-init,
nrc-web, flowable-init, keycloak, acl, bff for full diagnosability.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -50,7 +50,7 @@ jobs:
|
|||||||
- run: make smoke
|
- run: make smoke
|
||||||
- name: dump container logs on failure
|
- name: dump container logs on failure
|
||||||
if: failure()
|
if: failure()
|
||||||
run: docker compose -f infra/docker-compose.yml logs --no-color --tail=100 oz-init nrc-init acl bff 2>&1 || true
|
run: docker compose -f infra/docker-compose.yml logs --no-color --tail=80 oz-init openzaak nrc-init nrc-web flowable-init keycloak acl bff 2>&1 || true
|
||||||
- name: tear down on failure
|
- name: tear down on failure
|
||||||
if: failure()
|
if: failure()
|
||||||
run: docker compose -f infra/docker-compose.yml down --volumes 2>&1 || true
|
run: docker compose -f infra/docker-compose.yml down --volumes 2>&1 || true
|
||||||
|
|||||||
2
Makefile
2
Makefile
@@ -47,7 +47,7 @@ unit:
|
|||||||
|
|
||||||
## smoke: compose up (wait for healthy), curl /health, then tear down
|
## smoke: compose up (wait for healthy), curl /health, then tear down
|
||||||
smoke:
|
smoke:
|
||||||
docker compose -f $(COMPOSE) up -d --build --wait --wait-timeout 300
|
docker compose -f $(COMPOSE) up -d --build --wait --wait-timeout 420
|
||||||
bash -c 'curl -fsS $(HEALTH_URL); rc=$$?; docker compose -f $(COMPOSE) down --volumes; exit $$rc'
|
bash -c 'curl -fsS $(HEALTH_URL); rc=$$?; docker compose -f $(COMPOSE) down --volumes; exit $$rc'
|
||||||
|
|
||||||
## down: stop and remove the local stack
|
## down: stop and remove the local stack
|
||||||
|
|||||||
@@ -150,8 +150,11 @@ services:
|
|||||||
OPENNOTIFICATIES_SUPERUSER_USERNAME: admin
|
OPENNOTIFICATIES_SUPERUSER_USERNAME: admin
|
||||||
DJANGO_SUPERUSER_PASSWORD: admin
|
DJANGO_SUPERUSER_PASSWORD: admin
|
||||||
OPENNOTIFICATIES_SUPERUSER_EMAIL: admin@localhost
|
OPENNOTIFICATIES_SUPERUSER_EMAIL: admin@localhost
|
||||||
RUN_SETUP_CONFIG: "true"
|
# Migrations only for now. No setup_configuration steps are enabled yet (the
|
||||||
command: /setup_configuration.sh
|
# OZ<->NRC notification wiring lands in S-06), and NRC's `setup_configuration`
|
||||||
|
# aborts with "No steps enabled" on the empty data.yaml — so we run `migrate`
|
||||||
|
# directly instead of /setup_configuration.sh. See data.yaml and ADR-0002.
|
||||||
|
command: ["sh", "-c", "/wait_for_db.sh && OTEL_SDK_DISABLED=True python src/manage.py migrate"]
|
||||||
depends_on:
|
depends_on:
|
||||||
nrc-db:
|
nrc-db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|||||||
@@ -56,8 +56,11 @@ services:
|
|||||||
OPENNOTIFICATIES_SUPERUSER_USERNAME: admin
|
OPENNOTIFICATIES_SUPERUSER_USERNAME: admin
|
||||||
DJANGO_SUPERUSER_PASSWORD: admin
|
DJANGO_SUPERUSER_PASSWORD: admin
|
||||||
OPENNOTIFICATIES_SUPERUSER_EMAIL: admin@localhost
|
OPENNOTIFICATIES_SUPERUSER_EMAIL: admin@localhost
|
||||||
RUN_SETUP_CONFIG: "true"
|
# Migrations only for now. No setup_configuration steps are enabled yet (the
|
||||||
command: /setup_configuration.sh
|
# OZ<->NRC notification wiring lands in S-06), and NRC's `setup_configuration`
|
||||||
|
# aborts with "No steps enabled" on the empty data.yaml — so we run `migrate`
|
||||||
|
# directly instead of /setup_configuration.sh. See data.yaml and ADR-0002.
|
||||||
|
command: ["sh", "-c", "/wait_for_db.sh && OTEL_SDK_DISABLED=True python src/manage.py migrate"]
|
||||||
depends_on:
|
depends_on:
|
||||||
nrc-db:
|
nrc-db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|||||||
Reference in New Issue
Block a user