Skip to content

Commit f140d0c

Browse files
committed
fix(ci): give the released-state seed its configured DSN
Core resolves the DSN from the configured variable name, which the unit provides through its environment file. The seed runs outside the unit, so it must supply the same variable explicitly.
1 parent 85a7e26 commit f140d0c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎scripts/ci/ordinary-server-upgrade-e2e.sh‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,11 @@ finally:
630630
core.close()
631631
PY
632632
sudo install -o agentnet -g agentnet -m 0700 "$WORK/seed-released-state.py" /var/lib/agentnet/seed-released-state.py
633-
sudo -u agentnet env PYTHONDONTWRITEBYTECODE=1 "$PYTHON_0144" /var/lib/agentnet/seed-released-state.py >"$WORK/released-fixture.json"
633+
# Core resolves its DSN from the configured variable name, which the unit
634+
# supplies through its environment file; the seed runs outside the unit.
635+
sudo -u agentnet env PYTHONDONTWRITEBYTECODE=1 \
636+
AGENTNET_DATABASE_URL="postgresql://agentnet@%2Fvar%2Frun%2Fpostgresql/agentnet" \
637+
"$PYTHON_0144" /var/lib/agentnet/seed-released-state.py >"$WORK/released-fixture.json"
634638
sudo rm -f /var/lib/agentnet/seed-released-state.py
635639
HARNESS_ID="$(jq -r '.harness_id' "$WORK/released-fixture.json")"
636640
CREDENTIAL_ID="$(jq -r '.credential_id' "$WORK/released-fixture.json")"

0 commit comments

Comments
 (0)