karapace
karapace copied to clipboard
feat: enable users to disable validation only on specific topics
This PR enables users to avoid validation only on specific topics. It is necessary because, prior to this commit it was possible to create messages with incorrect or missing subjects. By fixing the validation of subject flows that were previously functioning (but shouldn't have been) now no longer work due to the added validation.
With this PR, users can migrate their flows one by one while adding new validated flows, rather than opting out of validation completely if they wish to retain the functionality of old flows without refactoring them.
Thank you so much, @eliax1996! We are now struggling from disability of publishing new schemes for existing topics.
@GSokol glad to know that this would help. I will create a new optional release in Aiven as soon as it is merged.
Also it's good to have a config setting, to disable schema validation by default. But it could be done in a separate PR to make this thing in faster.
@GSokol this is already implemented (and merged and available in Aiven), if you look there is a config called name_strategy_validation
that if set to false
disable the validation. This PR is just to enable the users to explicitly disable the validation only on a specific subset of topics since using the validation brings more order to the topics (otherwise it's basically like Kafka vanilla where you can write anything in a topic)
In that way, users who didn't follow a validation strategy in the past can now start using it without losing or having to rewrite the existing flows but they can enforce the validation on the new ones
@eliax1996, name_strategy_validation
is only used in the REST API logic.
Hi @GSokol, you wrote that
name_strategy_validation
is only used in the REST API logic.
and it made me curious about your expectations regarding this feature. This PR adds ability to disable validation per topic, but also this configuration affects only REST API logic. I hope this still matches your expectations.