-
Notifications
You must be signed in to change notification settings - Fork 0
LOGC-7: Implement log processor #13
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
When no offset exists, max() returns NULL which ClickHouse driver converts to Unix epoch (1970-01-01). Use maxOrNull() and sql.NullTime to properly detect NULL values. Return Go zero time for missing offsets, enabling reliable IsZero() checks. This makes the case in which a bucket does not have a committed offset yet more explicit.
Add OffsetManagerInterface and UploaderInterface to enable tests to use custom implementations (for injecting errors). Existing implementations already satisfy these interfaces.
- S3TestHelper for bucket/object operations - CountingUploader for tracking upload attempts - InsertTestLogWithTargetBucket for inserting test data - FailingOffsetManager for simulating offset commit failures
- Discovery cycle with configurable interval - Parallel batch processing with worker pool - Retry logic - Error classification (permanent vs transient)
Transform stub main into complete application - Load and validate configuration - Set up logging - Create and initialize processor - Signal handling - Shutdown timeout with cleanup
819196a to
ca263f9
Compare
Codecov Report❌ Patch coverage is ❌ Your project check has failed because the head coverage (77.22%) is below the adjusted base coverage (85.02%). You can increase the head coverage or adjust the Removed Code Behavior. Additional details and impacted files
... and 1 file with indirect coverage changes @@ Coverage Diff @@
## main #13 +/- ##
==========================================
- Coverage 85.43% 77.22% -8.22%
==========================================
Files 12 15 +3
Lines 515 1036 +521
==========================================
+ Hits 440 800 +360
- Misses 52 195 +143
- Partials 23 41 +18
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Implement the core log processing logic.
Best reviewed commit by commit.