Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ public boolean matches(R actual, R desired, Context<?> context) {
removeIrrelevantValues(desiredMap);

if (LoggingUtils.isNotSensitiveResource(desired)) {
log.debug("Pruned actual: \n {} \n desired: \n {} ", prunedActual, desiredMap);
var actualYaml = objectMapper.asYaml(prunedActual);
Copy link
Collaborator

@metacosm metacosm Sep 30, 2024

Choose a reason for hiding this comment

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

I would protect these calls with a check to whether debug is enabled so as to not incur the YAML serialization cost in that situation.

Copy link
Contributor Author

@10000-ki 10000-ki Sep 30, 2024

Choose a reason for hiding this comment

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

I would protect these calls with a check to whether debug is enabled so as to not incur the YAML serialization cost in that situation.

yes it would be better thank you, i will fix it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@metacosm
72911d6

fixed it in this commit

thank you!!

var desiredYaml = objectMapper.asYaml(desiredMap);
log.debug("Pruned actual: \n {} \n desired: \n {} ", actualYaml, desiredYaml);
}

return prunedActual.equals(desiredMap);
Expand Down
Loading