Visitar URL original
Allow Lambda plugins to return invocation results directly by whummer · Pull Request #4688 · localstack/localstack · GitHub
The Wayback Machine - https://web.archive.org/web/20211003133415/https://github.com/localstack/localstack/pull/4688
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

Allow Lambda plugins to return invocation results directly #4688

Merged
merged 4 commits into from Oct 2, 2021

Conversation

@whummer
Copy link
Member

@whummer whummer commented Oct 2, 2021 •

Allow Lambda plugins to return invocation results directly, streamlining the code, and removing code duplication around invocation forwarding in the presence of LAMBDA_FORWARD_URL.

Introduces a LambdaInvocationForwarderPlugin which is in charge of forwarding the Lambda invocations. In that process, we are able to remove some of the duplicate error handling code in lambda_api.py and lambda_executors.py.

There is one TODO left in the code - currently we're returning the first result received from a Lambda executor. Technically, there could be multiple execution plugins trying to intercept the invocation and returning a result - we need a better conflict resolution mechanism if that situation comes up in the future (currently a WARNING message is being logged should that occur..).

(The PR also contains a few refactorings/fixes in the Lambda unit tests, e.g., avoid hardcoding us-east-1 as the region for Lambda ARNs.)

@serkan-ozal - can you please confirm that the Thundra plugin still works properly with these changes? Thanks!

/cc @thrau @dfangl

@whummer whummer had a problem deploying to localstack-ext-tests Oct 2, 2021 Failure
@github-actions
Copy link

@github-actions github-actions bot commented Oct 2, 2021 •

LocalStack integration with Pro

    1 files  ±0      1 suites  ±0   15m 49s ⏱️ ±0s
605 tests ±0  587 ✔️ ±0  17 💤 ±0  1 ❌ ±0 

For more details on these failures, see this check.

Results for commit 1a48db8. ± Comparison against base commit 1a48db8.

♻️ This comment has been updated with latest results.

@whummer whummer had a problem deploying to localstack-ext-tests Oct 2, 2021 Failure
@whummer whummer force-pushed the lambda-plugin-return branch from 3348917 to dff3daa Oct 2, 2021
@whummer whummer had a problem deploying to localstack-ext-tests Oct 2, 2021 Failure
@whummer whummer had a problem deploying to localstack-ext-tests Oct 2, 2021 Failure
@whummer whummer had a problem deploying to localstack-ext-tests Oct 2, 2021 Failure
@coveralls
Copy link

@coveralls coveralls commented Oct 2, 2021

Coverage Status

Coverage increased (+0.1%) to 80.319% when pulling abd9e83 on lambda-plugin-return into f4a188b on master.

@whummer whummer merged commit 1a48db8 into master Oct 2, 2021
8 of 9 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
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants