Skip to content

fix(deploy.sh): initialise ENABLE_MODEL_ARMOR_FLAG so IL4/IL5 don't abort on an empty jq argument - #204

Open
AloysJehwin wants to merge 1 commit into
google:mainfrom
AloysJehwin:fix/model-armor-flag-uninitialized
Open

fix(deploy.sh): initialise ENABLE_MODEL_ARMOR_FLAG so IL4/IL5 don't abort on an empty jq argument#204
AloysJehwin wants to merge 1 commit into
google:mainfrom
AloysJehwin:fix/model-armor-flag-uninitialized

Conversation

@AloysJehwin

Copy link
Copy Markdown
Contributor

ENABLE_MODEL_ARMOR_FLAG is only ever assigned inside the FEDRAMP_HIGH/NONE branch, but it's read unconditionally a few lines later as --argjson model_armor "\$ENABLE_MODEL_ARMOR_FLAG". Under IL4 or IL5 the branch never runs, jq is handed an empty argument, and since the script runs under set -e it aborts right there — after the operator has already answered every other prompt in the app loop.

Initialised it to false just before the gate. Doing it inside the loop rather than once at the top also means a previous app's answer can't leak into the next iteration, which would have been a quieter version of the same bug.

This is the same code path #179 touches from the other side — that one is about option 4 leaving the regime empty; this is about IL4/IL5, which stay broken regardless of that fix.

Fixes #177

…gate

The only two assignments were inside the FEDRAMP_HIGH/NONE branch, but the
value is consumed unconditionally by jq --argjson. Under IL4/IL5 the variable
was unset, so jq got an empty argument and set -e aborted the script part-way
through configuring applications. Initialising per iteration also stops a
previous app's answer leaking into the next one.

Fixes google#177

Signed-off-by: Aloys Jehwin <aloysjehwin@gmail.com>
@aghassemlouei aghassemlouei added bug Something isn't working Priority - High Critical issues blocking development or users; urgent bugs or core features for release Level of Effort - Low Quick, well-defined tasks with no unknowns; takes a few hours up to one day to complete gemini for government Gemini for Government (G4G) related gemini enterprise Gemini Enterprise (GE) related labels Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working gemini enterprise Gemini Enterprise (GE) related gemini for government Gemini for Government (G4G) related Level of Effort - Low Quick, well-defined tasks with no unknowns; takes a few hours up to one day to complete Priority - High Critical issues blocking development or users; urgent bugs or core features for release

Projects

None yet

2 participants