-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
allow src/dest validation to be skipped for tombstone entries #17181
Conversation
|
||
final SplitSecretConfig splitSecretConfig; | ||
if (oldConfig.isPresent()) { | ||
splitSecretConfig = SecretsHelpers.splitAndUpdateConfig( |
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.
This feels like the conditional logic should be internal to the SecretsHelper
. Otherwise, it requires the caller to know when to use the different methods. Because the oldConfig
is an optional, the logic to determine how to split the config could be codified inside the method, simplifying the call from the client code (e.g. here).
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 only part that differs logically is the method from before are these three lines:
if (validate) {
validator.ensure(spec.getConnectionSpecification(), fullConfig);
}
Everything else, including the section you called out, was existing logic that I slightly cleaned up to remove some duplicate code. I agree with what you're saying though and will make that change as part of this PR.
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.
@colesnodgrass No worries...it was hard to tell if it was pre-existing. Fine to do that cleanup in a follow-on PR if that's easier.
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.
@jdpgrailsdev I think I will do it in a follow-up PR, I started pulling on this thread to clean this up and it started pulling in other unrelated code as well.
…te-on-config-error
…te-on-config-error
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.
…ehq#17181) * allow src/dest validation to be skipped for tombstone entries * formatting * formatting again * formatting again x2 * formatting again x3
…ehq#17181) * allow src/dest validation to be skipped for tombstone entries * formatting * formatting again * formatting again x2 * formatting again x3
What
for
loop inSourceHandler
with a stream/filter/forEachHow
statefulUpdateSecrets
to accept an additionalboolean validate
parameter which is used to determine ifJsonSchemaValidator.ensure
should be calledJsonSchemaValidator.ensure
is called correctlyRecommended reading order
x.java