-
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
docs: safely disable atlantis locking #2876
Comments
Some users like @brandon-fryslie have been able to disable locking successfully. |
I disabled locking successfully since Jan 2024 and have not noticed any issues. |
I disabled both Atlantis and Terraform locks in dev (init/plan only) and have seen 0 problems whatsoever. The repo has multiple PRs per day. I was keeping on top of it, but I took some time off and there are 30+ open PRs now. Just to give you an idea of how much traffic this repo gets. If there were issues we'd likely have seen them. We also have Atlantis parallelization enabled (using a "fake workflow" hack, by setting the workflow in Atlantis config then overriding the built-in commands for init/plan/apply to skip workflow switching. this gives us the folder structure needed for Atlantis parallelization without requiring us to use tf workflows). It's not uncommon to have a PR run 20-30 Atlantis projects. And no issues with locks disabled on both Atlantis and Terraform, for non-destructive operations. Obviously you'll want locks enabled for |
Very cool. I can say the same still, no issues after 7 months. Devs are very happy and PRs get merged quickly and painlessly. I'll add a document for this in the website. |
cc: @jamengual @GenPage |
Community Note
Describe the user story
Atlantis locking is probably the least favorite feature among devs and blocks users often. I'm sure it's useful as a default. It would be good to know the configuration needed to safely disable it without compromising the workflow.
Describe the solution you'd like
Document what configuration is needed to safely disable locking without compromising workflows
Can atlantis locking be safely disabled if using the following?
Workflow scenario: simultaneous plan
-lock=false
can be set in a custom workflow for planWorkflow scenario: simultaneous apply
Workflow scenario: stale plan
PR 1 checks out dir global
env
to some resourcemain
to feature branchPR 2 checks out the same dir and workspace
t3.small
main
to feature branchPR 2 is approved and
atlantis apply
comment applies the tf and merges PR 2 tomain
PR 1 plan is now stale
If atlantis apply is run on pr 1 now, the plan should say that it is stale and the plan needs to be rerun.
A new
atlantis plan
or commit will trigger the merge frommain
before auto planningOne caveat worth exploring from @apparentlymart
https://gist.github.com/apparentlymart/657885e730d1e5abc6ea#stale-plan-files
This method would also allow HA out of the box without having to use a separate redis cluster for locking (see #2491).
Describe the drawbacks of your solution
No idea which PRs are modifying the same project
Describe alternatives you've considered
None
The text was updated successfully, but these errors were encountered: