Skip to content
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

SNOW-1639627: snow init Fails With Error #1486

Closed
sfc-gh-cwiese opened this issue Aug 26, 2024 · 3 comments
Closed

SNOW-1639627: snow init Fails With Error #1486

sfc-gh-cwiese opened this issue Aug 26, 2024 · 3 comments

Comments

@sfc-gh-cwiese
Copy link

SnowCLI version

Snowflake CLI version: 2.7.0

Python version

Python 3.11.9

Platform

macOS-14.6.1-arm64-arm-64bit

What happened

snow init foo fails with error Template does not have template.yml file.. snow snowpark init foo succeeds.

Console output

(snow_globe) cwiese@LQ7YYTJ905 snow_globe % snow init foo         
╭─ Error ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Template does not have template.yml file.                                                                                                                                                        │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
(snow_globe) cwiese@LQ7YYTJ905 snow_globe % snow snowpark init foo
DeprecationWarning: The command 'init' is deprecated.
Initialized the new project in foo/

How to reproduce

snow init foo

@github-actions github-actions bot changed the title snow init Fails With Error SNOW-1639627: snow init Fails With Error Aug 26, 2024
@sfc-gh-pczajka
Copy link
Contributor

@sfc-gh-cwiese please use snow init foo --template example_snowpark

@sfc-gh-cwiese
Copy link
Author

@sfc-gh-pczajka that works, however --template is not mentioned as a required option in the --help output:

(snow_globe) cwiese@LQ7YYTJ905 snow_globe % snow init --help
                                                                                                                                                                                                    
 Usage: snow init [OPTIONS] PATH                                                                                                                                                                    
                                                                                                                                                                                                    
 Creates project directory from template.                                                                                                                                                           
                                                                                                                                                                                                    
╭─ Arguments ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ *    path      TEXT  Directory to be initialized with the project. This directory must not already exist [required]                                                                              │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --template                 TEXT  which template (subdirectory of --template-source) should be used. If not provided, whole source will be used as the template.                                  │
│ --template-source          TEXT  local path to template directory or URL to git repository with templates. [default: https://github.com/snowflakedb/snowflake-cli-templates]                     │
│ --variable         -D      TEXT  String in `key=value` format. Provided variables will not be prompted for.                                                                                      │
│ --no-interactive                 Disable prompting.                                                                                                                                              │
│ --help             -h            Show this message and exit.                                                                                                                                     │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Global configuration ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --format           [TABLE|JSON]  Specifies the output format. [default: TABLE]                                                                                                                   │
│ --verbose  -v                    Displays log entries for log levels `info` and higher.                                                                                                          │
│ --debug                          Displays log entries for log levels `debug` and higher; debug logs contains additional information.                                                             │
│ --silent                         Turns off intermediate output to console.                                                                                                                       │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

@sfc-gh-pczajka
Copy link
Contributor

@sfc-gh-cwiese yes, that's because there are use cases where all repository (passed via --template-source) might be a single template - we had to leave it optional

We'll release more actionable error message in 2.8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants