-
Notifications
You must be signed in to change notification settings - Fork 23
SNOW-2339275: update version to 1.17.0 #243
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
Draft
sfc-gh-heshah
wants to merge
10
commits into
main
Choose a base branch
from
v1.17.x_main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
dfa6afb
SNOW-2339275: update version to 1.17.0
sfc-gh-heshah 09f2fef
SNOW-2246194 Add support for `functions.concat_ws_ignore_nulls` and `…
sfc-gh-fgonzalezmendez 36734fd
SNOW-2246196 | SNOW-2245985 Adding support for 'when' and 'otherwise…
sfc-gh-jvenegasvega-1 d38b67d
SNOW-2246205 Add support for DataFrame.show with truncate parameter (…
sfc-gh-jvenegasvega-1 58919ec
SNOW-2339275: fix FIPS tests (#244)
sfc-gh-heshah 46fe0de
Fix deploy-fips.sh
sfc-gh-bli 003d57c
SNOW-2343819: consolidate common deploy functionality, generate sha25…
sfc-gh-heshah e0a9859
SNOW-2346738: resolve sonaUpload validation failure caused by fat tes…
sfc-gh-heshah 005e06c
SNOW-2346738: resolve sonaUpload validation failure caused by missing…
sfc-gh-heshah 25eafc3
NOSNOW: fix docs generation (#252)
sfc-gh-heshah File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,130 @@ | ||||||||||
| #!/bin/bash -ex | ||||||||||
| # | ||||||||||
| # DO NOT RUN DIRECTLY. | ||||||||||
| # Script must be sourced by deploy.sh or deploy-fips.sh | ||||||||||
| # after setting or unsetting `SNOWPARK_FIPS` environment variable. | ||||||||||
| # | ||||||||||
|
|
||||||||||
| if [ -z "$GPG_KEY_ID" ]; then | ||||||||||
| export GPG_KEY_ID="Snowflake Computing" | ||||||||||
| echo "[WARN] GPG key ID not specified, using default: $GPG_KEY_ID." | ||||||||||
| fi | ||||||||||
|
|
||||||||||
| if [ -z "$GPG_KEY_PASSPHRASE" ]; then | ||||||||||
| echo "[ERROR] GPG passphrase is not specified for $GPG_KEY_ID!" | ||||||||||
| exit 1 | ||||||||||
| fi | ||||||||||
|
|
||||||||||
| if [ -z "$GPG_PRIVATE_KEY" ]; then | ||||||||||
| echo "[ERROR] GPG private key file is not specified!" | ||||||||||
| exit 1 | ||||||||||
| fi | ||||||||||
|
|
||||||||||
| if [ -z "$sonatype_user" ]; then | ||||||||||
| echo "[ERROR] Jenkins sonatype user is not specified!" | ||||||||||
| exit 1 | ||||||||||
| fi | ||||||||||
|
|
||||||||||
| if [ -z "$sonatype_password" ]; then | ||||||||||
| echo "[ERROR] Jenkins sonatype pwd is not specified!" | ||||||||||
| exit 1 | ||||||||||
| fi | ||||||||||
|
|
||||||||||
| if [ -z "$PUBLISH" ]; then | ||||||||||
| echo "[ERROR] 'PUBLISH' is not specified!" | ||||||||||
| exit 1 | ||||||||||
| fi | ||||||||||
|
|
||||||||||
| if [ -z "$github_version_tag" ]; then | ||||||||||
| echo "[ERROR] 'github_version_tag' is not specified!" | ||||||||||
| exit 1 | ||||||||||
| fi | ||||||||||
|
|
||||||||||
| mkdir -p ~/.ivy2 | ||||||||||
|
|
||||||||||
| STR=$'host=central.sonatype.com | ||||||||||
| user='$sonatype_user' | ||||||||||
| password='$sonatype_password'' | ||||||||||
|
|
||||||||||
| echo "$STR" > ~/.ivy2/.credentials | ||||||||||
|
|
||||||||||
| # import private key first | ||||||||||
| echo "[INFO] Importing PGP key." | ||||||||||
| if [ ! -z "$GPG_PRIVATE_KEY" ] && [ -f "$GPG_PRIVATE_KEY" ]; then | ||||||||||
| # First check if already imported private key | ||||||||||
| if ! gpg --list-secret-key | grep "$GPG_KEY_ID"; then | ||||||||||
| gpg --allow-secret-key-import --import "$GPG_PRIVATE_KEY" | ||||||||||
| fi | ||||||||||
| fi | ||||||||||
|
|
||||||||||
| which sbt | ||||||||||
| if [ $? -ne 0 ] | ||||||||||
| then | ||||||||||
| pushd .. | ||||||||||
| echo "[INFO] sbt is not installed, downloading latest sbt for test and build." | ||||||||||
| curl -L -o sbt-1.11.4.zip https://github.com/sbt/sbt/releases/download/v1.11.4/sbt-1.11.4.zip | ||||||||||
| unzip sbt-1.11.4.zip | ||||||||||
| PATH=$PWD/sbt/bin:$PATH | ||||||||||
| popd | ||||||||||
| else | ||||||||||
| echo "[INFO] Using system installed sbt." | ||||||||||
| fi | ||||||||||
| which sbt | ||||||||||
| sbt version | ||||||||||
|
|
||||||||||
| echo "[INFO] Checking out snowpark-java-scala @ tag: $github_version_tag." | ||||||||||
| git checkout $github_version_tag | ||||||||||
|
|
||||||||||
| if [ "$PUBLISH" = true ]; then | ||||||||||
| if [ "$SNOWPARK_FIPS" = true ]; then | ||||||||||
| echo "[INFO] Packaging snowpark-fips @ tag: $github_version_tag." | ||||||||||
| else | ||||||||||
| echo "[INFO] Packaging snowpark @ tag: $github_version_tag." | ||||||||||
| fi | ||||||||||
| sbt +publishSigned | ||||||||||
| echo "[INFO] Staged packaged artifacts locally with PGP signing." | ||||||||||
| sbt sonaUpload | ||||||||||
| echo "[SUCCESS] Uploaded artifacts to central portal." | ||||||||||
| echo "[ACTION-REQUIRED] Please log in to Central Portal to publish artifacts: https://central.sonatype.com/" | ||||||||||
| # TODO: alternatively automate publishing fully | ||||||||||
| # sbt sonaRelease | ||||||||||
| # echo "[SUCCESS] Released Snowpark Java-Scala $github_version_tag to Maven." | ||||||||||
| else | ||||||||||
| #release to s3 | ||||||||||
| echo "[INFO] Staging signed artifacts to local ivy2 repository." | ||||||||||
| rm -rf ~/.ivy2/local/ | ||||||||||
| sbt +publishLocalSigned | ||||||||||
|
|
||||||||||
| # SBT will build FIPS version of Snowpark automatically if the environment variable exists. | ||||||||||
| if [ "$SNOWPARK_FIPS" = true ]; then | ||||||||||
| S3_JENKINS_URL="s3://sfc-eng-jenkins/repository/snowparkclient-fips/$github_version_tag/" | ||||||||||
| S3_DATA_URL="s3://sfc-eng-data/client/snowparkclient-fips/releases/$github_version_tag/" | ||||||||||
| echo "[INFO] Uploading snowpark-fips artifacts to:" | ||||||||||
| else | ||||||||||
| S3_JENKINS_URL="s3://sfc-eng-jenkins/repository/snowparkclient/$github_version_tag/" | ||||||||||
| S3_DATA_URL="s3://sfc-eng-data/client/snowparkclient/releases/$github_version_tag/" | ||||||||||
| echo "[INFO] Uploading snowpark artifacts to:" | ||||||||||
| fi | ||||||||||
| echo "[INFO] - $S3_JENKINS_URL" | ||||||||||
| echo "[INFO] - $S3_DATA_URL" | ||||||||||
|
|
||||||||||
| # Remove release folders in s3 for current release version if they already exist due to previously failed release pipeline runs. | ||||||||||
| echo "[INFO] Deleting $github_version_tag release folders in s3 if they already exist." | ||||||||||
| aws s3 rm "$S3_JENKINS_URL" --recursive | ||||||||||
| echo "[INFO] $S3_JENKINS_URL folder deleted if it exists." | ||||||||||
| aws s3 rm "$S3_DATA_URL" --recursive | ||||||||||
| echo "[INFO] $S3_DATA_URL folder deleted if it exists." | ||||||||||
|
|
||||||||||
| # Rename all produced artifacts to include version number (sbt doesn't by default when publishing to local ivy2 repository). | ||||||||||
| # TODO: BEFORE SNOWPARK v2.12.0, fix the regex in the sed command to not match the 2.12.x or 2.13.x named folder under ~/.ivy2/local/com.snowflake/snowpark_2.1[23]/ | ||||||||||
| find ~/.ivy2/local -type f -name '*snowpark*' | while read file; do newfile=$(echo "$file" | sed "s/\(2\.1[23]\)\([-\.]\)/\1-${github_version_tag#v}\2/"); mv "$file" "$newfile"; done | ||||||||||
|
Comment on lines
+119
to
+120
|
||||||||||
| # TODO: BEFORE SNOWPARK v2.12.0, fix the regex in the sed command to not match the 2.12.x or 2.13.x named folder under ~/.ivy2/local/com.snowflake/snowpark_2.1[23]/ | |
| find ~/.ivy2/local -type f -name '*snowpark*' | while read file; do newfile=$(echo "$file" | sed "s/\(2\.1[23]\)\([-\.]\)/\1-${github_version_tag#v}\2/"); mv "$file" "$newfile"; done | |
| # Updated: Regex now matches any Scala 2.x version (e.g., 2.12, 2.13, 2.14, ...). | |
| find ~/.ivy2/local -type f -name '*snowpark*' | while read file; do newfile=$(echo "$file" | sed -E "s/(2\.[0-9]+)([-\.])/\1-${github_version_tag#v}\2/"); mv "$file" "$newfile"; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| #!/bin/bash -ex | ||
| # | ||
| # Push Snowpark Java/Scala FIPS build to the public maven repository. | ||
| # This script needs to be executed by snowflake jenkins job. | ||
| # | ||
|
|
||
| export SNOWPARK_FIPS="true" | ||
| source scripts/deploy-common.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,121 +1,8 @@ | ||
| #!/bin/bash -ex | ||
| # | ||
| # Push Snowpark Java/Scala to the public maven repository. | ||
| # Push Snowpark Java/Scala build to the public maven repository. | ||
| # This script needs to be executed by snowflake jenkins job. | ||
| # If the SNOWPARK_FIPS environment variable exists when running | ||
| # the script, the fips build of the snowpark client will be | ||
| # published instead of the regular build. | ||
| # | ||
|
|
||
| if [ -z "$GPG_KEY_ID" ]; then | ||
| export GPG_KEY_ID="Snowflake Computing" | ||
| echo "[WARN] GPG key ID not specified, using default: $GPG_KEY_ID." | ||
| fi | ||
|
|
||
| if [ -z "$GPG_KEY_PASSPHRASE" ]; then | ||
| echo "[ERROR] GPG passphrase is not specified for $GPG_KEY_ID!" | ||
| exit 1 | ||
| fi | ||
|
|
||
| if [ -z "$GPG_PRIVATE_KEY" ]; then | ||
| echo "[ERROR] GPG private key file is not specified!" | ||
| exit 1 | ||
| fi | ||
|
|
||
| if [ -z "$sonatype_user" ]; then | ||
| echo "[ERROR] Jenkins sonatype user is not specified!" | ||
| exit 1 | ||
| fi | ||
|
|
||
| if [ -z "$sonatype_password" ]; then | ||
| echo "[ERROR] Jenkins sonatype pwd is not specified!" | ||
| exit 1 | ||
| fi | ||
|
|
||
| if [ -z "$PUBLISH" ]; then | ||
| echo "[ERROR] 'PUBLISH' is not specified!" | ||
| exit 1 | ||
| fi | ||
|
|
||
| if [ -z "$github_version_tag" ]; then | ||
| echo "[ERROR] 'github_version_tag' is not specified!" | ||
| exit 1 | ||
| fi | ||
|
|
||
| mkdir -p ~/.ivy2 | ||
|
|
||
| STR=$'host=central.sonatype.com | ||
| user='$sonatype_user' | ||
| password='$sonatype_password'' | ||
|
|
||
| echo "$STR" > ~/.ivy2/.credentials | ||
|
|
||
| # import private key first | ||
| echo "[INFO] Importing PGP key." | ||
| if [ ! -z "$GPG_PRIVATE_KEY" ] && [ -f "$GPG_PRIVATE_KEY" ]; then | ||
| # First check if already imported private key | ||
| if ! gpg --list-secret-key | grep "$GPG_KEY_ID"; then | ||
| gpg --allow-secret-key-import --import "$GPG_PRIVATE_KEY" | ||
| fi | ||
| fi | ||
|
|
||
| which sbt | ||
| if [ $? -ne 0 ] | ||
| then | ||
| pushd .. | ||
| echo "[INFO] sbt is not installed, downloading latest sbt for test and build." | ||
| curl -L -o sbt-1.11.4.zip https://github.com/sbt/sbt/releases/download/v1.11.4/sbt-1.11.4.zip | ||
| unzip sbt-1.11.4.zip | ||
| PATH=$PWD/sbt/bin:$PATH | ||
| popd | ||
| else | ||
| echo "[INFO] Using system installed sbt." | ||
| fi | ||
| which sbt | ||
| sbt version | ||
|
|
||
| echo "[INFO] Checking out snowpark-java-scala @ tag: $github_version_tag." | ||
| git checkout tags/$github_version_tag | ||
|
|
||
| if [ "$PUBLISH" = true ]; then | ||
| if [ -v SNOWPARK_FIPS ]; then | ||
| echo "[INFO] Packaging snowpark-fips @ tag: $github_version_tag." | ||
| else | ||
| echo "[INFO] Packaging snowpark @ tag: $github_version_tag." | ||
| fi | ||
| sbt +publishSigned | ||
| echo "[INFO] Staged packaged artifacts locally with PGP signing." | ||
| sbt sonaUpload | ||
| echo "[SUCCESS] Uploaded artifacts to central portal." | ||
| echo "[ACTION-REQUIRED] Please log in to Central Portal to publish artifacts: https://central.sonatype.com/" | ||
| # TODO: alternatively automate publishing fully | ||
| # sbt sonaRelease | ||
| # echo "[SUCCESS] Released Snowpark Java-Scala v$github_version_tag to Maven." | ||
| else | ||
| #release to s3 | ||
| echo "[INFO] Staging signed artifacts to local ivy2 repository." | ||
| rm -rf ~/.ivy2/local/ | ||
| sbt +publishLocalSigned | ||
|
|
||
| # SBT will build FIPS version of Snowpark automatically if the environment variable exists. | ||
| if [ -v SNOWPARK_FIPS ]; then | ||
| S3_JENKINS_URL="s3://sfc-eng-jenkins/repository/snowparkclient-fips" | ||
| S3_DATA_URL="s3://sfc-eng-data/client/snowparkclient-fips/releases" | ||
| echo "[INFO] Uploading snowpark-fips artifacts to:" | ||
| else | ||
| S3_JENKINS_URL="s3://sfc-eng-jenkins/repository/snowparkclient" | ||
| S3_DATA_URL="s3://sfc-eng-data/client/snowparkclient/releases" | ||
| echo "[INFO] Uploading snowpark artifacts to:" | ||
| fi | ||
| echo "[INFO] - $S3_JENKINS_URL/$github_version_tag/" | ||
| echo "[INFO] - $S3_DATA_URL/$github_version_tag/" | ||
|
|
||
| # Rename all produced artifacts to include version number (sbt doesn't by default when publishing to local ivy2 repository). | ||
| find ~/.ivy2/local -type f -name "*snowpark*" | while read file; do newfile=$(echo "$file" | sed "s/\(2\.1[23]\)\([-\.]\)/\1-${github_version_tag#v}\2/"); mv "$file" "$newfile"; done | ||
|
|
||
| # Copy all files, flattening the nested structure of the ivy2 repository into the expected structure on s3. | ||
| find ~/.ivy2/local -type f -name "*snowpark*" -exec aws s3 cp \{\} $S3_JENKINS_URL/$github_version_tag/ \; | ||
| find ~/.ivy2/local -type f -name "*snowpark*" -exec aws s3 cp \{\} $S3_DATA_URL/$github_version_tag/ \; | ||
|
|
||
| echo "[SUCCESS] Published Snowpark Java-Scala v$github_version_tag artifacts to S3." | ||
| fi | ||
| unset SNOWPARK_FIPS | ||
| source scripts/deploy-common.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The git checkout command should use 'tags/' prefix for consistency with the original implementation and to be explicit about checking out a tag rather than a branch:
git checkout tags/$github_version_tag