Repository navigation
refactor(scripts): move provisioning scripts to scripts/provision/ - #2077
Merged
Merged
Conversation
Contributor
🔍 Rendered manifest diff — this PR vs
|
2 tasks
…cture provision/: three risk-grouped moves, each simulated end to end (refs 88/0, paths 0 failed, suites 23/1/0). The openbao-snapshot symlink moves with openbao-config.sh, which runs it as a sibling at apply time.
… scripts/provision/
Smana
force-pushed
the
refactor/scripts-provision
branch
from
September 22, 2026 09:19
bcc9430 to
0f95d7c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR 3 of 3, and the last step of the
scripts/restructure. It moves the apply-time provisioning scripts intoscripts/provision/. After it,scripts/holds no loose executables (spec criterion 1):📋 Design
2026-09-17-scripts-restructure-design.md. It calls this "the one that can fail at 2am".2026-09-22-scripts-restructure-pr3-plan.md. PRs 1 (refactor(scripts): move the CI half to scripts/ci, index it with task #2061) and 2 (refactor(scripts): move ops and docs scripts by audience, gate terramate script paths #2076) are merged.What moved
The files moved in three commits, one per risk group, each ending green. A fourth commit came from the rebase on #2078:
tm-provisioner.sh,helm-release-present.sh,openbao-adopt-jwt-mount.shopenbao-config.sh,secret-store.sh, and theopenbao-snapshot.shsymlink, re-pointedzitadel-idp.sh,zitadel-actions/,zitadel-oidc-clients.shopenbao-oidc-check.sh, which #2078 added at the rootTwo lines change for 172 uses of
tm-provisioner.sh:global.provisionerandglobal.cloud_gate, which names it separately.openbao-snapshot.shstays a symlink and moves next toopenbao-config.sh, which runs it as a sibling at apply time (:1224,:1403, unchanged).Nine
lib/sources gained one../. Thirteen test suites now point atprovision/, and no "still at scripts/ root" comment is left. The four human-run scripts are indexed astask provision:*. The terramate and tofu plumbing is not.Every count was predicted by simulating each move first, and matched. Both gates are green on every intermediate commit, so the branch is bisectable.
This is the one PR where
terramate script run previewis real evidence:helm-release-present.shruns at plan time throughdata "external"in bothconfigurestacks, so a wrong path fails the preview. It can share a cluster session with the post-merge rebuild of #2078 (#2045).TM_CLOUD=aws terramate script run previewandTM_CLOUD=gcp terramate script run previewboth succeedEvidence
Run on this branch, rebased on
main@8eceefc6(after #2078):In addition:
terramate fmt --checkpasses.tofu fmt -checkpasses on all 11 touched directories, andtofu validateon 7 stacks. Neither step touched state.findpasses.terramate debug show globalsresolves everyscripts/path in all 16 stacks.Notes for review
lib/sources inzitadel-oidc-clients.sh, andsso.mdstep 1. Each takes feat(openbao): reconcile the OIDC client after ZITADEL rotates it #2078's content at theprovision/path.0f95d7c8movesopenbao-oidc-check.shintoprovision/and re-points stage4's CA fetch, stage5, both suites, thelib/sources and the docs. The two path gates found all 8 stale spots (3 refs, 5 paths) before the fix..tffiles skippedterraform_fmt,terraform_validateandterraform_tflint, after the known pre-commit-terraformGIT_INDEX_FILEleak swapped the worktree index. The index was repaired withgit read-tree HEAD. All three hooks were run by hand on every touched stack and pass; detect-secrets and every other hook ran. CI's pre-commit job runs--all-files, including those three.openbao-snapshotimage. Comment edits undercontainer-images/openbao-snapshot/trigger a rebuild. The script change is comments only.test -f "$(readlink -f scripts/openbao-snapshot.sh)". By owner decision, the check is nowtest -f "$(readlink -f scripts/provision/openbao-snapshot.sh)".scripts/provision/…. They are stamped only on newly created secrets and never compared.