-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Support "stay open" mode for Lambda invocations (updated PR) #4914
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
Conversation
LocalStack integration with Proββββ3 filesβ Β±0ββββββ3 suitesβ Β±0βββ35m 38s β±οΈ +55s Results for commit d013ee7.βΒ± Comparison against base commit 07b6887. β»οΈ This comment has been updated with latest results. |
1838726
to
6ee228e
Compare
369fa06
to
6f41e99
Compare
6f41e99
to
4b41eda
Compare
c045d84
to
990cda0
Compare
@@ -1410,18 +1477,6 @@ def docker_image_for_lambda(cls, lambda_function: LambdaFunction): | |||
) | |||
docker_tag = runtime | |||
docker_image = config.LAMBDA_CONTAINER_REGISTRY | |||
# TODO: remove prefix once execution issues are fixed with dotnetcore/python lambdas |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These patches seem to be no longer required - in fact, some of these older images do not support $DOCKER_LAMBDA_STAY_OPEN
, hence removing this code from here.
@@ -854,8 +904,13 @@ def prime_docker_container( | |||
|
|||
LOG.debug("Starting docker-reuse Lambda container: %s", container_name) | |||
DOCKER_CLIENT.start_container(container_name) | |||
|
|||
def wait_up(): | |||
cont_status = DOCKER_CLIENT.get_container_status(container_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We wait here for the container to start up, but would that necessarily include that the 9001 socket is already available? It only checks if the container status is up, not whether the port is already open. Might be a small window we never hit though.
This would also tie in nicely with the availability check for port 9001 to check against networking issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great point, thanks @dfangl . π Updated the PR - it now also contains logic to assert availability of the target port, where appropriate (only in case we're running in Docker, and if the IP address of the target container can be determined by the Docker client).
990cda0
to
7c94a0d
Compare
7c94a0d
to
d013ee7
Compare
β¦ng of unprintable chars to SQS DLQ
Thanks a bunch @chaz-doyle-cko . Rebased the branch and squashed the commits into two parts, to retain the history and authorship. π We'll also acknowledge the authorship of @jamietanna (original author) and @wesselvdv (contributor) and @dfangl (reviewer) in the commit messages. (will get merged once the builds are passing..) Thanks all for helping get this over the line! |
Amazing, thanks @chaz-doyle-cko for getting this over the line, I know a lot of folks are going to really appreciate this π Did we want to add anything extra in the docs to note this is better for Java Lambda performance? |
When can we expect a release to be cut that includes this wonderful change? |
This should be available in the |
ohhhh, I should've thought of this myself. yay! |
Support "stay open" mode for Lambda invocations.
Based on #4906 . Recreated the PR, to trigger the CI builds, and added a few minor fixes.
Replaces #4185
Closes #4123