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

Add the ability to ignore older plans that are no longer part of the current diff #2608

Closed
1 task done
Fauzyy opened this issue Oct 20, 2022 · 1 comment
Closed
1 task done
Labels
feature New functionality/enhancement help wanted Good feature for contributors

Comments

@Fauzyy
Copy link
Contributor

Fauzyy commented Oct 20, 2022

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Describe the user story

  1. When a user runs atlantis apply, Atlantis should ignore any plan files that are no longer part of the current git diff / pull status.
  2. When a user run atlantis apply -p <project_name>, Atlantis should return an error if the plan file is from a project that's no longer part of the current git diff / pull status.

This has come to bite us in the past, where a user runs atlantis apply and it unexpectedly applies workspaces that have since been removed from the git diff. I think we should add a flag which disables running planfiles which are out of scope for the curent PullStatus.

Describe the solution you'd like

To preserve the old behaviour a server-side flag could be added which will ignore plan files that are outside the scope of the current pull status: ignore-stale-plan-files:<true|false>

Describe the drawbacks of your solution

If we're maintaining a server-side flag vs just changing the behaviour here, we'd have to maintain two branches of logic: one for the old behaviour and one for the new.

Describe alternatives you've considered

Instead of a flag we could just change the behaviour of apply to ignore these older plan files, but there should be a stronger consensus from the community for this.

@Fauzyy Fauzyy added the feature New functionality/enhancement label Oct 20, 2022
@jamengual jamengual added the help wanted Good feature for contributors label Oct 20, 2022
@Fauzyy
Copy link
Contributor Author

Fauzyy commented Nov 10, 2022

This should be fixed by #1633, I'll close this

@Fauzyy Fauzyy closed this as completed Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality/enhancement help wanted Good feature for contributors
Projects
None yet
Development

No branches or pull requests

2 participants