feat(cogs): publish backend change streams to Kafka - #597
Open
matt-codecov wants to merge 1 commit into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## matth/storage-inventory-tracker-3 #597 +/- ##
==================================================================
Coverage 88.46% 88.46%
==================================================================
Files 104 104
Lines 17055 17092 +37
==================================================================
+ Hits 15087 15121 +34
- Misses 1968 1971 +3
☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
matt-codecov
force-pushed
the
matth/storage-inventory-tracker-4
branch
from
August 11, 2026 21:34
5c30b31 to
644c7af
Compare
|
|
||
| let sink = config.change_stream.kafka.as_ref().expect("kafka sink"); | ||
| assert_eq!(sink.topic, "my-topic"); | ||
| assert_eq!(sink.bootstrap_servers, ["kafka:9092"]); |
There was a problem hiding this comment.
Bug: A partial Kafka configuration with a topic but no bootstrap_servers will be accepted at startup but will silently fail to send messages at runtime.
Severity: HIGH
Suggested Fix
Validate the SinkConfig to ensure that if the Kafka sink is enabled, the bootstrap_servers field is not empty. This check should be performed during configuration loading to cause a startup failure with a clear error message, preventing silent failures in production.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: objectstore-server/src/config.rs#L930
Potential issue: If the service is configured with a partial Kafka configuration,
specifically providing a topic but omitting the `bootstrap_servers`, the application
will start without error. The underlying `librdkafka` library accepts an empty list of
bootstrap servers during producer creation, so no startup error is logged. However, the
producer will be unable to connect to any brokers, causing all change stream messages to
be silently dropped. This can lead to an operator being unaware that their intended
configuration is not active, resulting in a loss of inventory tracking data.
Also affects:
objectstore-inventory-tracker/src/kafka.rs:105objectstore-service/src/change_stream/kafka.rs:80
matt-codecov
force-pushed
the
matth/storage-inventory-tracker-4
branch
from
August 11, 2026 22:37
644c7af to
d5d5bef
Compare
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.
connect
SinkConfigstoobjectstore-serverconf and wire it up to theChangeStreamFactory. this completes the objectstore code changes for storage COGSStack created with GitHub Stacks CLI • Give Feedback 💬