-
Couldn't load subscription status.
- Fork 1.4k
Tidy up IGNORABLE_PROPERTIES and logging #12054
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #12054 +/- ##
============================================
- Coverage 74.91% 74.80% -0.11%
- Complexity 6454 6616 +162
============================================
Files 343 376 +33
Lines 24336 25325 +989
Branches 3207 3389 +182
============================================
+ Hits 18231 18945 +714
- Misses 4832 4994 +162
- Partials 1273 1386 +113
🚀 New features to boost your workflow:
|
| LOGGER.traceCr(reconciliation, "Current Kafka Broker Config path {} has value {}", pathValueWithoutSlash, lookupPath(source, pathValue)); | ||
| LOGGER.traceCr(reconciliation, "Desired Kafka Broker Config path {} has value {}", pathValueWithoutSlash, lookupPath(target, pathValue)); | ||
| } else { | ||
| LOGGER.debugCr(reconciliation, "Kafka Broker {} Config Differs : {}", brokerNodeRef.nodeId(), d); |
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 alternative is to move these logs into removeProperty and updateOrAdd methods providing all the necessary parameters.
Signed-off-by: Gantigmaa Selenge <[email protected]>
| LOGGER.traceCr(reconciliation, "Kafka Broker {} Config Differs : {}", brokerNodeRef.nodeId(), d); | ||
| LOGGER.traceCr(reconciliation, "Current Kafka Broker Config path {} has value {}", pathValueWithoutSlash, lookupPath(source, pathValue)); | ||
| LOGGER.traceCr(reconciliation, "Desired Kafka Broker Config path {} has value {}", pathValueWithoutSlash, lookupPath(target, pathValue)); |
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.
So, with this improvement, can we now move these back to debug? They are on trace because there were too many default values. But if they should be filtered out now, maybe we can make the actual removes more visible?
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.
Good point! I have made the suggested change along with another improvement.
Signed-off-by: Gantigmaa Selenge <[email protected]>
When logging an entry, isReadOnly field is always to set false, which makes confusing as to why it cannot be dynamically updated Signed-off-by: Gantigmaa Selenge <[email protected]>
Type of change
Select the type of your PR
Description
Remove the custom properties that are in IGNORABLE_PROPERTIES as they get skipped using KafkaConfiguration.isCustomConfigurationOption() anyway.
The debug logs for the configuration difference include the properties that are ignorable or custom even though they are not included in the final update. The current and desired values for these properties are always different as they contain placeholders or are custom, which results in logging them all the time:
But these get skipped from the update since they are ignorable or custom.
This PR changes the condition of the logs so that properties with different desired and current values get logged only if they are not ignored or not custom, in another word, if it is a property we intend to update. So it would look like this:
The logs will no longer include ignorable or custom properties.
Checklist
Please go through this checklist and make sure all applicable tasks have been done