| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
lgtm
Sorry, something went wrong.
|
⚠️ Please install the Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## master #6949 +/- ##
=======================================
Coverage 49.07% 49.07%
=======================================
Files 433 433
Lines 54330 54330
Branches 7917 7917
=======================================
+ Hits 26663 26664 +1
Misses 25788 25788
+ Partials 1879 1878 -1
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
batch_source is optional on KafkaSource and KinesisSource, but from_proto
checked it with a truthiness test. An unset proto sub-message is still
truthy, so the empty message was parsed as a data source and raised
"Could not identify the source type being added.", which made these
sources impossible to read back from the registry.
Use HasField("batch_source"), as PushSource.from_proto already does.
Signed-off-by: LuisFigueroaG <luis.h.figueroa.g@gmail.com>
| Back | FazBrowse Home | New Git URL |
What this PR does / why we need it:
batch_source is optional on KafkaSource and KinesisSource, but their from_proto checked it with if data_source.batch_source. An unset proto sub-message is still truthy, so the empty message was passed to DataSource.from_proto and raised:
So a stream source applied without a batch source could be written to the registry but not read back (get_data_source, list_data_sources, etc.):
This switches both checks to HasField("batch_source"), the same check PushSource.from_proto already uses.
Which issue(s) this PR fixes:
Same failure as #3852, which was closed without a fix.
Checks
Testing Strategy
Added a parametrized round-trip test for Kafka and Kinesis sources without a batch source; it fails on master and passes with this change. ruff format --check, ruff check and mypy pass on the changed files, and the unit suite passes apart from tests that need torch or a Java runtime, which fail the same way on master in my environment.