-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Allow using amazon-maintained lambda docker image repo #4734
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 using amazon-maintained lambda docker image repo #4734
Conversation
This PR corresponds to issue #4733. Not sure how to link it |
note: running integration tests locally fails, but it seems that it was failing before my changes |
Thanks for this PR @isaac-j-miller ! 👍 We'll have to run a couple of checks to see how this will impact various parts of the Lambda execution in LocalStack. So, I'd expect that we'll need a few iterations for this change, but certainly a great starting point. To kick things off - can you please push another small commit to your branch, to re-trigger the CI builds (apparently the build was not triggered by Github). Thanks! |
Thanks! I figured that there would have to be a couple iterations on this because I'm not super familiar with the patterns, etc. that are used in localstack, or whether it would make sense to instead make the amazon repository the default instead of lambdaci |
Sorry @isaac-j-miller , the CI build was again not triggered for the latest commit. This is really annoying - seems to be a Github issue (we've recently also seen this with a few other (but not all) user accounts in the past). Not sure how to solve this - perhaps you could get in touch with customer support? We have already provided permission to execute builds for your user account in this repo, but it's still not working. If worse comes to worst, we can also take your commits and create a separate PR (making sure that your authorship will be retained..). Thanks! |
Hi,
On my end, it says that for a first time contributor, an admin has to
approve CI builds, so I think that may be the issue.
Thanks,
Isaac
…On Sat, Oct 16, 2021, 4:17 PM Waldemar Hummer ***@***.***> wrote:
Sorry @isaac-j-miller <https://github.com/isaac-j-miller> , the CI build
was again not triggered for the latest commit. This is really annoying -
seems to be a Github issue (we've also seen this).
Not sure how to solve this - perhaps you could get in touch with customer
support? We have already provided permission to execute builds for your
user account in this repo, but it's still not working. If worse comes to
worst, we can also take your commits and create a separate PR (making sure
that your authorship will be retained..). Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4734 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKUVJUQHA5HYJOIBRWAGYVLUHHMUZANCNFSM5GAPDB3Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
@isaac-j-miller We did that, actually. Can you please give me push access to your fork/branch? Perhaps it helps if I push a dummy commit to your branch.. Thanks |
Ok, I just now added you as a collaborator on my fork
…On Sat, Oct 16, 2021, 5:41 PM Waldemar Hummer ***@***.***> wrote:
On my end, it says that for a first time contributor, an admin has to
approve CI builds
We did that, actually. Can you please give me push access to your
fork/branch? Perhaps it helps if I push a dummy commit to your branch..
Thanks
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4734 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKUVJUQTERZ43HIBJSS52BTUHHWRBANCNFSM5GAPDB3Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
39ce963
to
c0b6fc5
Compare
Done! Builds running now.. Actually, I had to do a |
Thanks!
…On Sat, Oct 16, 2021, 7:26 PM Waldemar Hummer ***@***.***> wrote:
Done! Builds running now.. Actually, I had to do a git rebase master and
resolve a few minor merge conflicts to get the latest version. Hope you
won't run into merge conflicts when pulling the branch (otherwise checking
out a fresh copy of the branch may help). Thanks
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4734 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKUVJUQFC7QBJIGG3LGKYW3UHICZTANCNFSM5GAPDB3Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Ok great @isaac-j-miller , looks like the build was triggered this time. 👍 https://app.circleci.com/pipelines/github/localstack/localstack/2070/workflows/78be3800-04f9-4a53-8823-d54d507628c5/jobs/7682 There's a few minor issues with the code linter - can you please take a look? You can replicate this via |
…r/localstack into imiller/amz-lambda
Actually - @isaac-j-miller we'd be happy to take over the PR from here and get it over the line - what are your thoughts on that? Might be a bit easier than the review/update cycles on the PR (as I mentioned, this is a fairly involved change, and I'd expect that we'll need quite a few iterations). We'd squash your existing commits into a single one (to make sure that your authorship is retained) and then branch off a new PR to make any required changes for the integration. Please let us know if that works for you. Thanks! |
Oh my bad, that must have been because of the merge. I'll fix that
…On Tue, Oct 19, 2021, 4:24 AM Daniel Fangl ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In localstack/services/awslambda/lambda_executors.py
<#4734 (comment)>
:
> + if not digit_match:
+ raise Exception(f"No version number found for runtime {runtime}")
+ digit_index = digit_match.start()
+ base_runtime = runtime[:digit_index]
+ runtime_version = runtime[digit_index:]
+ if base_runtime not in repositories.keys():
+ raise Exception(f"base runtime {base_runtime} from {runtime} not recognized!")
+ image_name = f"amazon/{repositories[base_runtime]}"
+ if base_runtime in ["nodejs", "go"]:
+ print(base_runtime, runtime_version)
+ [major, _minor] = runtime_version.split(".")
+ return [image_name, major]
+ return [image_name, runtime_version]
+
+ @classmethod
+ def get_amzn_docker_img(cls, runtime: str):
You have this method in there twice, this cannot pass the linter, could
you remove one and try the build again?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4734 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKUVJURFESTS24CYEAL6T3TUHUTNLANCNFSM5GAPDB3Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
@whummer that sounds good |
Please review this @whummer so I can get python3.9 support from localstack. |
It's kind of a shameless plug, but if you want to use Python 3.9 or Node.js 14.x images in Localstack without waiting for official images to be supported, you can use my fork of the LambCI repo with all the latest runtimes (both x86 and arm64). 🙈 Simply pass the following env var to the LS container:
|
Where is this PR at? |
Thanks @navels , apologies for the delay on this one - we are still in the process of spec'ing out the solution that most suitably fits the internals of our Lambda implementation. Ultimately, I think we'd want to get the official AWS images integrated into LocalStack (even though the work by @mLupine on arm64 support for lambdci is awesome! 🙏 ). ARM64 support will be critical, as we've recently released multi-arch builds to support, e.g., Apple M1. The main question we are evaluating is whether we want to rely (1) solely on the "over-the-network" invocations required by the AWS Lambda Runtime Interface Client (RIC), or (2) also enable the Docker "entrypoint-based" invocations that Lambci has introduced (i.e., starting up an emphemeral Lambda container that serves only a single request). For (1), we could build upon our learnings from the "stay-open" invocation mode for the For (2), the advantage is that all communication is only happening in the local context of the Lambda container (the event payload being passed in via (Arguably, we could prescribe that proper connectivity between LocalStack and the Lambda containers is a requirement, but we're seeing a lot of users who are struggling with the networking setup in docker/docker-compose (or even with Helm/Kubernetes) - hence the "entrypoint-based" invocations do actually provide some benefit. From an initial analysis, it seems that we should be able to get the "entrypoint-based" invocations working with the official AWS images as well - but we'll see..) We'll prioritize this work item and will provide an update in the next couple of days.. Thanks! |
With Nodejs 16.x hopefully coming soon, has there been any movement on switching off of lambci? Also, with the throttling changes that have been made to DockerHub, would it be possible to use the public ECR versions? https://gallery.ecr.aws/lambda/ |
Any updates to share? |
Hi there! We are definitely working on it! We are trying to do it right, but this might take a couple more weeks. Stay tuned for more updates soon! |
Hi, any update on this? |
Yes, I can provide you with an update. We have a prototype of a new lambda engine already merged (see #5306 ). It is based on the official AWS images and shows a huge performance improvements (cold invocation times of around 400-600 ms, hot invocation of around 5ms for simple lambdas, like an echo). Its already merged to master, and can be activated by the instructions in the PR. |
Hi! As explained in my former post, this is now part of a complete Lambda rework. Just exchanging the images will not work like this, but needs more work behind it (see #5306 for our approach to this). Still, I want to thank you for your contribution (which also kickstarted the lambda project), they are always very welcome! |
Please refer to the contribution guidelines in the README when submitting PRs.