feat: consolidator MVP follow ups#10
Merged
Merged
Conversation
alanshaw
approved these changes
Oct 7, 2025
| Endpoint string `dynamodbav:"endpoint"` | ||
| Cause []byte `dynamodbav:"cause"` | ||
| ReceivedAt string `dynamodbav:"receivedAt"` | ||
| Processed bool `dynamodbav:"proc"` |
Member
There was a problem hiding this comment.
Suggested change
| Processed bool `dynamodbav:"proc"` | |
| ProcessedAt string `dynamodbav:"processedAt"` |
Contributor
Author
There was a problem hiding this comment.
currently there is this flag here and the processedAt field is in the consolidated record
frrist
reviewed
Oct 7, 2025
frrist
left a comment
Member
There was a problem hiding this comment.
just a question looks good otherwise
Comment on lines
178
to
180
| if err := c.egressTable.MarkAsProcessed(ctx, records); err != nil { | ||
| return fmt.Errorf("marking records as processed: %w", err) | ||
| } |
Member
There was a problem hiding this comment.
Do we intend to address this comment in this PR or a different one? #5 (comment)
Contributor
Author
There was a problem hiding this comment.
yeah, on a different one. Sorry it took me a minute to create the issue: #11
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.
This PR addresses most of the feedback that Alan left in #6 around the consolidation process.
The main change is that now the original egress/track invocations are stored in the DB. Besides, consolidation follows a regular ucanto flow. An egress/consolidate handler is registered in a ucanto server (a specific server for consolidation, separated from the public-facing one receiving egress/track invocations) and an egress/consolidate invocation is executed on each batch. The result of the process is an egress/consolidate receipt that contains the total egress accounted for along with any potential errors that might have happened during consolidation.