SNOW-1269784: Snow Snowpark Build/Deploy Issues (can't manually zip folder)
Closed this issue · 3 comments
SnowCLI version
2.1.1
Python version
3.11.7
Platform
macOS-10.16-x86_64-i386-64bit
What happened
This is a bit weird, but I have a need to build my snowpark project, unzip the package, and make a modification to a sub-module. I found a bug in the process, which I have isolated the issue down to simply unzipping and zipping the package, no changes necessary.
- if you build the package with
snow build
, and deploy it withsnow deploy
, it works fine. - if you build the package with
snow build
, open the zipped package, re-zip the folder, and then deploy it withsnow deploy
, it ends up not being able to find modules that are clearly in the package. The deploy does not fail, the procedure being called just fails at runtime.
The screen recording walks through these two paths above, illustrating the breaking point is simply opening and re-zipping the folder generated by snow build
.
Screen.Recording.2024-03-25.at.14.39.58.mov
Console output
Python Interpreter Error:
ModuleNotFoundError: No module named 'procedures' in function HELLO_PROCEDURE with handler procedures.hello_procedure
How to reproduce
- Init a snowpark project
- run
snow build
to build the project zip - open/extract the project zip, delete existing zip file
- compress the expanded project folder to create a new zip
- run
snow deploy
for the new zip - call procedure
I did go back and test v2.0.0 and v2.1.0 as well, and they have the same issue.
Hi,
It looks like your manually created zip contains extra app 2/
due to compressing folder and not only its content.
Can you compare content and paths of both archives using unzip -l <name_of_archive>.zip
?
Oh! you're right, compressing the folder does nest everything in the parent folder. Consider this a non-issue, thanks!