Skip to content
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

Fix extension compatibility issues with AWS Lambda Runtime Interface Emulator #879

Merged
merged 2 commits into from
May 27, 2024

Conversation

rebu-dt
Copy link
Contributor

@rebu-dt rebu-dt commented May 23, 2024

Fixes the following issues I encountered while trying to run an extension built with the lambda-extension crate in AWS Lambda RIE:

  • AWS Lambda RIE returns status code 202 Accepted instead of 200 when emulating the Telemetry API (see the response codes on this page), which led to the error: unable to initialize the telemetry api: 202 Accepted. This patch accepts all status codes in the 200-299 range instead. I also changed similar occurrences for consistency.
  • It looks like the tracing field on InvokeEvent is not set, so I made it optional. Please let me know if this change is too intrusive (maybe #[serde(default)] would be a better fit here?). Also see tracing field missing from Lambda extension INVOKE event aws/aws-lambda-runtime-interface-emulator#109

By submitting this pull request

  • I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • I confirm that I've made a best effort attempt to update all relevant documentation.
    • (probably not relevant here)

@calavera
Copy link
Contributor

Can you format your changes?

Copy link
Contributor

@calavera calavera left a comment

Choose a reason for hiding this comment

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

We can merge it once we change Tracing to have a default instead of being an option.

@rebu-dt rebu-dt force-pushed the extension-status branch from 3c16c8a to abe5625 Compare May 27, 2024 08:21
@rebu-dt
Copy link
Contributor Author

rebu-dt commented May 27, 2024

@calavera I've changed the tracing field to use #[serde(default)] and ran the formatter.

Copy link
Contributor

@calavera calavera left a comment

Choose a reason for hiding this comment

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

Thanks!

@calavera calavera merged commit ee78eaa into awslabs:main May 27, 2024
4 checks passed
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