-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
No zip file is created #2
Comments
Hrm. That's interesting. I don't have shell access to windows but here's a few ideas that may be factors. I put the examples together using unix conventions for volume mounts. The syntax may actually be different with windows paths. Seeing the The other thing I see is that your shell output lists permission bits on the left. The script that runs and creates the zip queries for files in the release directory what are executable. For some reason that One think you might be able to try is change the default entrypoint to drop into an interactive bash docker run --rm \
-it \
-v ${PWD}:/code \
-v ${HOME}/.cargo/registry:/root/.cargo/registry \
-v ${HOME}/.cargo/git:/root/.cargo/git \
--entrypoint '/bin/bash' \
softprops/lambda-rust
# run the default entrypoint manually
/usr/local/bin/build.sh
# inspect the target/lambda/release dir
cd target/lambda/release
# inspect what permissions the resulting files have
ls -al
# inspect the list of files that we expect to zip up
find -maxdepth 1 -executable -type f |
if you can a chance can you try that and report back with any interesting insights. I'd do this myself but I don't have access to a windows machine where I can test myself |
This is new to me but I could also try experimenting with travis' new window support https://docs.travis-ci.com/user/reference/windows/#powershell |
About the hello binary not looking executable -- Windows has no file system attribute for a file being executable. Running what you suggested:
|
It seems the problem is the |
It just occurred to me why this bug is Windows specific: because Windows doesn't have an executable file system flag, everything in the mounted volume appears executable from inside the container. This breaks the assumption the script makes that the only executable file in the |
Thanks for the extra info. I'll try to find a more portable alternative. Let me know if you have ideas |
I had an idea for this today that I'll try out. as an alternative to having the find command resolve executable binaries I could expose some hook that would let users specify the binary name being targetted explicitly. The serverless rust plugin already has this name handy so it would be straight format for that plugin to do that automatically in for those using the serverless framework setup. I'll do some experiments and report back with what I find |
I'm seeing the same thing using arch linux running kernel 4.20.7.
|
Ah so, it looks like mine is a different issue. Looks to me like this line is never reached because the Note that this happens if you follow these instructions and name your binary
Shall I open a new issue for this @softprops? It seems like a trivial fix. |
To some degree this plugin renames your binary for you ( so theres less for you to configure ). What happens when you just use your default bin ( main.rs )? |
I think it would be good to handle the case of explicit renames though for robustness. I'll open an issue. I should be able to grab that this weekend. |
If I understand correctly from the readme, after running
my code should build and a zip file should be generated inside the
target/lambda/release/
directory. The command runs without error and builds my code, yet there is no zip:I'm running these commands inside the serverless-aws-rust template project.
OS: Windows 10 x64
The text was updated successfully, but these errors were encountered: