snowflakedb/snowflake-cli

SNOW-1243569: snow build --project flag broken

Closed this issue · 0 comments

SnowCLI version

2.1.0

Python version

3.11.7

Platform

macOS-10.16-x86_64-i386-64bit

What happened

I have a directory structure which is somewhat a monorepo.
It has a LangSmith project and a snowpark project in the same directory:

-/Harmony # root
--/harmony_snowpark/ # snowpark project I want to build and deploy
---/harmony_package/ 
---/snowflake.yml.        
--/harmony_agent/ # langchain project

if I am in the snowpark project directory and run build and deploy, it works perfectly:

# works perfectly!
cd harmony_snowpark
snow build
snow deploy

but if I try to run it from the project root directory (not snowpark project root), specifying the path with the project flag, it creates an empty zip file at the project root:

snow build --project=harmony_snowpark

Screenshot 2024-03-17 at 00 14 39

i've tried different variations of paths, and they all generate an empty zip.

Console output

Build done. Artifact path: ~/harmony/harmony_package.zip

How to reproduce

  1. create a new directory
  2. navigate into new directory
  3. initialize a new snowpark project
  4. build the project from the root directory using the --project flag
mkdir snowpark_bug
cd snowpark_bug 
snow snowpark init
snow snowpark build --project example_snowpark

Trying to open the zip file should result in the same "zip is empty or unreadable" error:

Screenshot 2024-03-17 at 00 18 38