Skip to content

Fix no-op outputs causing the plan renderer to skip the 'no changes' message#32820

Merged
liamcervante merged 2 commits intomainfrom
liamcervante/32815
Mar 10, 2023
Merged

Fix no-op outputs causing the plan renderer to skip the 'no changes' message#32820
liamcervante merged 2 commits intomainfrom
liamcervante/32815

Conversation

@liamcervante
Copy link
Copy Markdown
Contributor

@liamcervante liamcervante commented Mar 10, 2023

Currently, we are checking whether the output changes are empty before deciding to print the "no changes" message in the renderer. But, no-op changes do not print anything so any plan with no-op changes will make the renderer consider the output changes to be not empty so it won't print the nice message but then it also won't print any outputs.

This PR fixes this by computing the concrete output diffs earlier and then using them to decide whether to print the "no changes" message.

Fixes #32815

Target Release

1.4.1

Draft CHANGELOG entry

BUG FIXES

  • Fix the plan renderer skipping the "no changes" messages when there are no-op outputs within the plan.

@liamcervante liamcervante requested review from a team and jbardin March 10, 2023 15:07
@liamcervante liamcervante added the 1.4-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged label Mar 10, 2023
@liamcervante liamcervante merged commit 15ecdb6 into main Mar 10, 2023
@liamcervante liamcervante deleted the liamcervante/32815 branch March 10, 2023 15:19
@github-actions
Copy link
Copy Markdown
Contributor

Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch.

@prowlaiii
Copy link
Copy Markdown

So, I'm unclear...
Is the lack of a summary message an issue or is that the new normal?
I certainly found it confusing and am going to drop back to 1.3.9.
(I've been a happy and enthusiastic Terraform user for several years and this is the first blocker I've encountered, so am looking forward to 1.4.1!)

@crw
Copy link
Copy Markdown
Contributor

crw commented Mar 14, 2023

Note for history, the above question was answered in #32815 (comment)

@crw crw added the bug label Mar 14, 2023
genx7up pushed a commit to aweps/terraform that referenced this pull request Mar 17, 2023
…message (hashicorp#32820)

* Fix no-op outputs causing the plan renderer to skip the 'no changes' message

* fix imports
genx7up pushed a commit to aweps/terraform that referenced this pull request Mar 17, 2023
…message (hashicorp#32820)

* Fix no-op outputs causing the plan renderer to skip the 'no changes' message

* fix imports
@github-actions
Copy link
Copy Markdown
Contributor

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

1.4-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

output resources cause unexpected change in 1.4.0 plan output

4 participants