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

feat: add hide-unchanged-plan-comments option #3158

Merged
merged 2 commits into from
Feb 25, 2023

Conversation

tufitko
Copy link
Contributor

@tufitko tufitko commented Feb 24, 2023

what

Add hide-unchanged-plan-comments options to removing useless no-changes plans from comments.

why

In our repository we have a lot of terragrunt projects. Sometimes we have big pull requests (for example with ~600 projects, usually about 5-6 plans has changes) and It's hard to review.

tests

some tests are added

1 / 6 project with changes image
two projects, no changes, nothing to show image
without flag output is image
...

@tufitko tufitko requested a review from a team as a code owner February 24, 2023 13:21
@github-actions github-actions bot added docs Documentation go Pull requests that update Go code labels Feb 24, 2023
@tufitko tufitko force-pushed the remove-no-changes-from-comment branch from 49db4f3 to c370acc Compare February 24, 2023 16:01
@tufitko tufitko force-pushed the remove-no-changes-from-comment branch from c370acc to e18b361 Compare February 25, 2023 15:37
@nitrocode nitrocode added this to the v0.23.0 milestone Feb 25, 2023
@nitrocode
Copy link
Member

Thank you @tufitko ! Please feel free to send more PRs :)

@nitrocode nitrocode merged commit f7f35ce into runatlantis:main Feb 25, 2023
@tufitko tufitko deleted the remove-no-changes-from-comment branch February 26, 2023 07:06
@nitrocode
Copy link
Member

nitrocode commented Feb 28, 2023

@tufitko been playing around with the feature today

What if we also skipped atlantis apply on "no changes" plans. Basically to do this, we see if the plan is a no-change and just omit the plan file for that directory.

We'd have to be careful since if there is a change in terraform outputs, it would still say "no changes" but there would technically be a change.

@tufitko
Copy link
Contributor Author

tufitko commented Feb 28, 2023

@nitrocode hmm, I'm not sure how atlantis works with terraform apply... Does it show the plan in applying stage? or we should use the plan from the planning stage?
In terragrunt's case, we should generate a new plan on apply and don't use plan from planning stage. so we can just copy logic from planning 🤔
In my team big apply's output isn't a problem, I didn't even think about it

@tufitko
Copy link
Contributor Author

tufitko commented Feb 28, 2023

@nitrocode oh, also, in the case of plans, we still can see the plan's output in Atlantis UI, but after PR was merged we aren't able to see outputs at all, except comments in PR

ijames-gc pushed a commit to gocardless/atlantis that referenced this pull request Feb 13, 2024
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
ijames-gc pushed a commit to gocardless/atlantis that referenced this pull request Feb 13, 2024
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants