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

dev: Fix schema validation in devserver #66715

Merged
merged 4 commits into from Mar 12, 2024

Conversation

lynnagara
Copy link
Member

@lynnagara lynnagara commented Mar 11, 2024

This ensures schema validation is run on every message on topics where a schema is registered in the devserver. The goal of this change is to help catch invalid messages in dev before changes are deployed.

@@ -100,7 +100,7 @@ def get_test_stream_processor(
max_poll_interval_ms=None,
enable_dlq=False,
healthcheck_file_path=None,
validate_schema=False,
enforce_schema=True,
Copy link
Member Author

Choose a reason for hiding this comment

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

We may as well always enforce this in tests

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 11, 2024
Copy link

codecov bot commented Mar 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.30%. Comparing base (f62f209) to head (72cdc2f).
Report is 81 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master   #66715    +/-   ##
========================================
  Coverage   84.29%   84.30%            
========================================
  Files        5306     5308     +2     
  Lines      237154   237301   +147     
  Branches    41016    41043    +27     
========================================
+ Hits       199916   200062   +146     
- Misses      37019    37020     +1     
  Partials      219      219            
Files Coverage Δ
src/sentry/consumers/__init__.py 76.74% <100.00%> (+4.65%) ⬆️

... and 51 files with indirect coverage changes

Copy link
Member

@jjbayer jjbayer left a comment

Choose a reason for hiding this comment

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

LGTM. There seem to be some tests that use invalid messages.

@lynnagara lynnagara merged commit 825cf9f into master Mar 12, 2024
49 checks passed
@lynnagara lynnagara deleted the fix-schema-validation-devserver branch March 12, 2024 21:23
@github-actions github-actions bot locked and limited conversation to collaborators Mar 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants