You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assuming I understand the code correctly, it appears that the copy_to_container method creates a tar file containing the entire project, and copies it to the container. If the project contains any large files (in my case, I had a cdk.out directory that was ~2.5G), the container.put_archive call fails with a mysterious ('Connection aborted.', OSError(22, 'Invalid argument')) error. Best I've been able to determine, this is due to the filesize exceeding some limit imposed by the OS (MacOS Sonoma 14.6.1, in my case).
It would be helpful if this plugin supported something similar to .dockerignore or an exclude property in the pyproject.toml file. It looks like TarFile.add supports a filter argument, which looks like a good starting point.
Attached is the stacktrace that was output when the OSError occurred.
if you run poetry lambda-build --help, you should notice a new field copy-to-container-ignore you can provide it as an argument of CLI execution poetry lambda-build --copy-to-container-ignore, or in pypoject.toml
copy-to-container-ignore = ["cdk.out"]
I am curious about your feedback. Let me know if that works for you.
Assuming I understand the code correctly, it appears that the
copy_to_container
method creates a tar file containing the entire project, and copies it to the container. If the project contains any large files (in my case, I had acdk.out
directory that was ~2.5G), thecontainer.put_archive
call fails with a mysterious('Connection aborted.', OSError(22, 'Invalid argument'))
error. Best I've been able to determine, this is due to the filesize exceeding some limit imposed by the OS (MacOS Sonoma 14.6.1, in my case).It would be helpful if this plugin supported something similar to
.dockerignore
or anexclude
property in thepyproject.toml
file. It looks likeTarFile.add
supports afilter
argument, which looks like a good starting point.Attached is the stacktrace that was output when the OSError occurred.
stacktrace.txt
The text was updated successfully, but these errors were encountered: