Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add hot reloading for new lambda provider #7321

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 12 commits into from
Dec 16, 2022
Merged

Add hot reloading for new lambda provider #7321

merged 12 commits into from
Dec 16, 2022

Conversation

dfangl
Copy link
Member

@dfangl dfangl commented Dec 13, 2022

Motivation

For efficient lambda development, we have to provide an easy solution to hot reload lambda functions, especially those of interpreted languages (like python and nodejs).
However, we want to make it available for all managed runtimes.
It should also only reset the environments if a change is detected, to prevent unnecessary initializations.

Breaking Changes with Fallbacks

  • Change of the default hot-reloading bucket marker, from __local__ to hot-reload. The current provider will continue to support the __local__ marker for now, the new one will only support the new one. Would move the deprecation to 1.4 and the removal to 2.0.

Other Changes

  • Add hot-reloading support
  • Allow VolumeBind objects to be used directly in docker client, and add option for read only mounts (necessary for hot reloading)
  • Add test for hot reloading

Fixes #7200

@dfangl dfangl temporarily deployed to localstack-ext-tests December 13, 2022 15:28 — with GitHub Actions Inactive
@github-actions
Copy link

github-actions bot commented Dec 13, 2022

LocalStack integration with Pro

       3 files  +    1         3 suites  +1   1h 23m 16s ⏱️ -13s
1 570 tests +  10  1 299 ✔️ +    8  271 💤 +    2  0 ±0 
2 208 runs  +340  1 667 ✔️ +204  541 💤 +136  0 ±0 

Results for commit 89fea46. ± Comparison against base commit c4fe128.

♻️ This comment has been updated with latest results.

@dfangl
Copy link
Member Author

dfangl commented Dec 13, 2022

@whummer @thrau Do you have any preferences for the bucket marker? It has to be valid, we should probably reserve it. For now the placeholder from me is hot-reloading-bucket, any better ideas?

@dfangl dfangl temporarily deployed to localstack-ext-tests December 13, 2022 16:44 — with GitHub Actions Inactive
@dfangl dfangl temporarily deployed to localstack-ext-tests December 13, 2022 16:54 — with GitHub Actions Inactive
@dfangl dfangl temporarily deployed to localstack-ext-tests December 14, 2022 10:25 — with GitHub Actions Inactive
@coveralls
Copy link

coveralls commented Dec 14, 2022

Coverage Status

Coverage increased (+0.04%) to 84.894% when pulling 89fea46 on lambda-hot-reloading into c4fe128 on master.

@whummer
Copy link
Member

whummer commented Dec 14, 2022

@dfangl I think hot-reloading-bucket sounds good. Alternatively, we could name it local-hot-reloading, to include the "local" part in it. But no strong opinion from my side.

We also sometimes use the prefix ls- to indicate internal buckets/resources/etc, but ls-hot-reloading-bucket seems a bit lengthy. Also, the odds that someone would use this exact bucket name are pretty minimal. :) 👍

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.

minor nits, otherwise LGTM 👍

@dfangl dfangl temporarily deployed to localstack-ext-tests December 16, 2022 11:14 — with GitHub Actions 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.

LGTM! i can see my comments from yesterday are already addressed :-)

@dfangl dfangl merged commit 8307a35 into master Dec 16, 2022
@dfangl dfangl deleted the lambda-hot-reloading branch December 16, 2022 17:44
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.

feature request: Lambda ASF provider code hot-reload
5 participants