You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: Error releasing the state lock
Error message: unable to unlock workspace while state version upload is
still pending
Lock Info:
ID: xxxxxxxxxxxxxxxxxx
Path:
Operation: OperationTypeApply
Who: root@github-runner-xxx
Version: 1.10.0
Created: 2024-12-03 03:08:52.868010616 +0000 UTC
Info:
Expected Behavior
Release lock operation should be retries till the state version upload is complete
"""
Workspaces API unlock action will now return a 400 status instead of 503 when the latest state version is still pending, but only for Terraform CLI 1.10+ clients.
"""
Because a 400 is returned, the terraform client does not do any retry and fails immediately. This is the code where retry logic is configured :
Terraform Version
Terraform Configuration Files
Debug Output
Expected Behavior
Release lock operation should be retries till the state version upload is complete
Actual Behavior
Error releasing the state lock
Steps to Reproduce
We were able to reproduce it consistently with
This was also happening when plan was empty
Additional Context
We believe this is happening because of this change in 1.10+. This is from the release log of terraform enterprise version https://developer.hashicorp.com/terraform/enterprise/releases/2024/v202410-1
"""
Workspaces API unlock action will now return a 400 status instead of 503 when the latest state version is still pending, but only for Terraform CLI 1.10+ clients.
"""
Because a 400 is returned, the terraform client does not do any retry and fails immediately. This is the code where retry logic is configured :
go-tfe/tfe.go
Line 605 in f9d7888
Cross posted here : hashicorp/terraform#36155
The text was updated successfully, but these errors were encountered: