feat: add lock-aware retry to CI apply step #100
No reviewers
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/pal-e-platform!100
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "98-feat-add-lock-aware-retry-to-ci-apply-st"
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?
Summary
tofu applyfails with "state is already locked", automatically extract the lock ID, force-unlock, and retry onceChanges
.woodpecker.yaml-- replaced singletofu apply -auto-approve -no-colorcommand in the apply step with a POSIX sh lock-detection-and-retry scriptTest Plan
python3 -c "import yaml; yaml.safe_load(open('.woodpecker.yaml'))"Review Checklist
Related
phase-platform-17b-tf-state-governance-- CI Lock Recovery (Phase 17b.1)Generated with Claude Code
Tofu Plan Output
Review: PASS
Scope: 1 file, 19 additions, 1 deletion. Only
.woodpecker.yamlapply step modified.Checks
PIPESTATUS, nogrep -P, no[[. Exit code captured via subshell + temp file. All constructs are POSIX sh safe.grep -qsupported.sed -nwith\ssupported in BusyBox sed (Alpine).head -1supported.exit "$APPLY_EXIT"- |properly indented, surrounding steps unaffectedpython3 -c "import yaml; yaml.safe_load(...)"tofu fmt -check -recursivepassesNote
\sin the sed pattern is a GNU/BusyBox extension, not strictly POSIX. Alpine's BusyBox sed supports it. If strict POSIX compliance ever matters, replace with[ \t]. Not blocking for this target environment.No fixes needed. Ready for merge.