Skip to content

Conversation

@VenelinMartinov
Copy link
Contributor

@VenelinMartinov VenelinMartinov commented Nov 22, 2024

This change adds a propertyvalue Transform for removing secrets and outputs. This will be useful in the detailed diff algorithm where secrets and outputs are not relevant, since DetailedDiff only returns paths to properties. We will instead remove all secrets and inputs when passed to the algorithm so it doesn't have to handle them in the internals.

@VenelinMartinov
Copy link
Contributor Author

VenelinMartinov commented Nov 22, 2024

@codecov
Copy link

codecov bot commented Nov 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.35%. Comparing base (83596bb) to head (fb926f8).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2656   +/-   ##
=======================================
  Coverage   69.34%   69.35%           
=======================================
  Files         301      301           
  Lines       38546    38558   +12     
=======================================
+ Hits        26730    26742   +12     
  Misses      10294    10294           
  Partials     1522     1522           

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


🚨 Try these New Features:

return Transform(unsecret, pv)
}

func RemoveSecretsAndOutputs(pv resource.PropertyValue) resource.PropertyValue {
Copy link
Member

Choose a reason for hiding this comment

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

Why are we removing secrets and outputs?

Copy link
Contributor Author

@VenelinMartinov VenelinMartinov Nov 22, 2024

Choose a reason for hiding this comment

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

The detailed diff algorithm does not care about secrets and outputs, so this allows us to not have to handle them in the code. Expanded on the explanation in the PR description.

Base automatically changed from vvm/transform_pv_preserve_nil_arrays to master November 22, 2024 19:17
@VenelinMartinov VenelinMartinov force-pushed the vvm/pv_tranform_for_removing_secrets_and_outputs branch from f5786e2 to fb926f8 Compare November 22, 2024 19:18
@VenelinMartinov VenelinMartinov enabled auto-merge (squash) November 22, 2024 19:18
@VenelinMartinov VenelinMartinov merged commit f6e5260 into master Nov 22, 2024
16 checks passed
@VenelinMartinov VenelinMartinov deleted the vvm/pv_tranform_for_removing_secrets_and_outputs branch November 22, 2024 20:20
@pulumi-bot
Copy link
Contributor

This PR has been shipped in release v3.97.0.

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.

3 participants