Skip to content

feat(cogs): publish backend change streams to Kafka - #597

Merged
matt-codecov merged 1 commit into
matth/storage-inventory-tracker-3from
matth/storage-inventory-tracker-4
Aug 26, 2026
Merged

feat(cogs): publish backend change streams to Kafka#597
matt-codecov merged 1 commit into
matth/storage-inventory-tracker-3from
matth/storage-inventory-tracker-4

Conversation

@matt-codecov

@matt-codecov matt-codecov commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Ref FS-210

Add CostTrackerConfig struct to objectstore-server's config. This allows storage COGS to be configured end-to-end; CostTrackerConfig on objectstore-server's config and CostTrackerStreamConfig on each Backend impl will produce a CostTrackerStream that holds a shared Kafka producer and streams change messages on the shared-resources-inventory topic.

While ChangeStream is abstract, the abstraction is not exposed in config. It's assumed each ChangeStream impl will name itself explicitly in dedicated config sections.


Stack created with GitHub Stacks CLIGive Feedback 💬

@matt-codecov
matt-codecov requested a review from a team as a code owner August 11, 2026 06:15
Comment thread objectstore-server/src/config.rs Outdated
@codecov

codecov Bot commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.65217% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.47%. Comparing base (985b88f) to head (f42ac54).

Files with missing lines Patch % Lines
objectstore-server/src/config.rs 95.00% 2 Missing ⚠️
Additional details and impacted files
@@                          Coverage Diff                          @@
##           matth/storage-inventory-tracker-3     #597      +/-   ##
=====================================================================
+ Coverage                              88.39%   88.47%   +0.07%     
=====================================================================
  Files                                    104      104              
  Lines                                  17129    17173      +44     
=====================================================================
+ Hits                                   15142    15194      +52     
+ Misses                                  1987     1979       -8     
Components Coverage Δ
Rust Backend 92.48% <95.65%> (+0.03%) ⬆️
Rust Client 81.97% <ø> (ø)
Python Client 93.38% <ø> (ø)

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@matt-codecov
matt-codecov force-pushed the matth/storage-inventory-tracker-4 branch from 5c30b31 to 644c7af Compare August 11, 2026 21:34
Comment thread objectstore-server/src/config.rs Outdated
@matt-codecov
matt-codecov force-pushed the matth/storage-inventory-tracker-4 branch from 644c7af to d5d5bef Compare August 11, 2026 22:37
@matt-codecov
matt-codecov force-pushed the matth/storage-inventory-tracker-4 branch from d5d5bef to 329169e Compare August 15, 2026 03:32
@linear-code

linear-code Bot commented Aug 17, 2026

Copy link
Copy Markdown

FS-210

@matt-codecov
matt-codecov force-pushed the matth/storage-inventory-tracker-4 branch 2 times, most recently from 914f849 to 9951ac3 Compare August 18, 2026 23:07
.storage_cogs
.as_ref()
.map(ChangeStreamFactory::new)
.unwrap_or_default();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: Reading it like this, implementing Default for ChangeStreamFactory leaves the question of what the default actually does. There's no natural "default" for change streams. Maybe we should remove that and explicitly instantiate the noop factory here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

there isn't a separate noop factory, there's just ChangeStreamFactory. the way i think of it is: the default factory has no sink configs and only knows how to build NoopStream. if you have sink configs, you build a non-default factory with them and that factory knows how to build other ChangeStreams

@matt-codecov
matt-codecov force-pushed the matth/storage-inventory-tracker-4 branch from 9951ac3 to f42ac54 Compare August 26, 2026 21:42
@matt-codecov
matt-codecov merged commit f595259 into main Aug 26, 2026
26 checks passed
@matt-codecov
matt-codecov deleted the matth/storage-inventory-tracker-4 branch August 26, 2026 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants