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 ignoreChanges to handle secrets #14565

Merged
merged 2 commits into from Nov 15, 2023
Merged

Conversation

Frassle
Copy link
Member

@Frassle Frassle commented Nov 15, 2023

Description

Fixes #6272.

#6272 was failing because the type checks in PropertyPath.Reset were too strict. We'd check if a value was an object or array to correctly traverse it, but didn't handle that it might be a "secret object" or "secret array".

Pretty simple fix, we can just unwrap any outer layers of secretness at each layer as we traverse.

Checklist

  • I have run make tidy to update any new dependencies
  • I have run make lint to verify my code passes the lint check
    • I have formatted my code using gofumpt
  • I have added tests that prove my fix is effective or that my feature works
  • I have run make changelog and committed the changelog/pending/<file> documenting my change
  • Yes, there are changes in this PR that warrants bumping the Pulumi Cloud API version

@pulumi-bot
Copy link
Contributor

pulumi-bot commented Nov 15, 2023

Changelog

[uncommitted] (2023-11-15)

Bug Fixes

  • [engine] Fix ignore changes ignoring secret values.
    #14565

@Frassle Frassle marked this pull request as ready for review November 15, 2023 00:14
@Frassle Frassle requested a review from a team November 15, 2023 00:16
@Frassle Frassle requested a review from a team November 15, 2023 09:24
Copy link
Collaborator

@tgummerer tgummerer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks good to me now!

@Frassle Frassle added this pull request to the merge queue Nov 15, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 15, 2023
@Frassle Frassle added this pull request to the merge queue Nov 15, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 15, 2023
@Frassle Frassle added this pull request to the merge queue Nov 15, 2023
Merged via the queue into master with commit e16d1c8 Nov 15, 2023
44 checks passed
@Frassle Frassle deleted the fraser/ignoreChangesSecrets branch November 15, 2023 12:44
@EronWright
Copy link
Contributor

Should outputness also be handled in this way?

@Frassle
Copy link
Member Author

Frassle commented Feb 6, 2024

Probably but there's also deps and unknowness that need tracking in that case so it's a bit more involved

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.

IgnoreChanges sets properties to null when used on a property with a secret value
4 participants