Skip to content

Commit d2f3fe0

Browse files
Merge branch 'main' into NO-SNOW-wiremock-tests-cleanup
2 parents 01dd790 + b8b6a44 commit d2f3fe0

38 files changed

+1314
-57
lines changed

.github/workflows/build_test.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,7 @@ jobs:
447447
junit.py${{ env.shortver }}-lambda-ci-dev.xml
448448
449449
test-aio:
450+
if: false # temporarily disable aio - SNOW-2905263
450451
name: Test asyncio ${{ matrix.os.download_name }}-${{ matrix.python-version }}-${{ matrix.cloud-provider }}
451452
needs: build
452453
runs-on: ${{ matrix.os.image_name }}
@@ -524,7 +525,8 @@ jobs:
524525
.tox/.coverage
525526
.tox/coverage.xml
526527
527-
test-unsupporeted-aio:
528+
test-unsupported-aio:
529+
if: false # temporarily disable aio - SNOW-2905263
528530
name: Test unsupported asyncio ${{ matrix.os.download_name }}-${{ matrix.python-version }}
529531
runs-on: ${{ matrix.os.image_name }}
530532
strategy:
@@ -607,7 +609,9 @@ jobs:
607609
combine-coverage:
608610
if: always()
609611
name: Combine coverage
610-
needs: [lint, test, test-fips, test-lambda, test-aio]
612+
# temporarily disable aio - SNOW-2905263
613+
# needs: [lint, test, test-fips, test-lambda, test-aio]
614+
needs: [lint, test, test-fips, test-lambda]
611615
runs-on: ubuntu-latest
612616
steps:
613617
- uses: actions/checkout@v4
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Check Async Changes
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- '**'
7+
types:
8+
- opened
9+
- synchronize
10+
- reopened
11+
- labeled
12+
- unlabeled
13+
14+
permissions:
15+
contents: read
16+
pull-requests: read
17+
18+
jobs:
19+
check-async-changes:
20+
name: Check for corresponding async changes
21+
runs-on: ubuntu-latest
22+
if: ${{ !contains(github.event.pull_request.labels.*.name, 'NO_ASYNC_CHANGES') }}
23+
steps:
24+
- uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
28+
- name: Check for missing async changes
29+
run: |
30+
# Get the list of changed files
31+
CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD)
32+
echo "Changed files:"
33+
echo "$CHANGED_FILES"
34+
echo ""
35+
36+
FAILED=false
37+
38+
# Define checks: "sync_pattern|async_pattern|sync_label|async_path"
39+
CHECKS=(
40+
"^src/snowflake/connector/|^src/snowflake/connector/aio/|Connector source|src/snowflake/connector/aio/"
41+
"^test/unit/|^test/unit/aio/|Unit tests|test/unit/aio/"
42+
"^test/integ/|^test/integ/aio_it/|Integration tests|test/integ/aio_it/"
43+
"^test/wif/test_wif\.py$|^test/wif/test_wif_async\.py$|WIF tests|test/wif/test_wif_async.py"
44+
)
45+
46+
for CHECK in "${CHECKS[@]}"; do
47+
IFS='|' read -r SYNC_PATTERN ASYNC_PATTERN LABEL ASYNC_PATH <<< "$CHECK"
48+
49+
# Get sync changes (matching sync pattern but NOT async pattern)
50+
SYNC_CHANGES=$(echo "$CHANGED_FILES" | grep -E "$SYNC_PATTERN" | grep -vE "$ASYNC_PATTERN" || true)
51+
ASYNC_CHANGES=$(echo "$CHANGED_FILES" | grep -E "$ASYNC_PATTERN" || true)
52+
53+
if [ -n "$SYNC_CHANGES" ] && [ -z "$ASYNC_CHANGES" ]; then
54+
echo "❌ $LABEL: Changes detected without corresponding changes in $ASYNC_PATH"
55+
echo " Sync changes found:"
56+
echo "$SYNC_CHANGES" | sed 's/^/ /'
57+
echo ""
58+
FAILED=true
59+
else
60+
echo "✅ $LABEL: OK"
61+
fi
62+
done
63+
64+
echo ""
65+
if [ "$FAILED" = "true" ]; then
66+
echo "ℹ️ If async changes are intentionally not needed, add the 'NO_ASYNC_CHANGES' label to this PR."
67+
exit 1
68+
fi
69+
70+
echo "🎉 All async change checks passed!"

