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

DiffResponse.Diffs should contain only top-level keys #3554

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

thomas11
Copy link
Contributor

@thomas11 thomas11 commented Sep 3, 2024

Fixes #3546

After changing a property of an object in an array property, pulumi preview would show an empty [diff: ]. This is because the engine only understands top-level property keys at that place, not paths, as confirmed by @Frassle. This PR normalizes the property name to top-level.

Related: pulumi/pulumi#17139

@thomas11 thomas11 requested review from danielrbradley and a team September 3, 2024 10:54
@thomas11 thomas11 self-assigned this Sep 3, 2024
Copy link

github-actions bot commented Sep 3, 2024

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

Copy link

codecov bot commented Sep 3, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 57.79%. Comparing base (641c531) to head (c1647c1).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
provider/pkg/provider/provider.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3554      +/-   ##
==========================================
- Coverage   57.85%   57.79%   -0.06%     
==========================================
  Files          66       66              
  Lines        8281     8284       +3     
==========================================
- Hits         4791     4788       -3     
- Misses       3045     3050       +5     
- Partials      445      446       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@thomas11 thomas11 merged commit 9be66cd into master Sep 5, 2024
24 checks passed
@thomas11 thomas11 deleted the tkappler/diff-toplevel branch September 5, 2024 08:35
@pulumi-bot
Copy link
Contributor

This PR has been shipped in release v2.60.0.

thomas11 added a commit that referenced this pull request Oct 8, 2024
It seems like I accidentally left some debugging code in #3554 that
breaks `Diff`. I don't understand how this only comes up now in triage -
wouldn't this mess up _all_ the provider's diffs??

Also a good example for the importance of test coverage. We do have
tests for the diff algorithm but not for the providers overall `Diff`
method.

Fixes #3632
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.

AKS cluster agent pool profiles changes show empty diff in preview summary
3 participants