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
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
If you are interested in working on this issue or have submitted a pull request, please leave a comment.
Overview of the Issue
Similar to #3531, when running an atlantis unlock command on a PR, the whole working directory is deleted, rather than just the plan files. This is an issue especially on PRs with a large number of plans, as the next plan on the PR must then go through the terraform init process again for each plan, playing the 'Russian Roulette' as to whether the outstanding race condition with the Terraform provider cache will cause a failure as discussed in hashicorp/terraform#31964.
Reproduction Steps
Create a PR that contains changes for at least one plan.
Comment atlantis plan on the PR.
On the Atlantis server, check that the working directory for the PR has been created and the relevant repo branch has been cloned into it, and the relevant tfplan files created.
Comment atlantis unlock on the PR.
On the Atlantis server, see that the working directory for the PR is now empty.
Environment details
Atlantis version: 0.25.0
Additional Context
I recommend changing the DeleteLocksByPull function here
to call WorkingDir.DeletePlan rather than deleteWorkingDir which would mean just the plan files are deleted, and the working directory remains, complete with any initialised Terraform folders.
The text was updated successfully, but these errors were encountered:
Community Note
Overview of the Issue
Similar to #3531, when running an
atlantis unlock
command on a PR, the whole working directory is deleted, rather than just the plan files. This is an issue especially on PRs with a large number of plans, as the next plan on the PR must then go through theterraform init
process again for each plan, playing the 'Russian Roulette' as to whether the outstanding race condition with the Terraform provider cache will cause a failure as discussed in hashicorp/terraform#31964.Reproduction Steps
atlantis plan
on the PR.atlantis unlock
on the PR.Environment details
0.25.0
Additional Context
I recommend changing the
DeleteLocksByPull
function hereatlantis/server/events/delete_lock_command.go
Line 62 in 70c9f17
WorkingDir.DeletePlan
rather thandeleteWorkingDir
which would mean just the plan files are deleted, and the working directory remains, complete with any initialised Terraform folders.The text was updated successfully, but these errors were encountered: