From 67052136df55b5e6dd5ad514b612d8afb29bd3ca Mon Sep 17 00:00:00 2001 From: Sabine Maennel <5292683+sabinem@users.noreply.github.com> Date: Tue, 13 Oct 2026 07:57:36 +0200 Subject: [PATCH] fix(just): restart the stack after schema-change seeds The backend loads its casbin policy once at startup, but schema-change started it before seeding, so every per-hackathon role the seed wrote was invisible to the running server. Owners like alice got PermissionDenied on their own hackathons until a manual restart. --- components/backend/cmd/seed/README.md | 3 ++- justfile | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/components/backend/cmd/seed/README.md b/components/backend/cmd/seed/README.md index 3c0963a3..a8e8cd99 100644 --- a/components/backend/cmd/seed/README.md +++ b/components/backend/cmd/seed/README.md @@ -65,7 +65,8 @@ just deploy::down && just deploy::up # keeps the data, reloads the policy This applies to the documented order too (`just clean::state && just start && just db::seed`), since the backend is up -before the seed runs. +before the seed runs. `just schema-change` restarts the stack after seeding, so +it needs no manual restart. ## Users diff --git a/justfile b/justfile index da7b8444..d7e98d28 100644 --- a/justfile +++ b/justfile @@ -114,6 +114,12 @@ schema-change: echo "==> Seeding database..." just db::seed + # The backend loads its casbin policy once at startup, so it has not seen + # the roles the seed just wrote. See cmd/seed/README.md. + echo "==> Restarting services so the backend loads the seeded policy..." + just deploy::down + just deploy::up + echo "==> Done! Attaching to TUI..." just deploy::attach