Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
fix(gfs): guard context_allowed_via_env against empty ALLOWED_CONTEXTS
Alfredo Lopezd532db49dca6
diff --git a/deploy/scripts/provision-gfs-runtime.sh b/deploy/scripts/provision-gfs-runtime.shindex 06582c4d7..d612a10fb 100755--- a/deploy/scripts/provision-gfs-runtime.sh+++ b/deploy/scripts/provision-gfs-runtime.sh@@ -91,8 +91,10 @@ done# same override idiom the sibling scripts use (run-control-api-db-migration.sh,# scripts/e2e/seed-e2e-data.sh). A prod-looking context is hard-denied regardless.context_allowed_via_env() {- local c allowed- IFS=',' read -r -a allowed <<<"${ALLOWED_CONTEXTS:-}"+ local c+ [ -n "${ALLOWED_CONTEXTS:-}" ] || return 1+ local -a allowed=()+ IFS=',' read -r -a allowed <<<"${ALLOWED_CONTEXTS}"for c in "${allowed[@]}"; do[ -n "$c" ] && [ "$CONTEXT" = "$c" ] && return 0donediff --git a/scripts/tests/test-provision-gfs-runtime.sh b/scripts/tests/test-provision-gfs-runtime.shindex bf69dcce4..b8efed163 100755--- a/scripts/tests/test-provision-gfs-runtime.sh+++ b/scripts/tests/test-provision-gfs-runtime.sh@@ -26,8 +26,12 @@ MOCKchmod +x "$TMP/bin/bash" "$TMP/bin/kubectl"export CALL_LOG="$TMP/calls.log"+# clerum-dev-test is not one of the generic built-in dev patterns+# (*example-dev*, minikube, clerum-test, clerum-codex-*, ...), so authorize it+# through the ALLOWED_CONTEXTS override — the same mechanism a self-hosted dev+# pipeline uses for a GKE dev context that the generic patterns do not name.for run in first-upgrade idempotent-rerun; do- PATH="$TMP/bin:$PATH" /bin/bash "$ROOT/deploy/scripts/provision-gfs-runtime.sh" \+ ALLOWED_CONTEXTS=clerum-dev-test PATH="$TMP/bin:$PATH" /bin/bash "$ROOT/deploy/scripts/provision-gfs-runtime.sh" \--context clerum-dev-test \--overlay "$TMP/overlay" \--skip-auth-sync >/dev/null