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

Fix mustWrite for Input/Output PropertyMaps #6396

Merged
merged 4 commits into from
Feb 22, 2021
Merged

Conversation

lukehoban
Copy link
Member

Switch from using reflect.DeepEqual to using PropertyMap's DeepEquals directly for Inputs and Outputs.

This avoids issues with reflect.DeepEqual treating nil and empty arrays as non-equal. These appear to have been triggered recently by https://github.com/pulumi/pulumi/pull/6006/files#diff-1fd47e1ff18121659c96a8f47296a2c0c715eb2662c64c7297fa0c5c1ad25c19R290, which changed deserialization of arrays into PropertyMaps from returning nil to returning empty arrays.

Also adds additional logging in mustWrite.

Fixes #6197.

Switch from using `reflect.DeepEqual` to using PropertyMap's `DeepEquals` directly for Inputs and Outputs.

This avoids issues with `reflect.DeepEqual` treating `nil` and empty arrays as non-equal.  These appear to have been triggered recently by https://github.com/pulumi/pulumi/pull/6006/files#diff-1fd47e1ff18121659c96a8f47296a2c0c715eb2662c64c7297fa0c5c1ad25c19R290, which changed deserialization of arrays into PropertyMaps from returning `nil` to returning empty arrays.

Also adds additional logging in mustWrite.

Fixes #6197.
@pgavlin
Copy link
Member

pgavlin commented Feb 22, 2021

Can we add some unit tests for this (or file a followup issue for the same)?

@lukehoban lukehoban merged commit 8fc6f91 into master Feb 22, 2021
@pulumi-bot pulumi-bot deleted the lukehoban/6197 branch February 22, 2021 22:05
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 became so slow (~7x times) since version 2.16.2
2 participants