-
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
fix: Check for upstream changes to merge only when planning #3493
Merged
nitrocode
merged 4 commits into
runatlantis:main
from
finnag:fix-merge-strat-with-workflow-hooks
Jun 6, 2023
Merged
fix: Check for upstream changes to merge only when planning #3493
nitrocode
merged 4 commits into
runatlantis:main
from
finnag:fix-merge-strat-with-workflow-hooks
Jun 6, 2023
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
When using the merge checkout strategy, we would peviously re-clone on upstream updates on any call to Clone(), for example when running workflow hooks or runing import commands. If we had already ran a plan, and master was updated, this would delete the plan and apply would not have anything to apply. Modified to only re-clone on upstream updates in doPlan()
finnag
changed the title
Check for upstream changes to merge only when planning
Fix: Check for upstream changes to merge only when planning
Jun 6, 2023
finnag
changed the title
Fix: Check for upstream changes to merge only when planning
fix: Check for upstream changes to merge only when planning
Jun 6, 2023
@GenPage @nitrocode any comments? It looks good to me |
nitrocode
reviewed
Jun 6, 2023
nitrocode
reviewed
Jun 6, 2023
nitrocode
reviewed
Jun 6, 2023
nitrocode
reviewed
Jun 6, 2023
nitrocode
approved these changes
Jun 6, 2023
2 tasks
mtavaresmedeiros
pushed a commit
to mtavaresmedeiros/atlantis
that referenced
this pull request
Jul 3, 2023
…tis#3493) * whitespace fixes * Only re-clone on upstream updates just before planning When using the merge checkout strategy, we would peviously re-clone on upstream updates on any call to Clone(), for example when running workflow hooks or runing import commands. If we had already ran a plan, and master was updated, this would delete the plan and apply would not have anything to apply. Modified to only re-clone on upstream updates in doPlan() * Apply suggestions from code review --------- Co-authored-by: PePe Amengual <[email protected]> Co-authored-by: nitrocode <[email protected]>
ijames-gc
pushed a commit
to gocardless/atlantis
that referenced
this pull request
Feb 13, 2024
…tis#3493) * whitespace fixes * Only re-clone on upstream updates just before planning When using the merge checkout strategy, we would peviously re-clone on upstream updates on any call to Clone(), for example when running workflow hooks or runing import commands. If we had already ran a plan, and master was updated, this would delete the plan and apply would not have anything to apply. Modified to only re-clone on upstream updates in doPlan() * Apply suggestions from code review --------- Co-authored-by: PePe Amengual <[email protected]> Co-authored-by: nitrocode <[email protected]>
ijames-gc
pushed a commit
to gocardless/atlantis
that referenced
this pull request
Feb 13, 2024
…tis#3493) * whitespace fixes * Only re-clone on upstream updates just before planning When using the merge checkout strategy, we would peviously re-clone on upstream updates on any call to Clone(), for example when running workflow hooks or runing import commands. If we had already ran a plan, and master was updated, this would delete the plan and apply would not have anything to apply. Modified to only re-clone on upstream updates in doPlan() * Apply suggestions from code review --------- Co-authored-by: PePe Amengual <[email protected]> Co-authored-by: nitrocode <[email protected]>
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
When using the merge checkout strategy, only check for upstream changes and re-clone when creating a plan.
why
Previously we would check for upstream changes and merge them during any call to Clone(), but if we had already made a plan, this would remove the generated plan. This would always happen if any workflow hooks were defined, and any other PRs had been merged between plan and apply.
It is only safe to re-clone and merge new upstream changes and after grabbing the directory lock, but before creating a plan.
tests
references