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

Fixes #1006: Keep track of project status even if plans have been deleted #1092

Merged
merged 13 commits into from
Jun 24, 2020

Conversation

lkysow
Copy link
Member

@lkysow lkysow commented Jun 24, 2020

Merging master into #1005

Paris Morali and others added 13 commits April 23, 2020 17:17
Extra guards have been added to preven automatically
merging a branch upstream when automerge is enabled
but errors exist or if no commands where executed at all.

An example of this bug in action is when you delete a plan and
atlantis lock via the UI and then execute
atlantis apply
No projects are applied but the branch is automerged
As part of the fix the model is slightly extended
to allow for an extra PlanStatus indicating the absence
of a plan for a project. This allows us to unlock a project
and delete the plan, without having to completely remove the
project status.
That means that atlantis knows there is a project that should
normally have a plan and be accounted for, but the plan has been
deleted/unlocked.
The reason this is important is so that we can't "trick" atlantis
into thinking that the PR can be merged just because we've lost
track of a projectstatus as a result of a manual unlock.
With BoltDB interface we are able to mock/stub and
improve test coverage.
Some other refactoring was required to make code aware
and compatible with the new interface
@lkysow lkysow merged commit f944204 into master Jun 24, 2020
@lkysow lkysow deleted the deleted-status branch June 24, 2020 05:25
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.

1 participant