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

Fix subject name strategy config and add validation flag #735

Merged
merged 3 commits into from
Oct 12, 2023

Conversation

tvainika
Copy link
Contributor

About this change - What it does

Fix subject name_strategy configuration setting, which we have had kind of documented but not working. Now it is possible to set it, and use it. Also fixes documentation to match what has been the default in the implementation.

Add new configuration option name_strategy_validation (true by default) which allows skipping subject name strategy validation when producing messages with Kafka REST calls.

References: #664 and #724

Why this way

This enables easy backward compatible behaviour of producing with REST using any schema.

@tvainika tvainika requested review from a team as code owners October 11, 2023 13:47
Allow setting `name_strategy` from config, and fix documentation to
match default that has been in the implementation so far.
Before Karapace 3.7.0 when producing messages with REST API Karapace
did not validate that given schema belongs to valid subject as per
name strategy.  Add a setting to disable this validation to allow
easily skip name strategy validation optionally.
@tvainika tvainika force-pushed the subject-name-strategy branch from 4ef570c to a46d3e1 Compare October 11, 2023 14:58
@eliax1996
Copy link
Contributor

Did I understood it correctly that this is globally and not for each topic? Doesn’t make sense to enable/disable it by topic? Same question for the strategy

@tvainika
Copy link
Contributor Author

Yes, this is global config that allows easy backward mode that is compatible with pre 3.7.0 karapace

@eliax1996
Copy link
Contributor

for disabling the schema I can agree that having something global can make sense but for the type of strategy we need to enable the customisation on a topic level. Also I would argue that someone could want to enable the validation in a topic based way since you can have flows that aren’t validated and flow that are

Copy link
Contributor

@giuseppelillo giuseppelillo left a comment

Choose a reason for hiding this comment

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

LGTM as a first approach for configuring subject name strategy. Topic level configuration is still needed, but should be tackled separately.

@giuseppelillo giuseppelillo merged commit 211a4b9 into main Oct 12, 2023
8 checks passed
@giuseppelillo giuseppelillo deleted the subject-name-strategy branch October 12, 2023 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants