pandaproxy/sr: Re-purpose schema_registry_normalize_on_startup config#25429
Conversation
cd7148c to
91b0184
Compare
CI test resultstest results on build#63437
test results on build#63493
|
kbatuigas
left a comment
There was a problem hiding this comment.
Just a suggestion for clarity in docs 👍
The new functionality allows to blanket-enable schema normalization in every SR operation.
91b0184 to
a17d273
Compare
|
Changes in force-push:
|
| "schema_registry_always_normalize", | ||
| "Always normalize schemas. If set, this overrides the " | ||
| "normalize parameter in API requests.", | ||
| {.needs_restart = needs_restart::yes, |
There was a problem hiding this comment.
I see no reason not to make this configurable at runtime.
There was a problem hiding this comment.
There is no intrinsic reason as to why we can't flip it, apart from ease of change.
We call the sharded_store constructor in quite a few places, and all of them would need either a binding or a mock_binding for tests. It would add lot's of noise to the pr. I would prefer to make up a follow up for that, with just that change.
|
/backport v25.1.x |
|
/backport v24.3.x |
|
/backport v24.2.x |
|
Failed to create a backport PR to v24.3.x branch. I tried: |
|
Failed to create a backport PR to v24.2.x branch. I tried: |
| "normalize parameter in API requests.", | ||
| {.needs_restart = needs_restart::yes, | ||
| .visibility = visibility::user, | ||
| .aliases = {"schema_registry_normalize_on_startup"}}, |
There was a problem hiding this comment.
@IoannisRP @BenPope is the expectation that schema_registry_always_normalize will take on the previous value of schema_registry_normalize_on_startup after upgrade because you've set .aliases? If so, have you checked, because I don't think behavior exists.
There was a problem hiding this comment.
@IoannisRP i'm having trouble understanding how that PR relates to my question. can you explain?
There was a problem hiding this comment.
sorry, misunderstood the question. Yeah, just checked. It does respect the old value after an update.
There was a problem hiding this comment.
sorry, misunderstood the question. Yeah, just checked. It does respect the old value after an update.
@IoannisRP so i still have the same question: what is the expectation? is the expectation that if schema_registry_normalize_on_startup were set to true (a non-default value) prior to upgrading to this code, that the new configuration would also be true? if so, i don't think that it works that way. did you test that scenario?
There was a problem hiding this comment.
is the expectation that if schema_registry_normalize_on_startup were set to true (a non-default value) prior to upgrading to this code, that the new configuration would also be true?
yes, the expectation is that the new config will respect the potentially non-default value of the old alias.
if so, i don't think that it works that way. did you test that scenario?
it did test this scenario, yes. I run an older rp without my changes and set schema_registry_normalize_on_startup to true. Then I run a rp with my changes and it reports schema_registry_always_normalize as true
You can also check any other PR where an alias replaces an existing config. They all just rename the variable and keep the old name as a part in .aliases.
There was a problem hiding this comment.
@IoannisRP huh, indeed. i tried it again and it does seem to be working this way. im not sure how i messed up the test before. sorry for the noise!
Implements: CORE-9526
The new functionality allows to blanket-enable schema normalization in every SR operation.
Backports Required
Release Notes