Open
Conversation
…esponses
All successful live shape responses return HTTP 200 regardless of whether they
carry data or only control messages. This adds an `electric-has-data` header
("true"/"false") so operators can filter data-bearing vs empty responses without
parsing bodies. Fixes #3850.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3851 +/- ##
===========================================
+ Coverage 69.43% 87.17% +17.74%
===========================================
Files 6 25 +19
Lines 386 2308 +1922
Branches 96 577 +481
===========================================
+ Hits 268 2012 +1744
- Misses 117 294 +177
- Partials 1 2 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This comment has been minimized.
This comment has been minimized.
Contributor
Author
|
@KyleAMathews I want to add this header to be able to filter out live requests with no data in OTEL. You might have opinions about it. I don't think the latency or the amount of these requests are useful for observability and removing them would remove a lot of noise from our dashboards |
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.
Summary
electric-has-dataresponse header ("true"/"false") to all successful shape responses, allowing operators to distinguish data-bearing from empty responses without parsing bodies:nowoffset path to correctly setno_changes: trueon the response@electric_headersFixes #3850
Test plan
refute response.no_changesassertion on data response test inapi_test.exsassert response.no_changesassertion on "now" offset and long-poll timeout tests inapi_test.exselectric-has-dataheader assertions inserve_shape_plug_test.exsfor data responses ("true") and empty responses ("false")@electric_headers🤖 Generated with Claude Code