Skip to content
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

schema_registry: Switch Schema ID Validation enablement to cluster config #11284

Conversation

BenPope
Copy link
Member

@BenPope BenPope commented Jun 7, 2023

#10650 introduced schema ID validation gated behind a feature that was enabled by default.

Instead, gate it on cluster configuration, that is disabled by default. E.g.:

rpk cluster config set enable_schema_id_validation redpanda --api-urls=localhost:19644

There are three possible configuration options:

  • none: feature is disabled, checking will not occur, associated topic properties cannot be modified
  • redpanda: Feature is enabled, redpanda topic properties are accepted
  • compat: Feature is enabled, redpanda and compatible topic properties are accepted

Closes #11113

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v23.1.x
  • v22.3.x
  • v22.2.x

Release Notes

  • none

@BenPope BenPope added area/redpanda area/schema-registry Schema Registry service within Redpanda labels Jun 7, 2023
@BenPope BenPope self-assigned this Jun 7, 2023
@BenPope BenPope marked this pull request as draft June 7, 2023 18:31
@BenPope BenPope force-pushed the server-side-schema-id-validation-global-config branch 2 times, most recently from ffd3ba8 to 0a39d9a Compare June 8, 2023 16:43
@BenPope BenPope marked this pull request as ready for review June 8, 2023 19:06
@dotnwat dotnwat requested review from NyaliaLui and graphcareful June 9, 2023 05:15
src/v/model/schema_id_validation.h Outdated Show resolved Hide resolved
src/v/kafka/server/tests/alter_config_test.cc Show resolved Hide resolved
tests/rptest/tests/schema_registry_test.py Outdated Show resolved Hide resolved
tests/rptest/tests/topic_creation_test.py Show resolved Hide resolved
tests/rptest/tests/schema_registry_test.py Outdated Show resolved Hide resolved
BenPope added 9 commits June 12, 2023 10:59
Signed-off-by: Ben Pope <ben@redpanda.com>
Signed-off-by: Ben Pope <ben@redpanda.com>
The configuration globally enables or disables Schema ID
validation.

Signed-off-by: Ben Pope <ben@redpanda.com>
Instead of using a feature for enabling and disabling Schema ID Validation,
use the cluster configuration parameter `enable_schema_id_validation`.

Disable some testing, since the feture is no longer on by default.

Additional property testing will be added in a later commit.

Signed-off-by: Ben Pope <ben@redpanda.com>
Schema ID validation is now enabled with cluster config:
`enable_schema_id_validation`

Closes redpanda-data#11113

Signed-off-by: Ben Pope <ben@redpanda.com>
Pure refactor:

Move the `_compat` topic properties first to make the next refactor simpler.

Signed-off-by: Ben Pope <ben@redpanda.com>
`schema_id_validation_mode::redpanda` is a subset of `compat`, that
does not allow the compat topic properties in topic `create`, `alter`,
and `incremental_alter`, and doesn't show them during `describe`.

Signed-off-by: Ben Pope <ben@redpanda.com>
Simplify the tests by extracting out _get_topic_properties.

Signed-off-by: Ben Pope <ben@redpanda.com>
@BenPope BenPope force-pushed the server-side-schema-id-validation-global-config branch from 0a39d9a to 59a3f88 Compare June 12, 2023 20:43
@BenPope BenPope requested a review from NyaliaLui June 13, 2023 08:55
@piyushredpanda piyushredpanda merged commit c198125 into redpanda-data:dev Jun 13, 2023
@BenPope BenPope requested a review from shorgi June 13, 2023 15:03
@piyushredpanda
Copy link
Contributor

@BenPope : maybe this needs a doc-needed label? I added it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/redpanda area/schema-registry Schema Registry service within Redpanda doc-needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ducktape upgrade tests for new SR feature flags
3 participants