fix(e2e): repository policy applies live, so seeding no longer restarts archied

Issue: archie-core-m5aqb
This commit is contained in:
sam committed 2026-10-13 16:15:07 +11:00
1 parent acacdfdab5
commit 59645969ee
1 file changed
+1 -2
+1 -2
View File
@@ -13,12 +13,11 @@ post() { curl -fsS -X POST "$base$1" "${H[@]}" -d "$2"; }
# jq-free JSON reads: py EXPR, with the parsed body as d.
py() { python3 -c "import sys, json; d = json.load(sys.stdin); print($1)"; }
# Repository policy. archied reads policies only at boot, so restart it.
# Repository policy. archied applies it live; the pause lets the watch publish it.
if ! get /api/control-plane/resources/repository-policies | grep -q '"widgets"'; then
version=$(get /api/control-plane/resources/repository-policies | py 'd["resource"]["version"]')
post /api/control-plane/resources/repository-policies/commands/replace \
"{\"value\":[{\"owner\":\"acme\",\"name\":\"widgets\",\"base\":\"main\"}],\"expected_version\":$version}" >/dev/null
"$here/stack.sh" restart archied
sleep 5
fi