.github/workflows/check_installation.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ jobs:
5656
rm -rf test_no_boto_env
5757
5858
test-installation-aioboto:
59+
if: false # temporarily disable aio - SNOW-2905263
5960
name: Test aioboto dependency
6061
runs-on: ubuntu-latest
6162
steps:

DESCRIPTION.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ https://docs.snowflake.com/
77
Source code is also available at: https://github.com/snowflakedb/snowflake-connector-python
88

99
# Release Notes
10-
- v4.2.0(TBD)
11-
- Added support for async I/O. Asynchronous version of connector is available via `snowflake.connector.aio` module.
10+
- v4.2.0(December 17,2025)
1211
- Added `SnowflakeCursor.stats` property to expose granular DML statistics (rows inserted, deleted, updated, and duplicates) for operations like CTAS where `rowcount` is insufficient.
1312
- Added support for injecting SPCS service identifier token (`SPCS_TOKEN`) into login requests when present in SPCS containers.
13+
- Introduced shared library for extended telemetry to identify and prepare testing platform for native rust extensions.
1414

15-
- v4.1.1(TBD)
15+
- v4.1.1(December 12,2025)
1616
- Relaxed pandas dependency requirements for Python below 3.12.
1717
- Changed CRL cache cleanup background task to daemon to avoid blocking main thread.
1818
- Fixed NO_PROXY issues with PUT operations

MANIFEST.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ exclude src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow_arrow_iter
1313
exclude src/snowflake/connector/nanoarrow_cpp/scripts/.clang-format
1414
exclude src/snowflake/connector/nanoarrow_cpp/scripts/format.sh
1515

16+
include src/snowflake/connector/minicore __init__.py
17+
recursive-include src/snowflake/connector/minicore *.so *.dll *.dylib *.a *.h *.lib
18+
1619
exclude .git-blame-ignore-revs
1720
exclude .pre-commit-config.yaml
1821
exclude license_header.txt

ci/build_linux.sh

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# NOTES:
55
# - This is designed to ONLY be called in our build docker image
66
# - To compile only a specific version(s) pass in versions like: `./build_linux.sh "3.9 3.10"`
7-
set -o pipefail
7+
set -ox pipefail
88

99
U_WIDTH=16
1010
PYTHON_VERSIONS="${1:-3.9 3.10 3.11 3.12 3.13}"
@@ -21,6 +21,39 @@ if [ -d "${DIST_DIR}" ]; then
2121
fi
2222
mkdir -p ${REPAIRED_DIR}
2323

24+
# Clean up unnecessary minicore directories for the current platform
25+
# This ensures only relevant binary files are included in the wheel
26+
MINICORE_DIR="${CONNECTOR_DIR}/src/snowflake/connector/minicore"
27+
arch=$(uname -m)
28+
29+
# Determine libc type (glibc or musl)
30+
if ldd --version 2>&1 | grep -qi musl; then
31+
libc_type="musl"
32+
else
33+
libc_type="glibc"
34+
fi
35+
36+
# Determine which directory to keep based on architecture and libc
37+
if [[ $arch == "x86_64" ]]; then
38+
keep_dir="linux_x86_64_${libc_type}"
39+
elif [[ $arch == "aarch64" ]]; then
40+
keep_dir="linux_aarch64_${libc_type}"
41+
else
42+
echo "[WARN] Unknown architecture: $arch, not cleaning minicore directories"
43+
keep_dir=""
44+
fi
45+
46+
if [[ -n "$keep_dir" && -d "${MINICORE_DIR}" ]]; then
47+
echo "[Info] Cleaning minicore directories, keeping only ${keep_dir}"
48+
for dir in "${MINICORE_DIR}"/*/; do
49+
dir_name=$(basename "$dir")
50+
if [[ "$dir_name" != "$keep_dir" && "$dir_name" != "__pycache__" ]]; then
51+
echo "[Info] Removing minicore/${dir_name}"
52+
rm -rf "$dir"
53+
fi
54+
done
55+
fi
56+
2457
# Necessary for cpython_path
2558
source /home/user/multibuild/manylinux_utils.sh
2659

@@ -39,6 +72,7 @@ for PYTHON_VERSION in ${PYTHON_VERSIONS}; do
3972
${PYTHON} -m build --outdir ${BUILD_DIR} .
4073
# On Linux we should repair wheel(s) generated
4174
arch=$(uname -p)
75+
auditwheel show ${BUILD_DIR}/*.whl
4276
if [[ $arch == x86_64 ]]; then
4377
auditwheel repair --plat manylinux2014_x86_64 ${BUILD_DIR}/*.whl -w ${REPAIRED_DIR}
4478
else

0 commit comments

Comments
 (0)