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

Discover lambda runtime executor using plugins #7034

Merged
merged 8 commits into from Oct 18, 2022
Merged

Conversation

dfangl
Copy link
Member

@dfangl dfangl commented Oct 17, 2022

Description

The lambda runtime executor class can now be configured and is loadable using the plux plugin mechanism.
Also introduced an abc to specify the interface for runtime executors.

Introduced configuration options

  • LAMBDA_RUNTIME_EXECUTOR: Specify the runtime executor using its plugin name. Will make it possible to switch to another executor (like kubernetes or static executor) specified as plugins.

@dfangl dfangl temporarily deployed to localstack-ext-tests October 17, 2022 15:26 Inactive
@dfangl dfangl temporarily deployed to localstack-ext-tests October 17, 2022 15:30 Inactive
Copy link
Member

@dominikschubert dominikschubert left a comment

Choose a reason for hiding this comment

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

some nits, otherwise LGTM 👍

@dfangl dfangl temporarily deployed to localstack-ext-tests October 17, 2022 15:56 Inactive
@dfangl dfangl temporarily deployed to localstack-ext-tests October 17, 2022 16:03 Inactive
@coveralls
Copy link

coveralls commented Oct 17, 2022

Coverage Status

Coverage decreased (-0.01%) to 79.321% when pulling 5ad024c on lambda-runtime-plugins into df041e7 on master.

@github-actions
Copy link

github-actions bot commented Oct 17, 2022

LocalStack integration with Pro

       3 files  ±0         3 suites  ±0   1h 24m 28s ⏱️ + 11m 57s
1 410 tests ±0  1 227 ✔️ ±0  183 💤 ±0  0 ±0 
2 008 runs  ±0  1 593 ✔️ ±0  415 💤 ±0  0 ±0 

Results for commit 5ad024c. ± Comparison against base commit df041e7.

♻️ This comment has been updated with latest results.

Copy link
Member

@thrau thrau left a comment

Choose a reason for hiding this comment

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

Looks mostly good to me! The plugin should move into its own module though (see explanation in the comments).

…ntime executor plugin def to own plugins file
@dfangl dfangl temporarily deployed to localstack-ext-tests October 18, 2022 07:21 Inactive
@dfangl dfangl temporarily deployed to localstack-ext-tests October 18, 2022 07:26 Inactive
@dfangl dfangl requested a review from thrau October 18, 2022 08:36
@dfangl dfangl temporarily deployed to localstack-ext-tests October 18, 2022 08:38 Inactive
@@ -0,0 +1,12 @@
from localstack.services.awslambda.invocation.runtime_executor import RuntimeExecutorPlugin
Copy link
Member

Choose a reason for hiding this comment

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

we're still importing this entire import path when we start localstack. which includes the lambda API, and everything under localstack.services.awslambda.invocation.lambda_models.
could we just move the RuntimeExecutorPlugin class here as well, to make sure we have no other imports?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, you are of course right. My assumption as that runtime_executor would not import anything as well, but of course it does for the types.

@dfangl dfangl temporarily deployed to localstack-ext-tests October 18, 2022 09:49 Inactive
Copy link
Member

@thrau thrau left a comment

Choose a reason for hiding this comment

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

looks great now! plugins ftw

@dfangl dfangl merged commit c5be6c6 into master Oct 18, 2022
@dfangl dfangl deleted the lambda-runtime-plugins branch October 18, 2022 11:30
cmoralesmx pushed a commit to cmoralesmx/localstack that referenced this pull request Oct 24, 2022
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.

None yet

4 participants