Skip to content

ci: wait for the terraform state lock instead of failing - #671

Closed
jvrplmlmn wants to merge 1 commit into
masterfrom
jvrplmlmn/ci-lock-timeout
Closed

jvrplmlmn wants to merge 1 commit into
masterfrom
jvrplmlmn/ci-lock-timeout

Conversation

@jvrplmlmn

Copy link
Copy Markdown
Contributor

Related:

All workflow runs share one remote terraform state. When several PRs merged within minutes, their merge-push runs collided on it and Create repositories failed with workspace already locked (run 34815869804, likely also 27335334287). Every generate job needs repos, so all of them were skipped, and the two Talos libs were never published.

  • Adds -lock-timeout=10m to terraform plan and terraform apply in both repos and repos_with_pages, so concurrent runs wait for the lock instead of failing.

No concurrency group: GitHub keeps at most one pending run per group and cancels older pending ones, which would drop the cancelled run's merge-push generation and recreate the same problem.

Note: -lock-timeout retry behavior against the remote backend is untested.

All workflow runs share one remote terraform state. When several PRs merged
within minutes, their merge-push runs collided on it and "Create
repositories" failed with "workspace already locked" (run 34815869804, and
likely 27335334287). Every generate job needs `repos`, so they were all
skipped, and since a lib is only generated on the merge push that touches
it, the two Talos libs (#650, #651) were never published.

Waiting up to 10m on plan and apply lets concurrent runs take turns on the
lock. A `concurrency` group was not used: GitHub keeps at most one pending
run per group and cancels older pending ones, which would drop the
cancelled run's merge-push generation and recreate the same problem.
@jvrplmlmn

Copy link
Copy Markdown
Contributor Author

Unfortunately don't have bandwidth to work on this right now, closing.

@jvrplmlmn jvrplmlmn closed this Nov 3, 2026
@jvrplmlmn
jvrplmlmn deleted the jvrplmlmn/ci-lock-timeout branch November 3, 2026 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant