-
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
Option to disable locking. #1212
Comments
@lkysow I would like to look at working on this as it would work well with the disable apply feature I see a few options here when a new flag enabling this feature is set either:
The second option would work best for my use case where I want to disable the apply functionally as that is handled externally, but I can see how this would break the Atlantis workflow as a PR would never be in the right state(have a valid plan) to apply So I think I've talked myself into the first option but wanted to run this past you before I start to look at it, Does this sound sensible to you? |
I don't think there is any need to invalidate the old plan until either of the PRs apply. In that case we could invalidate the existing plans (will be necessary unless the apply was a no-op). However even if we don't terraform will report an error due to a stale plan when you try to apply it. So I see some pretty good options:
The only concern is that there are some cases where there is good reason to take a lock. For example if you are This makes me think that we may still want to keep the lock, but to stop using it for plans. Imagine this: Common Case
Explicit lock
I think in this case we can preserve the old locks (better to be safe than sorry). It is just that new PRs wouldn't take locks. There is another case that might be interesting. This is taking a lock just for the apply process. If you imagine that a lot of people are trying to apply at once it can cause a lot of replans. In this case it may make sense to hold the lock after an To summarize:
Possible config options:
This seems like the best case for my team. Does that make sense to you? |
has this been added as a server side config? disabling locking? |
Sorry its taken so long for me to get back to this I don't think disabling locking altogether is a good idea - It was obviously added for a reason, and thinking about it I think the locking is tied into the plan output files so you need a successful plan and lock before an apply can be done I have created #1258 which works for my use case where we don't want to use Atlantis to do the Terraform apply and want to use it for previewing changes (we have a separate workflow that does terraform apply when a PR is merged to master) |
The plans themselves can detect if they are stale, there is no need for the extra lock from this perspective. IIUC the argument for the lock is so that people aren't confused when their apply fails. However if the team is aware of that it isn't an issue. |
@gezb Isn't the terraform lock enough, in situations where you don't mind your plan getting invalidated by another PR? |
the ability to specify this in a command, such as |
@nwsparks currently locking can be disabled using --disable-repo-locking https://www.runatlantis.io/docs/server-configuration.html#disable-repo-locking See the related issue #2237 for the same feature youre proposing |
Atlantis locking can be overly restrictive and can delay work on some PR because another PR is open. Some teams would prefer to use atlantis without locks.
For example if I open a PR for a locked project it would be nice if I could still plan and see the result. This way I can make fixes, improvements and a code review without waiting for the other PR to be submitted.
Additionally if my PR is ready to submit before the prior PR it would be nice (to have an option) to submit. This would invalidate the plan on the other PR but this may be preferable to blocking this PR. To make this even more transparent atlantis could automatically re-plan the older PR so that review can continue.
With these options enabled it would be possible to have multiple changes to the same project in-flight in parallel.
The text was updated successfully, but these errors were encountered: