Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the option to automatically unlock a repo after a plan has been run #1258

Closed
wants to merge 2 commits into from
Closed

Add the option to automatically unlock a repo after a plan has been run #1258

wants to merge 2 commits into from

Conversation

gezb
Copy link
Contributor

@gezb gezb commented Nov 12, 2020

This new option is designed to be used when apply is disabled, there is no reason to hold a lock/plan in this configuration

@codecov
Copy link

codecov bot commented Nov 12, 2020

Codecov Report

Merging #1258 (bafcaa1) into master (1513ee6) will decrease coverage by 0.05%.
The diff coverage is 16.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1258      +/-   ##
==========================================
- Coverage   70.01%   69.95%   -0.06%     
==========================================
  Files          74       74              
  Lines        5556     5562       +6     
==========================================
+ Hits         3890     3891       +1     
- Misses       1307     1311       +4     
- Partials      359      360       +1     
Impacted Files Coverage Δ
cmd/server.go 79.09% <ø> (ø)
server/events/command_runner.go 50.00% <0.00%> (-0.88%) ⬇️
server/events/comment_parser.go 93.98% <ø> (ø)
server/user_config.go 100.00% <ø> (ø)
server/server.go 62.34% <100.00%> (+0.09%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1513ee6...bafcaa1. Read the comment docs.

@gezb gezb mentioned this pull request Nov 12, 2020
@kevincox
Copy link

What is the point of locking at all if you are just going to unlock afterwards?

@gezb
Copy link
Contributor Author

gezb commented Nov 12, 2020

My thoughts were it prevents Atlantis running two plans on the same repo at the same time e.g, two pull requests come in around the same time so trigger an plans

@kevincox
Copy link

Terraform already has locking for this built in. By default the second plan will wait for the first. (You can configure the timeout). It seems that this just pessimizes the regular terraform locking.

@jamengual
Copy link
Contributor

when multiple people work on the same repo on different PRs it is pretty annoying when you run a plan and atlantis is locking the whole repo indefinite instead of releasing the lock after plan, so I see how this could help on that case.

not all the plans end up being applied so this could be useful and the only way I know to get around this is to close the PR so another PR can do plan, which is less than ideal and is not related to Terraform remote state locking directly.

jamengual
jamengual previously approved these changes Jan 6, 2021
@jamengual jamengual dismissed their stale review January 6, 2021 21:53

done by mistake

@gezb
Copy link
Contributor Author

gezb commented Jan 6, 2021

I have rebased to see if that fixes the website link test that had failed, I can't see how fixing a typo in the docs would have broken that otherwise

@gezb
Copy link
Contributor Author

gezb commented Jan 11, 2021

Closing replaced by #1340

@gezb gezb deleted the feature/unlock_after_plan branch June 25, 2021 20:28
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.

3 participants