-
Notifications
You must be signed in to change notification settings - Fork 84
WIP: Redesign sink architecture #3400
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
base: main
Are you sure you want to change the base?
Conversation
Reviewer's GuideRefactors sink loading architecture to introduce modern, type-safe load_record/load_batch APIs alongside legacy methods, adds pluggable batch strategies and batch context types, defers SQL table creation to first batch, and updates CSV target and tests to exercise the new behavior and compatibility guarantees. Sequence diagram for modern vs legacy record loading in RecordSinksequenceDiagram
actor Tap
participant Framework as Framework
participant Base as RecordSink
participant Modern as ModernRecordSink
participant Legacy as LegacyRecordSink
Tap->>Framework: emit_record(record)
Framework->>Modern: process_record(record, context)
alt Modern sink overrides load_record
Modern->>Base: process_record(record, context)
Base->>Base: type(self).load_record is not RecordSink.load_record
Base->>Modern: load_record(record)
Modern-->>Framework: record persisted via modern path
else Legacy sink does not override load_record
Framework->>Legacy: process_record(record, context)
Legacy->>Base: process_record(record, context)
Base->>Base: type(self).load_record is RecordSink.load_record
Base->>Base: raise NotImplementedError
end
Sequence diagram for modern vs legacy batch loading in BatchSinksequenceDiagram
actor Tap
participant Framework as Framework
participant Base as BatchSink
participant Modern as ModernBatchSink
participant Legacy as LegacyBatchSink
Tap->>Framework: emit_batch(context)
Framework->>Modern: process_batch(context)
alt Modern sink overrides load_batch
Modern->>Base: process_batch(context)
Base->>Base: type(self).load_batch is not BatchSink.load_batch
Base->>Base: batch = BatchContext.from_legacy_dict(context)
Base->>Modern: load_batch(batch)
Modern-->>Framework: batch persisted via modern path
else Legacy sink does not override load_batch
Framework->>Legacy: process_batch(context)
Legacy->>Base: process_batch(context)
Base->>Base: type(self).load_batch is BatchSink.load_batch
Base->>Base: raise NotImplementedError
end
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Documentation build overview
Show files changed (4 files in total): 📝 4 modified | ➕ 0 added | ➖ 0 deleted
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3400 +/- ##
==========================================
- Coverage 93.90% 92.73% -1.17%
==========================================
Files 69 72 +3
Lines 5774 5918 +144
Branches 716 726 +10
==========================================
+ Hits 5422 5488 +66
- Misses 248 320 +72
- Partials 104 110 +6
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:
|
CodSpeed Performance ReportMerging #3400 will not alter performanceComparing Summary
Footnotes |
Summary by Sourcery
Introduce a modern, type-safe sink loading architecture while preserving backwards compatibility with existing dict-based sink implementations.
New Features:
Enhancements:
Tests: