-
Notifications
You must be signed in to change notification settings - Fork 416
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
serverless-webpack 5.5.0 attempts to run Webpack on container images which are not JavaScript #825
Comments
For what I understand you are mixing both container and regular JavaScript function in the same serverless config? |
|
Could you test again using the 5.5.1? Thanks 🙏 |
Sadly not:
|
From where the |
in the definition of the server function, I would assume it's looking at the command of the lambda |
apollo.lambda is the command passed to the container image. The problem seems to be that it's incorrectly being interpreted as a JavaScript function, so it's looking for a function called lambda inside an apollo.js file - but that's not the case. It's just the command passed to the container. The problem appears to be serverless-webpack is trying to build it, but it's not a container image that Serverless is building itself (because the image has a uri field, it refers to an externally built image, not one built by Serverless). Ideally serverless-webpack shouldn't be trying to get involved in container images that the serverless framework isn't building |
@cnorthwood could you check my attached PR? I've skipped off function when |
Unfortunately that doesn't seem to have changed anything |
You still have the same error when using my PR? functions:
server:
image:
uri: http://localhost
command:
- apollo.lambda |
with apologies, it looks like I failed to change to the right branch - yes, that appears to be correct now |
Good news! |
This is a Bug Report
Description
For bug reports:
serverless-webpack is stopping me from deploying lambda containers as part of my service that are not
it should not have touched them as they're not relevant to webpack
N/A
I assume this is related to #723, which I can see the sense in - however, I can't see a way to say "this isn't a container image that Webpack cares about" and hence ignore that lambda in the service definition. Ideally there'd be an option to opt in/out of either Webpack's involvement in particular functions, or container functions as a whole as not all container functions are guaranteed to be part of the service.
Additional Data
The text was updated successfully, but these errors were encountered: