Skip to content

Conversation

sdangol
Copy link
Contributor

@sdangol sdangol commented Sep 11, 2025

Summary

This PR simplifies the Parser integration with the Batch processing API by making it more explicit on specifying configuration options and allowing better error handling

Changes

Please provide a summary of what's being changed

  • Refactored to make the parsing code path a sub-path export available under `@aws-lambda-powertools/batch/parser';
  • Changed the config options of BatchProcessor to accept a parser function, and a mutually exclusive schema or innerSchema, as well as optional transformer, and logger
  • Refactored to parsing to do the parsing just once based on the config options passed
  • Implemented error handling and logging for parsing errors
  • Updated the tests for the feature

Please add the issue number below, if no issue is present the PR might get blocked and not be reviewed

Issue number: closes #4453


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@sdangol sdangol self-assigned this Sep 11, 2025
@pull-request-size pull-request-size bot added the size/XL PRs between 500-999 LOC, often PRs that grown with feedback label Sep 11, 2025
@boring-cyborg boring-cyborg bot added batch This item relates to the Batch Processing Utility tests PRs that add or change tests labels Sep 11, 2025
@boring-cyborg boring-cyborg bot added the dependencies Changes that touch dependencies, e.g. Dependabot, etc. label Sep 11, 2025
@pull-request-size pull-request-size bot added size/XXL PRs with 1K+ LOC, largely documentation related and removed size/XL PRs between 500-999 LOC, often PRs that grown with feedback labels Sep 11, 2025
@dreamorosi dreamorosi requested a review from svozza September 11, 2025 14:48
Copy link

@sdangol sdangol merged commit 96977ff into main Sep 11, 2025
37 checks passed
@sdangol sdangol deleted the refactor/batch-parser branch September 11, 2025 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

batch This item relates to the Batch Processing Utility dependencies Changes that touch dependencies, e.g. Dependabot, etc. size/XXL PRs with 1K+ LOC, largely documentation related tests PRs that add or change tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: Add schema parsing issues when using the Batch processor with parser

3 participants