SNOW-1007765: snow snowpark package create will also package all files and folders from where the command was ran from
Closed this issue · 2 comments
maxa-samuel-whittom commented
SnowCLI version
1.2.4
Python version
3.10.13
Platform
macOS-14.1-arm64-arm-64bit
What happened
I am trying to create a package using snow snowpark package create
to import in my native app Python code. I'll use sqlfluff
as an example, but I think you can reproduce the bug with any Python package.
I noticed the zip file to be quite big so I opened it to see the contents and that's when I noticed it also contained all the files and folders where I ran the command from.
Console output
Package sqlfluff.zip created. You can now upload it to a stage (`snow snowpark package upload -f sqlfluff.zip -s
packages`) and reference it in your procedure or function.
The package sqlfluff is supported, but does depend on the
following Snowflake supported native libraries. You should
include the following in your packages: [<Requirement: "PyYAML==6.0.1">, <Requirement:
"toml==0.10.2">, <Requirement: "Pygments==2.17.2">, <Requirement: "typing_extensions==4.9.0">, <Requirement:
"pytest==7.4.4">, <Requirement: "colorama==0.4.6">, <Requirement: "regex==2023.12.25">, <Requirement:
"Jinja2==3.1.3">, <Requirement: "iniconfig==2.0.0">, <Requirement: "packaging==23.2">, <Requirement:
"appdirs==1.4.4">, <Requirement: "pathspec==0.12.1">, <Requirement: "chardet==5.2.0">, <Requirement: "tblib==3.0.0">,
<Requirement: "tomli==2.0.1">, <Requirement: "tqdm==4.66.1">, <Requirement: "exceptiongroup==1.2.0">, <Requirement:
"MarkupSafe==2.1.3">, <Requirement: "pluggy==1.3.0">, <Requirement: "click==8.1.7">]
How to reproduce
cd
inside a folder that has files and folders in it.- Run
snow snowpark package create -y sqlfluff
(or whatever package) - Look inside the zip file that has been created: if you see a bunch of files and folders that are not part of the package you are trying to create, you have reproduced the problem.
sfc-gh-jsikorski commented
Hi, thanks for reporting. We have worked out a fix- it will be included in the next version.
maxa-samuel-whittom commented
@sfc-gh-jsikorski
That's great, thank you for the quick feedback!