fix(justfile): supply MOKOSH_OIDC_CLIENT_ID placeholder in down teardown (MAPPS-159) #146
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/MAPPS-159-down-oidc-client-id-placeholder"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The
downrecipe runsdocker compose --file compose.yml --file compose.dev-sso.yml down --remove-orphansinside a defensivewith-env { HOST_IP, USER }block so teardown interpolates even without a populated.env. But the merged config declares three${VAR:?}required vars:HOST_IP,USER, andMOKOSH_OIDC_CLIENT_ID. The block covered the first two but not the third. mokosh-apps has noensure-envrecipe and does not auto-generate.env;MOKOSH_OIDC_CLIENT_IDis pasted in manually afterjust register-client. So on a fresh clone (or before client registration)just down/just restartaborted withrequired variable MOKOSH_OIDC_CLIENT_ID is missing a value.Fix
Add a harmless placeholder for
MOKOSH_OIDC_CLIENT_IDto thedownrecipe'swith-env, matching howHOST_IPis already handled. Teardown only identifies and removes resources, so the placeholder value is irrelevant.restartinherits the fix via itsdowndependency.Verification
just --justfile justfile --listparses. Audited the full:?set in the mergedcompose.yml+compose.dev-sso.yml: the only required vars areHOST_IP,USER,MOKOSH_OIDC_CLIENT_ID, all now provided by the defensive block.Part of a cross-repo sweep of the same family of defect originating in the
cleanup.justgovernance template (GOV-9). Siblings: PMS-307 (mokosh-server, PR #238), PB-4 (backup, PR #19), ROCI-7 (roci, PR #16).🤖 Generated with Claude Code
The down recipe set HOST_IP and USER defensively in its with-env so teardown interpolates even without a populated .env, but the merged compose.yml + compose.dev-sso.yml also declares `${MOKOSH_OIDC_CLIENT_ID:?}` as required. Since mokosh-apps has no ensure-env / .env autogen and that var is pasted in manually after `just register-client`, `just down` (and `just restart`) aborted with "required variable MOKOSH_OIDC_CLIENT_ID is missing a value" on a fresh clone or before client registration, defeating the recipe's own defensive intent. Add a harmless placeholder for MOKOSH_OIDC_CLIENT_ID alongside HOST_IP and USER. Teardown only identifies and removes resources, so the value is irrelevant. restart inherits the fix via its down dependency. #MAPPS-159 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>