ref(rust-consumers): validate_schema option - #8433
Merged
Merged
Conversation
tryangul
approved these changes
Sep 3, 2026
Member
Author
This is mainly to test improves on the eap consumer, so I wasn't really thinking about the python side here, (updated the title to be more accurate) Haven't looked too far but seems like we are doing validation for the few consumers we have snuba/snuba/consumers/consumer.py Line 478 in 3170625 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
validate_schemaoption to thesnubasentry-options namespace so schema validation can be turned off per storage. Leaves the--enforce-schemaas is, and makes that take prescedence if it'strueThe option is a dict mapping storage name to a bool:
{ "eap_items": false }true, so this is a no-op until a storage is explicitly listed.falseskips validation and skips loading the schema entirely.--enforce-schemawins: those consumers always validate and DLQ, regardless of the option.The option is read once when the consumer builds its processing strategies, then carried as a plain bool — never looked up per message, which is the cost this is meant to remove. So changing it requires a consumer restart or a rebalance. Both the Rust processor paths and the hybrid Python-transform path are covered.
Tests cover the default-on behavior, per-storage opt-out, and that
--enforce-schemastill validates when the option saysfalse.