Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
15d2e76
Update release notes for 3.7.0
sfc-gh-pczajka Apr 10, 2025
9692a04
Bump version to v3.7.0-rc0 (#2193)
sfc-gh-pczajka Apr 10, 2025
e3ab63f
Cherrypicks v3.7.0 rc1 (#2205)
sfc-gh-pczajka Apr 15, 2025
e4bc8de
Cherrypicks v3.7.0 (#2208)
sfc-gh-pczajka Apr 16, 2025
c39ed5e
Cherry picks to 3.7.1 (#2221)
sfc-gh-pczajka Apr 28, 2025
6f4fe4c
Bump version to v3.7.2
sfc-gh-pczajka May 12, 2025
f03b9bc
bump snowflake-connector-python to 3.15
sfc-gh-pczajka May 12, 2025
07b0553
Remove certifi depencency (#2238)
sfc-gh-pczajka May 5, 2025
a3f3f67
fix error showing for --help messages (#2272)
sfc-gh-pczajka May 12, 2025
c58c33a
update release notes
sfc-gh-pczajka May 12, 2025
65a2058
Bump release notes 3.7.0 (#2192)
sfc-gh-pczajka Apr 10, 2025
2a9244f
Bump pydantic from 2.11.2 to 2.11.3 (#2200)
dependabot[bot] Apr 15, 2025
8f89372
Bump pytest-httpserver from 1.1.2 to 1.1.3 (#2199)
dependabot[bot] Apr 15, 2025
c65bdbd
Update urllib3 requirement from <2.4,>=1.24.3 to >=1.24.3,<2.5 (#2198)
dependabot[bot] Apr 15, 2025
5798b1b
Bump snowflake-core from 1.2.0 to 1.3.0 (#2201)
dependabot[bot] Apr 15, 2025
49d7dc0
feat: [SNOW-1890085] add dbt command group; add dbt list command
sfc-gh-jwilkowski Feb 13, 2025
9b07ee1
feat: [SNOW-1890085] add dbt execute command
sfc-gh-jwilkowski Feb 14, 2025
e07938f
refactor: [SNOW-1890085] reimplement dbt execute as pass-through comm…
sfc-gh-jwilkowski Feb 18, 2025
8d3a27e
feat: [SNOW-1890085] implement dbt deploy command
sfc-gh-jwilkowski Feb 20, 2025
6a45274
feat: [SNOW-1890085] implement StdoutExecutionMixin for demo purposes
sfc-gh-jwilkowski Feb 21, 2025
4f83a28
fix: [SNOW-1890085] rename sql object DBT -> DBT PROJECT
sfc-gh-jwilkowski Feb 25, 2025
500bac5
feat: [SNOW-1890085] dbt deploy: add support for dbt-version flag
sfc-gh-jwilkowski Feb 25, 2025
fdd33e8
feat: [SNOW-1890085] dbt deploy: add support for dbt-adapter-version …
sfc-gh-jwilkowski Feb 25, 2025
560822b
feat: [SNOW-1890085] dbt deploy: provide main file param
sfc-gh-jwilkowski Feb 25, 2025
202f379
feat: [SNOW-1890085] dbt deploy: use --force to create or replace
sfc-gh-jwilkowski Feb 26, 2025
db1b4d1
feat: [SNOW-1890085] dbt deploy: add execute_in_warehouse flag
sfc-gh-jwilkowski Feb 26, 2025
28b5424
refactor: [SNOW-1890085] hide dbt app behind feature flag
sfc-gh-jwilkowski Feb 27, 2025
09d8b5e
feat: [SNOW-1966187] update commands according to backend implementation
sfc-gh-jwilkowski Mar 10, 2025
9fb7e87
feat: [SNOW-1966187] remove StdoutExecutionMixin
sfc-gh-jwilkowski Mar 12, 2025
c14b07b
feat: [SNOW-1890085] update command help texts
sfc-gh-jwilkowski Mar 17, 2025
3ebaf8c
feat: [SNOW-1890085] add run_async option
sfc-gh-jwilkowski Mar 17, 2025
5bf8f22
feat: [SNOW-1890085] use SecurePath
sfc-gh-jwilkowski Mar 17, 2025
9d041a1
feat: [SNOW-1890085] check if dbt project exists before deploying
sfc-gh-jwilkowski Mar 17, 2025
6d620c7
refactor: [SNOW-1890085] use object plugin for listing dbt projects
sfc-gh-jwilkowski Mar 17, 2025
cf5a477
refactor: [SNOW-1890085] set dbt execute subcommand metavar
sfc-gh-jwilkowski Mar 17, 2025
2926a17
feat: [SNOW-1890085] remove execute_in_warehouse option
sfc-gh-jwilkowski Mar 18, 2025
6071c84
feat: [SNOW-1890085] add spinner to dbt execute
sfc-gh-jwilkowski Mar 18, 2025
0a6f0d1
feat: [SNOW-1890085] limit supported dbt commands
sfc-gh-jwilkowski Mar 24, 2025
c8ecab7
feat: [SNOW-1890085] remove options for dbt_version and dbt_adapter_v…
sfc-gh-jwilkowski Mar 24, 2025
0af447c
fix: [SNOW-1890085] restore lost changes during rebasing
sfc-gh-jwilkowski Mar 24, 2025
6395937
test: [SNOW-1890085] unlock dbt help snapshots
sfc-gh-jwilkowski Mar 24, 2025
6ad78b5
chore: [SNOW-1890085] cleanup
sfc-gh-jwilkowski Mar 24, 2025
f7b09f2
test: [SNOW-1890085] add integration test for simple dbt workflow
sfc-gh-jwilkowski Mar 24, 2025
382855a
chore: [SNOW-1890085] rename feature flag
sfc-gh-jwilkowski Mar 25, 2025
3bc96c1
refactor: [SNOW-1890085] post code review fixes
sfc-gh-jwilkowski Mar 26, 2025
b58a86d
feat: [SNOW-1890085] wip: capture success code from server
sfc-gh-jwilkowski Apr 1, 2025
86dcf64
feat: [SNOW-1890085] process data from server
sfc-gh-jwilkowski Apr 2, 2025
57de90d
feat: [SNOW-1890085] custom version for dbt branch
sfc-gh-jwilkowski Apr 4, 2025
a928c36
chore: [SNOW-1890085] update snapshots
sfc-gh-jwilkowski Apr 10, 2025
af36b8a
Jw/snow 2036324 include dbt profile (#2196)
sfc-gh-jwilkowski Apr 11, 2025
ef916e6
Jw/snow 2045471 add flag for selecting profile directory (#2210)
sfc-gh-jwilkowski Apr 17, 2025
2f1a7c4
feat: [SNOW-2048251] enable dbt run-operation (#2261)
sfc-gh-jwilkowski May 13, 2025
fc3f4d2
feat: [SNOW-2102782] support threads in profiles.yaml (#2291)
sfc-gh-jwilkowski May 14, 2025
9df0c65
feat: [SNOW-2103792] support altering existing dbt objects in deploy …
sfc-gh-jwilkowski May 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/test_integration_spcs.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: SPCS Integration testing

on:
pull_request:
branches:
- release*
push:
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
Expand Down
30 changes: 30 additions & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,43 @@

## Deprecations

## New additions

## Fixes and improvements


# v3.7.2

## Deprecations

## New additions

## Fixes and improvements
* Fix error appearing on help messages after click BCR update.


# v3.7.1

## Deprecations

## New additions

## Fixes and improvements
* Fix certificate connection issues.
* Fix `snow spcs image-registry login` slow query problem.

# v3.7.0

## Deprecations

## New additions
* Added `--prune` flag to `deploy` commands, which removes files that exist in the stage,
but not in the local filesystem.
* Added `snow logs` command for retrieving and streaming logs from the server.
* Added `snow helper check-snowsql-env-vars` which reports environment variables from SnowSQL with replacements in CLI.

## Fixes and improvements
* Updated MacOS postinstall script to update PATH if snow not exist.


# v3.6.0
Expand Down
12 changes: 6 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,24 @@ requires-python = ">=3.10"
description = "Snowflake CLI"
readme = "README.md"
dependencies = [
"click==8.1.8",
"GitPython==3.1.44",
"jinja2==3.1.6",
"packaging",
"pip",
"pluggy==1.5.0",
"pydantic==2.11.2",
"pydantic==2.11.3",
"PyYAML==6.0.2",
"requests==2.32.3",
"requirements-parser==0.11.0",
"rich==14.0.0",
"setuptools==78.1.0",
"snowflake-connector-python[secure-local-storage]==3.14.0",
"snowflake-connector-python[secure-local-storage]==3.15.0",
'snowflake-snowpark-python>=1.15.0,<1.26.0;python_version < "3.12"',
'snowflake.core==1.2.0; python_version < "3.12"',
'snowflake.core==1.3.0; python_version < "3.12"',
"tomlkit==0.13.2",
"typer==0.15.2",
"urllib3>=1.24.3,<2.4",
"urllib3>=1.24.3,<2.5",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
Expand All @@ -61,7 +62,7 @@ development = [
"pre-commit>=3.5.0",
"pytest==8.3.5",
"pytest-randomly==3.16.0",
"pytest-httpserver==1.1.2",
"pytest-httpserver==1.1.3",
"syrupy==4.9.1",
"factory-boy==3.3.3",
"Faker==37.1.0",
Expand Down Expand Up @@ -108,7 +109,6 @@ features = ["development", "packaging"]
build-isolated-binary = ["python scripts/packaging/build_isolated_binary_with_hatch.py"]
build-binaries = ["./scripts/packaging/build_binaries.sh"]
build-packages = ["./scripts/packaging/build_packages.sh"]
package-darwin-binaries = ["./scripts/packaging/build_darwin_package.sh"]
build-all = [
"./scripts/packaging/build_binaries.sh",
"./scripts/packaging/build_packages.sh",
Expand Down
69 changes: 40 additions & 29 deletions scripts/packaging/build_darwin_package.sh
Original file line number Diff line number Diff line change
@@ -1,26 +1,52 @@
#!/usr/bin/env bash
set -xeuo pipefail

git config --global --add safe.directory /snowflake-cli
brew install -q tree

ROOT_DIR=$(git rev-parse --show-toplevel)
PACKAGING_DIR=$ROOT_DIR/scripts/packaging

SYSTEM=$(uname -s | tr '[:upper:]' '[:lower:]')
MACHINE=$(uname -m | tr '[:upper:]' '[:lower:]')
PLATFORM="${SYSTEM}-${MACHINE}"

echo "--- creating virtualenv ---"
python3.11 -m venv venv
. venv/bin/activate
python --version

echo "--- installing dependencies ---"
pip install hatch

# install cargo
if [[ ${MACHINE} == "arm64" ]]; then
echo "installing cargo on arm64"
curl https://sh.rustup.rs -sSf | bash -s -- -y
elif [[ ${MACHINE} == "x86_64" ]]; then
echo "installing cargo on x86_64"
curl https://sh.rustup.rs -sSf | bash -s -- -y --no-modify-path
source $HOME/.cargo/env
else
echo "Unsupported machine: ${MACHINE}"
exit 1
fi
rustup default stable


echo "--- setup variables ---"
BRANCH=${branch}
REVISION=$(git rev-parse ${svnRevision})
CLI_VERSION=$(hatch version)

STAGE_URL="s3://sfc-eng-jenkins/repository/snowflake-cli/${releaseType}/${SYSTEM}_${MACHINE}/${REVISION}/"

ROOT_DIR=$(git rev-parse --show-toplevel)
PACKAGING_DIR=$ROOT_DIR/scripts/packaging
DIST_DIR=$ROOT_DIR/dist

BINARY_NAME="snow-${CLI_VERSION}"
APP_NAME="SnowflakeCLI.app"
APP_DIR=$DIST_DIR/app
APP_SCRIPTS=$APP_DIR/scripts
CODESIGN_IDENTITY="Developer ID Application: Snowflake Computing INC. (W4NT6CRQ7U)"
PRODUCTSIGN_IDENTITY="Developer ID Installer: Snowflake Computing INC. (W4NT6CRQ7U)"


loginfo() {
logger -s -p INFO -- $1
}
Expand All @@ -29,26 +55,6 @@ clean_build_workspace() {
rm -rf $DIST_DIR || true
}

install_cargo() {
curl https://sh.rustup.rs -sSf > rustup-init.sh

if [[ ${MACHINE} == "arm64" ]]; then
sudo bash rustup-init.sh -y
. $HOME/.cargo/env
elif [[ ${MACHINE} == "x86_64" ]]; then
export CARGO_HOME="$HOME/.cargo"
export RUSTUP_HOME="$HOME/.rustup"
bash -s rustup-init.sh -y
. $HOME/.cargo/env
rustup default stable
else
echo "Unsupported machine: ${MACHINE}"
exit 1
fi

rm rustup-init.sh
}

create_app_template() {
rm -r ${APP_DIR}/${APP_NAME} || true
mkdir -p ${APP_DIR}/${APP_NAME}/Contents/MacOS
Expand All @@ -61,9 +67,9 @@ loginfo "---------------------------------"
security find-identity -v -p codesigning
loginfo "---------------------------------"

clean_build_workspace
install_cargo
echo "--- build binary ---"

clean_build_workspace
hatch -e packaging run build-isolated-binary
create_app_template
mv $DIST_DIR/binary/${BINARY_NAME} ${APP_DIR}/${APP_NAME}/Contents/MacOS/snow
Expand Down Expand Up @@ -118,7 +124,6 @@ prepare_postinstall_script() {
prepare_postinstall_script

ls -l $DIST_DIR
tree -d $DIST_DIR

chmod +x $APP_SCRIPTS/postinstall

Expand Down Expand Up @@ -209,3 +214,9 @@ validate_installation() {
}

validate_installation $DIST_DIR/snowflake-cli-${CLI_VERSION}-${SYSTEM}-${MACHINE}.pkg

echo "--- Upload artifacts to AWS ---"
ls -la ./dist/
echo "${STAGE_URL}"
command -v aws
aws s3 cp ./dist/ ${STAGE_URL} --recursive --exclude "*" --include="snowflake-cli-${CLI_VERSION}*.pkg"
31 changes: 17 additions & 14 deletions scripts/packaging/macos/postinstall
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# $2 is the install location
#
SNOWFLAKE_CLI_COMMENT="# added by Snowflake SnowflakeCLI installer v1.0"
RC_FILES=(~/.zprofile ~/.zshrc ~/.profile ~/.bash_profile ~/.bashrc)

function add_dest_path_to_profile() {
local dest=$1
Expand All @@ -18,19 +19,21 @@ export PATH=$dest:\$PATH" >>$profile
echo "[DEBUG] Parameters: $1 $2"
SNOWFLAKE_CLI_DEST=$2/SnowflakeCLI.app/Contents/MacOS/

SNOWFLAKE_CLI_LOGIN_SHELL=~/.profile
if [[ -e ~/.zprofile ]]; then
SNOWFLAKE_CLI_LOGIN_SHELL=~/.zprofile
elif [[ -e ~/.zshrc ]]; then
SNOWFLAKE_CLI_LOGIN_SHELL=~/.zshrc
elif [[ -e ~/.profile ]]; then
SNOWFLAKE_CLI_LOGIN_SHELL=~/.profile
elif [[ -e ~/.bash_profile ]]; then
SNOWFLAKE_CLI_LOGIN_SHELL=~/.bash_profile
elif [[ -e ~/.bashrc ]]; then
SNOWFLAKE_CLI_LOGIN_SHELL=~/.bashrc
fi
# List of potential login shell RC files

# Check if the path is already in the PATH variable
if [[ ":$PATH:" == *":$SNOWFLAKE_CLI_DEST:"* ]]; then
echo "[INFO] Path $SNOWFLAKE_CLI_DEST is already in PATH. No changes needed."
else
for rc_file in "${RC_FILES[@]}"; do
# Expand tilde (~) to the user's home directory
rc_file_expanded=$(eval echo "$rc_file")

if ! grep -q -E "^$SNOWFLAKE_CLI_COMMENT" $SNOWFLAKE_CLI_LOGIN_SHELL; then
add_dest_path_to_profile $SNOWFLAKE_CLI_DEST $SNOWFLAKE_CLI_LOGIN_SHELL
if [[ -e "$rc_file_expanded" ]]; then
# Add the PATH update to the file
add_dest_path_to_profile "$SNOWFLAKE_CLI_DEST" "$rc_file_expanded"
else
echo "[INFO] $rc_file_expanded does not exist, skipping..."
fi
done
fi
39 changes: 0 additions & 39 deletions scripts/packaging/setup_darwin.sh

This file was deleted.

11 changes: 6 additions & 5 deletions snyk/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
click==8.1.8
GitPython==3.1.44
jinja2==3.1.6
packaging
pip
pluggy==1.5.0
pydantic==2.11.2
pydantic==2.11.3
PyYAML==6.0.2
requests==2.32.3
requirements-parser==0.11.0
rich==14.0.0
setuptools==78.1.0
snowflake-connector-python[secure-local-storage]==3.14.0
snowflake-connector-python[secure-local-storage]==3.15.0
snowflake-snowpark-python>=1.15.0,<1.26.0;python_version < "3.12"
snowflake.core==1.2.0; python_version < "3.12"
snowflake.core==1.3.0; python_version < "3.12"
tomlkit==0.13.2
typer==0.15.2
urllib3>=1.24.3,<2.4
urllib3>=1.24.3,<2.5
coverage==7.8.0
pre-commit>=3.5.0
pytest==8.3.5
pytest-randomly==3.16.0
pytest-httpserver==1.1.2
pytest-httpserver==1.1.3
syrupy==4.9.1
factory-boy==3.3.3
Faker==37.1.0
2 changes: 1 addition & 1 deletion src/snowflake/cli/__about__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

from enum import Enum, unique

VERSION = "3.7.0.dev0"
VERSION = "3.8.0.dev+dbt0"


@unique
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from snowflake.cli._plugins.auth.keypair import plugin_spec as auth_plugin_spec
from snowflake.cli._plugins.connection import plugin_spec as connection_plugin_spec
from snowflake.cli._plugins.cortex import plugin_spec as cortex_plugin_spec
from snowflake.cli._plugins.dbt import plugin_spec as dbt_plugin_spec
from snowflake.cli._plugins.git import plugin_spec as git_plugin_spec
from snowflake.cli._plugins.helpers import plugin_spec as migrate_plugin_spec
from snowflake.cli._plugins.init import plugin_spec as init_plugin_spec
Expand Down Expand Up @@ -52,6 +53,7 @@ def get_builtin_plugin_name_to_plugin_spec():
"init": init_plugin_spec,
"workspace": workspace_plugin_spec,
"plugin": plugin_plugin_spec,
"dbt": dbt_plugin_spec,
"logs": logs_plugin_spec,
}

Expand Down
13 changes: 13 additions & 0 deletions src/snowflake/cli/_plugins/dbt/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright (c) 2025 Snowflake Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
Loading