mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-08-04 05:48:54 +00:00
1e00e2fa1cde4ea0a89cbf89b6585260838974f1
merge strategy, reclone when necessary on base update (#3187)
* merge again if base branch has been updated The current "merge" checkout strategy is unsafe. It merges the PR and the base branch without holding the directory lock(s), so there is a potentially very long window where another PR can be applied and be unexpectedly reverted later. This happens occasionally if a PR causes plans in multiple directories, but is almost _guaranteed_ to happen if the initial plan has to wait until a lock is freed up and a manual "atlantis plan" command is given. Instead of printing a warning when this happens, we now merge again if necessary while holding the lock. Plans are then guaranteed to only be made when merged with the base branch for each directory being planned, and applying later should be safe even if the base branch sees further updates. This fixes/affects #804, #867, #979 * Remove diverged test that no longer applies * Reinstate TestClone_MasterHasDiverged test and make it pass * Extend TestClone_MasterHasDiverged to test new merging functionality We now verify that the first Clone with CheckoutMerge=true with a diverged base branch atually clones and merges again. --------- Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
Atlantis

Terraform Pull Request Automation
Resources
- How to get started: www.runatlantis.io/guide
- Full documentation: www.runatlantis.io/docs
- Download the latest release: github.com/runatlantis/atlantis/releases/latest
- Get help in our Slack channel
- Start Contributing: CONTRIBUTING.md
What is Atlantis?
A self-hosted golang application that listens for Terraform pull request events via webhooks.
What does it do?
Runs terraform plan, import, apply remotely and comments back on the pull request with the output.
Why should you use it?
- Make Terraform changes visible to your whole team.
- Enable non-operations engineers to collaborate on Terraform.
- Standardize your Terraform workflows.