Skip to content

ref(rust-consumers): validate_schema option - #8433

Merged
MeredithAnya merged 2 commits into
masterfrom
meredith/eap-9-2-26
Sep 3, 2026
Merged

ref(rust-consumers): validate_schema option#8433
MeredithAnya merged 2 commits into
masterfrom
meredith/eap-9-2-26

Conversation

@MeredithAnya

@MeredithAnya MeredithAnya commented Sep 3, 2026

Copy link
Copy Markdown
Member

Adds a validate_schema option to the snuba sentry-options namespace so schema validation can be turned off per storage. Leaves the --enforce-schema as is, and makes that take prescedence if it's true

The option is a dict mapping storage name to a bool:

{ "eap_items": false }
  • Storages with no entry default to true, so this is a no-op until a storage is explicitly listed.
  • false skips validation and skips loading the schema entirely.
  • --enforce-schema wins: 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-schema still validates when the option says false.

@MeredithAnya
MeredithAnya requested a review from a team as a code owner September 3, 2026 21:12

@tryangul tryangul left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. Q: Do we need to update the python side as well for consistency? Also, what is the risk here? I didn't notice any problems running without validation in s4s2, personally, but maybe there's more 🌶️ in prod.

@MeredithAnya MeredithAnya changed the title ref(consumers): validate_schema option ref(rust-consumers): validate_schema option Sep 3, 2026
@MeredithAnya

Copy link
Copy Markdown
Member Author

LGTM. Q: Do we need to update the python side as well for consistency? Also, what is the risk here? I didn't notice any problems running without validation in s4s2, personally, but maybe there's more 🌶️ in prod.

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

validate_sample_rate = (

@MeredithAnya
MeredithAnya merged commit 7a0dd28 into master Sep 3, 2026
68 checks passed
@MeredithAnya
MeredithAnya deleted the meredith/eap-9-2-26 branch September 3, 2026 21: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.

2 participants