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

display: only hide replacement steps in diff #16065

Merged
merged 2 commits into from
Apr 26, 2024

Conversation

tgummerer
Copy link
Collaborator

@tgummerer tgummerer commented Apr 26, 2024

When displaying diff events, we currently try to hide non-logical replacement steps unless we specifically enable showing them. However we currently do that for all non-logical operations, regardless whether they are replacement steps or not.

In particular a RefreshStep is non-logical, but it's also not a replacement step. We still want to show them during the diff because their output can be important. Especially if the user just requested a diff it doesn't make sense to hide the diff from them at the same time.

The intention here is to only hide replacement steps, so do that.

The full diff with the display tests is here: https://gist.github.com/tgummerer/fcd012f13669a9cdc39530cde7770260 It's unedited, so it includes some flakyness which isn't interesting.

I looked it over, and I think it looks like what we want, but I'm curious to hear what others think. E.g. https://gist.github.com/tgummerer/fcd012f13669a9cdc39530cde7770260#file-testdata-diff-L558 looks more correct now, as it shows the two delete operation that actually happened, that it didn't show before, and it still shows the same operation (Calling this one out in particular, since it took me a bit to understand that we still have the same operation in the diff)

Fixes #7665

When displaying diff events, we currently try to hide non-logical
replacement steps unless we specifically enable showing them.  However
we currently do that for all non-logical operations, regardless
whether they are replacement steps or not.

In particular a RefreshStep is non-logical, but it's also not a
replacement step.  We still want to show them during the diff because
their output can be important.  Especially if the user just requested
a diff it doesn't make sense to hide the diff from them at the same
time.

The intention here is to only hide replacement steps, so do that.
@tgummerer tgummerer requested a review from a team as a code owner April 26, 2024 11:59
@pulumi-bot
Copy link
Contributor

pulumi-bot commented Apr 26, 2024

Changelog

[uncommitted] (2024-04-26)

Bug Fixes

  • [cli/display] Fix output of the diff display, making sure it shows diffs from refreshes
    #16065

@tgummerer tgummerer force-pushed the tg/fix-missing-display-output branch from c594528 to efdb322 Compare April 26, 2024 12:16
@Frassle
Copy link
Member

Frassle commented Apr 26, 2024

Yeh this looks more sensible

@tgummerer tgummerer added this pull request to the merge queue Apr 26, 2024
Merged via the queue into master with commit 8219c92 Apr 26, 2024
49 checks passed
@tgummerer tgummerer deleted the tg/fix-missing-display-output branch April 26, 2024 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pulumi refresh --diff does not show a diff
3 participants