Skip to content
Merged
Changes from 1 commit
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 actualYml = objectMapper.asYaml(prunedActual);
var desiredYml = objectMapper.asYaml(desiredMap);
log.debug("Pruned actual: \n {} \n desired: \n {} ", actualYml, desiredYml);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is possible to use a library or write code to compare YAML files. However, as the size of the YAML file increases, the cost of processing grows. Therefore, I have not added this functionality here and simply focused on outputting the data.

If deemed necessary, I can consider adding it in the future.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure that the sorting would make that much of a difference compared to serializing to YAML in the first place…

}

return prunedActual.equals(desiredMap);
Expand Down
Loading