Skip to content

Commit

Permalink
feat: Schema enforcement in the test API (#4411)
Browse files Browse the repository at this point in the history
  • Loading branch information
lynnagara committed Jun 23, 2023
1 parent ffa2fcb commit 6814812
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion snuba/web/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,9 @@ def eventstream(*, entity: Entity) -> RespTuple:

storage = entity.get_writable_storage()
assert storage is not None
storage_name = storage.get_storage_key().value
# TODO: A few storages are currently excluded from schema validation
should_validate_schema = storage_name not in ["search_issues", "replays"]

try:
if type_ == "insert":
Expand All @@ -644,7 +647,7 @@ def commit(
stream_loader.get_processor(),
"consumer_grouup",
stream_loader.get_default_topic_spec().topic,
False,
should_validate_schema,
),
build_batch_writer(table_writer, metrics=metrics),
max_batch_size=1,
Expand Down

0 comments on commit 6814812

Please sign in to comment.