Skip to content

fix(parser): kinesis sequence number is str, not int #907

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Conversation

heitorlessa
Copy link
Contributor

Issue #, if available: #858

Description of changes:

Kinesis Sequence Number was mistakenly set as int and Parser (Pydantic) coerces to int, this silently fails the new Batch Utility when reporting partial failure.

cc @ran-isenberg

Checklist

Breaking change checklist

RFC issue #:

  • Migration process documented
  • Implement warnings (if it can live side by side)

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

@pull-request-size pull-request-size bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Dec 17, 2021
@heitorlessa heitorlessa changed the title feat(batch): new BatchProcessor for SQS, DynamoDB, Kinesis fix(parser): kinesis sequence number is str, not int Dec 17, 2021
@codecov-commenter
Copy link

codecov-commenter commented Dec 17, 2021

Codecov Report

Merging #907 (d565d76) into develop (8de3729) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #907   +/-   ##
========================================
  Coverage    99.88%   99.88%           
========================================
  Files          118      118           
  Lines         5133     5161   +28     
  Branches       573      578    +5     
========================================
+ Hits          5127     5155   +28     
  Misses           2        2           
  Partials         4        4           
Impacted Files Coverage Δ
...mbda_powertools/utilities/parser/models/kinesis.py 100.00% <100.00%> (ø)
aws_lambda_powertools/event_handler/api_gateway.py 100.00% <0.00%> (ø)
.../utilities/data_classes/api_gateway_proxy_event.py 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8de3729...d565d76. Read the comment docs.

@heitorlessa heitorlessa force-pushed the fix/parser-kinesis-sequenceNumber branch from 39381d8 to d565d76 Compare December 17, 2021 14:17
@pull-request-size pull-request-size bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Dec 17, 2021
@heitorlessa heitorlessa added bug Something isn't working area/parser labels Dec 17, 2021
@heitorlessa heitorlessa merged commit 99227ce into aws-powertools:develop Dec 17, 2021
@heitorlessa heitorlessa deleted the fix/parser-kinesis-sequenceNumber branch December 17, 2021 14:20
heitorlessa added a commit to heitorlessa/aws-lambda-powertools-python that referenced this pull request Dec 17, 2021
…tools-python into feat/batch-new-processor

* 'develop' of https://github.com/awslabs/aws-lambda-powertools-python:
  fix(parser): kinesis sequence number is str, not int (aws-powertools#907)
  feat(apigateway): add exception_handler support (aws-powertools#898)
  fix(event-sources): Pass authorizer data to APIGatewayEventAuthorizer (aws-powertools#897)
  chore(deps): bump fastjsonschema from 2.15.1 to 2.15.2 (aws-powertools#891)
heitorlessa added a commit to ran-isenberg/aws-lambda-powertools-python that referenced this pull request Dec 31, 2021
…tools-python into complex

* 'develop' of https://github.com/awslabs/aws-lambda-powertools-python: (24 commits)
  docs: consistency around admonitions and snippets (aws-powertools#919)
  chore(deps-dev): bump mypy from 0.920 to 0.930 (aws-powertools#925)
  fix(event-sources): handle dynamodb null type as none, not bool (aws-powertools#929)
  fix(apigateway): support @app.not_found() syntax & housekeeping (aws-powertools#926)
  docs: Added GraphQL Sample API to Examples section of README.md (aws-powertools#930)
  feat(idempotency): support dataclasses & pydantic models payloads (aws-powertools#908)
  feat(tracer): ignore tracing for certain hostname(s) or url(s) (aws-powertools#910)
  feat(event-sources): cache parsed json in data class (aws-powertools#909)
  fix(warning): future distutils deprecation (aws-powertools#921)
  docs(batch): remove leftover from legacy
  docs(layer): bump Lambda Layer to version 6
  chore: bump to 1.23.0
  docs(apigateway): add new not_found feature (aws-powertools#915)
  docs: external reference to cloudformation custom resource helper (aws-powertools#914)
  feat(logger): allow handler with custom kwargs signature (aws-powertools#913)
  chore: minor housekeeping before release (aws-powertools#912)
  chore(deps-dev): bump mypy from 0.910 to 0.920 (aws-powertools#903)
  feat(batch): new BatchProcessor for SQS, DynamoDB, Kinesis (aws-powertools#886)
  fix(parser): overload parse when using envelope (aws-powertools#885)
  fix(parser): kinesis sequence number is str, not int (aws-powertools#907)
  ...
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working internal Maintenance changes size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants