-
-
Notifications
You must be signed in to change notification settings - Fork 364
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
Symlink to bref/lib64/libgpg-error.so broken in some layers #875
Comments
Hi! I've since published a new release with new layers, could you update Bref, test and let us know if you still have the problem? |
Hi again @mnapoli Sorry about the delayed response, and thanks for the update. I tried again against the layer In this layer it appears the symlink doesn't exist at all.
|
Oh I just realized that, I would recommend using There is no official support for local invoke with serverless as it doesn't work in many cases with bref. Let us know if there are issues running on Lambda. |
I ended up forking the Bref repo and figuring out where the missing libs are, and solving it by modifying the base dockerfile for PHP compilation. It was a case of fixing the broken symlinks and copying some additional lib files. If you would like me to create a PR with my fixes I'm happy to do this. |
Hey, if you have a link to the diff why not take a look. If you don't know how to create such a link, it will be easier for you to open a PR then. I don't know if we will want to merge it, but let's take a look 👍 |
No worries, I have submitted a PR for this issue. |
Thanks, I've written a comment about all that here: #928 (comment) I would suggest closing this issue since there isn't anything actionable we can do here, what do you think? |
@mnapoli |
@Maxwell2022 Napoli's comment isn't against supporting serverless-offline, it's about protecting the production environment. It's not ideal to include modifications to 1B of Lambda executions using Bref without knowing if they will have a bad reaction just because of serverless-offline. Bref tries on a best-effort to help running workloads locally for development purposes, but the primary commitment is to run PHP in production. We need a solid understanding of which modifications are necessary, why they are necessary and the confidence to know they won't break production workloads. |
+1, also on this:
|
I meant having serverless running offline and having the function being triggers automatically (listening for message) without having to invoke it manually, something that serverless-offline + serverless-offline-sqs + elasticmq is doing. |
Are there any other issues (open or closed) where examples of The team I'm part of has been running |
Just thinking about this, could it be because these libs are missing in the lambci image? It would make sense if this is working in lambda. lambci/docker-lambda#341 |
Description:
Development Environment is Ubuntu 20.04, Serverless 2.28
Sample layers:
How to reproduce:
Create a serverless config referring to these layers:
e.g.
Attempt to locally invoke serverless.
Serverless will fail to execute with the error
Error: ENOENT: no such file or directory, stat '/home/{username}/.cache/serverless/invokeLocal/layers/php-73/31/bref/lib64/libgpg-error.so'
Upon examining
/home/{username}/.cache/serverless/invokeLocal/layers/php-73/31/bref/lib64/
(eg.ls -la
) one will see the symlink is broken:libgpg-error.so -> ../../lib64/libgpg-error.so.0.10.0
Manually download and examine the layer in question - eg. .
arn:aws:lambda:ap-southeast-2:209497400698:layer:php-73:31
and examine the contents. One will see that the symlink is broken in the layer package as well.Solution
Fix the symlink in the layers - change from
../../lib64/libgpg-error.so.0.10.0
to../lib64/libgpg-error.so.0.10.0
orlibgpg-error.so.0.10.0
The text was updated successfully, but these errors were encountered: