Add DynamoStreamHandler (v8.1.0) - #63
Merged
Merged
Conversation
Adds a sixth handler type, DynamoStreamHandler, for processing DynamoDB streams. Records pass through raw (images stay in AttributeValue form); handlers return a `retry` list to report failed records via partial batch response. The source table is referenced by name through a new `tables` map on LambdaService, mirroring the existing eventBuses pattern. Also sets up release infrastructure: a CHANGELOG.md, a GitHub Release step in the publish workflow (notes lifted from the matching CHANGELOG section), and a "Releasing" section in CLAUDE.md. Bumps version to 8.1.0.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #63 +/- ##
==========================================
+ Coverage 83.14% 83.77% +0.62%
==========================================
Files 24 26 +2
Lines 623 678 +55
Branches 148 161 +13
==========================================
+ Hits 518 568 +50
- Misses 103 106 +3
- Partials 2 4 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…notes - DynamoStreamHandler: if a record returned for retry has no sequence number, fail the whole batch instead of silently dropping it (reporting a subset could checkpoint Lambda past the unreported record). - publish.yml: extract release notes before publishing so a stable release with no CHANGELOG section aborts before npm publish; prereleases without a section get a generic body instead of failing the workflow. - lambda-service: comment explaining the table lookup is key-only by design. - Tests for the missing-sequence-number guard and the missing-table error.
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
Adds a sixth handler type,
DynamoStreamHandler, for processing DynamoDB streams, and sets up release infrastructure (CHANGELOG + GitHub Release step). Releases v8.1.0.DynamoStreamHandlerhandlers/dynamo-stream-handler.ts. Records pass through raw (images stay in DynamoDBAttributeValueform — no unmarshalling, no new dependency). Return aretrylist to report failed records; the wrapper maps each to itsSequenceNumberfor partial batch response. A thrown error fails the whole batch.ServiceDynamoStreamFunctionwires aDynamoEventSourcewithstartingPosition(defaultTRIM_HORIZON),batchSize,maxBatchingWindow,retryAttempts,bisectBatchOnError,parallelizationFactor,maxRecordAge, andreportBatchItemFailures: true.tablesmap onLambdaService, mirroring the existingeventBusespattern. Handler authors write only a stringtableName; theITableis supplied where the service is created.Out of scope (deliberately): image unmarshalling,
onFailureDLQ destination, andfilterCriteria.Release infrastructure
CHANGELOG.md(Keep a Changelog format), seeded with8.1.0and8.0.1.publish.ymlnow creates a GitHub Release from the matching CHANGELOG section (contents: write), and bumpsactions/checkout/actions/setup-nodev4 → v6.CLAUDE.mddocumenting the cut-a-release process.Tests
{retry}mapping / throw-fails-batch).dynamoStreambucket.EventSourceMappinghasStartingPosition: TRIM_HORIZONandFunctionResponseTypes: [ReportBatchItemFailures]; snapshot updated for the one new Lambda.npm run buildclean, all 39 tests pass.Releasing after merge
Tag the merge commit:
git tag v8.1.0 && git push origin v8.1.0→ publishes to npm (latest) and creates the GitHub Release.