-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 ability to disable Atlantis locking a repo #1340
Add the ability to disable Atlantis locking a repo #1340
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1340 +/- ##
==========================================
+ Coverage 70.01% 70.03% +0.02%
==========================================
Files 74 74
Lines 5556 5570 +14
==========================================
+ Hits 3890 3901 +11
- Misses 1307 1308 +1
- Partials 359 361 +2
Continue to review full report at Codecov.
|
Co-authored-by: kbaldyga <[email protected]>
I'm not sure if I should also not render |
Definitely a bigger fan of this approach than #1258. Disabling the unlock message as you have done seems appropriate to me as this is what we have done for other flags in the past. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
I have one question about this. Forgive me for not understanding Atlantis internals. This seems to disable the automatic lock taken by Atlantis. I think this is very helpful. However does the current approach allow manual locking? For example when doing manual work or otherwise applying outside of Atlantis it often is useful to take a "manual" lock. Would this be incompatible with that? |
Hi @kevincox yes this option would be incompatible with taking a manual lock as the call to take any repo/project lock does not do anything, When I revisited this I looked at the easiest way to disable locking without having to make too may changes to the internals of Atlantis because a lot of the comments on the issue around this and my other attempt were along the lines of why bother locking if you are just unlocking once the plan had been run and pointing out the fact that Terraform does it own locking |
I think this is still an improvement as currently our team just ignores locks anyways because most of them are pointless. However it would be nice at some point in the future to have support for manual locking. Since the noise is down this would provide a clear signal that someone is working on something. |
This change introduces a no-op Locker implementation that when enabled effectively disables the locking of projects and workspace
This is another possible solution to #1212, my initial change just automatically unlock after a plan had run (#1258)