feat: GCS-based error store (dead letter queue)#29
Merged
Conversation
Add GCS-based error store for failed events: - ErrorRecord model with full event context - GCSErrorStore with Hive-style partitioning (date + error_type) - Parquet format for BigQuery compatibility - Retry logic with tenacity - Health check support Storage structure: - errors/date=YYYY-MM-DD/error_type=validation/ - errors/date=YYYY-MM-DD/error_type=processing/ Tests: - 10 unit tests (all passing) - ErrorRecord model validation - Path generation logic - Store operations with mocked GCS
Update ErrorStore protocol and Processor integration: - Updated ErrorStore protocol to match GCSErrorStore interface - Updated LoggingErrorStore for compatibility - Processor now catches all exceptions and stores to ErrorStore - Two error types: validation_error (expected) and processing_error (unexpected) - Updated dependencies to use GCSErrorStore instead of LoggingErrorStore - Updated processor tests to match new interface Error handling: - Validation failures → validation_error (adapter failures) - Processing exceptions → processing_error (with stack trace) - Never loses events - all go to EventStore or ErrorStore Tests: - 252 unit tests passing - Processor tests updated for new interface - No regressions
dc87f6b to
e7d3972
Compare
Add BigQuery schema: - Create errors table with partitioning and clustering - Metadata table for tracking loaded files - Example queries for debugging Update README: - Error Store (Dead Letter Queue) section - Storage structure and usage examples - BigQuery setup and query examples - Updated roadmap (error store complete) Features documented: - Two error types (validation vs processing) - 30-day retention with GCS lifecycle - Full event context for debugging - BigQuery integration for analysis
e7d3972 to
c2819b6
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.
Summary
Implement production-grade error store for failed events using GCS + BigQuery.
Changes
Core Implementation
Integration
Storage Structure
BigQuery Support
Documentation
Tests