8000 Fix check if an event should be read as SQS event by dfangl · Pull Request #98 · localstack/localstack-java-utils · GitHub
[go: up one dir, main page]

Skip to content

Fix check if an event should be read as SQS event #98

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 20, 2022
Merged

Conversation

dfangl
Copy link
Member
@dfangl dfangl commented Dec 20, 2022

Motivation

With localstack/localstack#6603, the (incorrect) attribute "sqs" was removed from the event layout.
However, it seems this broke the javalibs, as they assumed that attribute to be present for the detection of a sqs event.

This PR will correct the incorrect assumption on the java util side, to allow SQSEvents to be properly created again.

Addresses localstack/localstack#6995 .
This only affects the local provider, but I fixed it regardless as it is a regression.

The whole logic isn't valid, we should inspect the lambda handler and check its type to use it, but implementing that (which is already implemented in the lambda java ric anyway) seems unnecessary if the local executor is deprecated anyway.

Changes

  • Use the (acutally present, also in AWS) eventSource attribute of a record to check if it is an sqs event, instead of the incorrect sqs key.
  • Update to 0.2.22

@dfangl dfangl requested a review from whummer December 20, 2022 14:04
Copy link
Member
@whummer whummer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch, kudos for fixing this @dfangl ! Will release this one manually, and then try to get the Maven release pipeline in place in a follow-up 👍

@whummer whummer merged commit 4cf2b12 into master Dec 20, 2022
@whummer whummer deleted the fix-sqs-event branch December 20, 2022 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0