-
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
feat: Add logic for project name into lock #4192
Merged
lukemassa
merged 4 commits into
runatlantis:main
from
lukemassa:add_logic_for_project_name_into_lock
Feb 12, 2024
Merged
feat: Add logic for project name into lock #4192
lukemassa
merged 4 commits into
runatlantis:main
from
lukemassa:add_logic_for_project_name_into_lock
Feb 12, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lukemassa
requested review from
jamengual,
nitrocode and
X-Guardian
and removed request for
a team
February 6, 2024 04:59
lukemassa
force-pushed
the
add_logic_for_project_name_into_lock
branch
from
February 6, 2024 05:00
29aea90
to
f354831
Compare
jamengual
reviewed
Feb 6, 2024
jamengual
approved these changes
Feb 6, 2024
lukemassa
force-pushed
the
add_logic_for_project_name_into_lock
branch
from
February 8, 2024 14:33
58c4bc9
to
6cec24c
Compare
GenPage
approved these changes
Feb 9, 2024
lukemassa
force-pushed
the
add_logic_for_project_name_into_lock
branch
from
February 12, 2024 15:35
6cec24c
to
3b6ac72
Compare
/cherry-pick release-0.27 |
/cherry-pick release-0.27 |
gcp-cherry-pick-bot bot
pushed a commit
that referenced
this pull request
Feb 12, 2024
* feat: Add logic for project name into lock * More logic * Fix tests * Add tests
GenPage
pushed a commit
that referenced
this pull request
Mar 8, 2024
* feat: Add logic for project name into lock * More logic * Fix tests * Add tests
GenPage
pushed a commit
that referenced
this pull request
Mar 8, 2024
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
what
Add logic of project name into locks.
why
I'm actually not totally sure why
Project
in models didn't have aProjectName
before. Adding this made it so we can, e.g., correctly identify the project plan files that need to be deleted when we run atlantis unlock (See #3845)This is not a total fix, and instead kicks the can down the road a little bit. Specifically, I do not implement
project_finder()
to understand about project names, because frankly I'm not totally sure how, so I just assume the project doesn't have a name (i.e. empty string for ProjectName). That said, this is no worse than the current implementation, which implicitly assumes the project doesn't have a name "deeper" in the call stack.In this sense, in my opinion this PR is a net positive, in that it moves us in the right direction, fixes a particular bug, and (as far as I know) doesn't introduce any regressions.
tests
Confirming the expected behavior change
I configured a workspace with a name
projectname
, did a plan, then attempted to unlock.Before:
After:
Confirming no regressions
name
is absent, the behavior is as before:name
is present, closing the PR itself retains its previous behavior of blowing away the entire directory (and there is no log line of atlantis even attempting to delete the plan file)references
Closes: #3845