-
Notifications
You must be signed in to change notification settings - Fork 43
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
Add property value transform for removing secrets and outputs #2656
Add property value transform for removing secrets and outputs #2656
Conversation
This change is part of the following stack: Change managed by git-spice. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. 🚨 Try these New Features:
|
@@ -128,6 +128,22 @@ func RemoveSecrets(pv resource.PropertyValue) resource.PropertyValue { | |||
return Transform(unsecret, pv) | |||
} | |||
|
|||
func RemoveSecretsAndOutputs(pv resource.PropertyValue) resource.PropertyValue { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
f5786e2
to
fb926f8
Compare
This PR has been shipped in release v3.97.0. |
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.