Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
21 changes: 19 additions & 2 deletions .github/workflows/daily_precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ jobs:
cloud_provider: ${{ matrix.cloud-provider }}
PYTEST_ADDOPTS: --color=yes --tb=short
TOX_PARALLEL_NO_SPINNER: 1
SNOWPARK_PYTHON_API_TEST_BUCKET_PATH: ${{ secrets.SNOWPARK_PYTHON_API_TEST_BUCKET_PATH }}
SNOWPARK_PYTHON_API_S3_STORAGE_INTEGRATION: ${{ vars.SNOWPARK_PYTHON_API_S3_STORAGE_INTEGRATION }}
shell: bash
- name: Install MS ODBC Driver (Ubuntu only)
if: ${{ matrix.os.download_name == 'linux' }}
Expand Down Expand Up @@ -611,7 +613,8 @@ jobs:
run: uv pip install -U setuptools pip wheel --system
- name: Install tox
run: uv pip install tox --system
- if: ${{ contains('macos', matrix.os.download_name) }}
# TODO: enable doctest for 3.14
- if: ${{ contains('macos', matrix.os.download_name) && matrix.python-version != '3.14' }}
name: Run doctests
run: python -m tox -e "py${PYTHON_VERSION}-doctest-notudf-ci"
env:
Expand All @@ -620,7 +623,9 @@ jobs:
PYTEST_ADDOPTS: --color=yes --tb=short --disable_cte_optimization
TOX_PARALLEL_NO_SPINNER: 1
shell: bash
- name: Run tests (excluding doctests)
# TODO: enable for 3.14
- if: ${{ matrix.python-version != '3.14' }}
name: Run tests (excluding doctests)
run: python -m tox -e "py${PYTHON_VERSION/\./}-dailynotdoctest-ci"
env:
PYTHON_VERSION: ${{ matrix.python-version }}
Expand All @@ -630,6 +635,18 @@ jobs:
SNOWPARK_PYTHON_API_TEST_BUCKET_PATH: ${{ secrets.SNOWPARK_PYTHON_API_TEST_BUCKET_PATH }}
SNOWPARK_PYTHON_API_S3_STORAGE_INTEGRATION: ${{ vars.SNOWPARK_PYTHON_API_S3_STORAGE_INTEGRATION }}
shell: bash
# TODO: remove the test below and run udf tests for 3.14
- if: ${{ matrix.python-version == '3.14' }}
name: Run tests (excluding udf, doctests)
run: python -m tox -e "py${PYTHON_VERSION/\./}-dailynotdoctestnotudf-ci"
env:
PYTHON_VERSION: ${{ matrix.python-version }}
cloud_provider: ${{ matrix.cloud-provider }}
PYTEST_ADDOPTS: --color=yes --tb=short --disable_cte_optimization
TOX_PARALLEL_NO_SPINNER: 1
SNOWPARK_PYTHON_API_TEST_BUCKET_PATH: ${{ secrets.SNOWPARK_PYTHON_API_TEST_BUCKET_PATH }}
SNOWPARK_PYTHON_API_S3_STORAGE_INTEGRATION: ${{ vars.SNOWPARK_PYTHON_API_S3_STORAGE_INTEGRATION }}
shell: bash
- name: Combine coverages
run: python -m tox -e coverage --skip-missing-interpreters false
shell: bash
Expand Down
24 changes: 24 additions & 0 deletions tests/integ/test_packaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ def test_patch_on_get_available_versions_for_packages(session):
(not is_pandas_and_numpy_available) or IS_IN_STORED_PROC,
reason="numpy and pandas are required",
)
@pytest.mark.skipif(
"FIPS_TEST" in os.environ,
reason="SNOW-3425553: need FIPS mode investigation",
)
def test_add_packages(session, local_testing_mode):
# Use numpy 2.3.1 for Python 3.13+, numpy 1.26.3 doesn't support Python 3.13
numpy_version = "numpy==2.3.1" if sys.version_info >= (3, 13) else "numpy==1.26.3"
Expand Down Expand Up @@ -341,6 +345,10 @@ def test_add_packages_with_underscore_and_versions(session):
@pytest.mark.skipif(
IS_IN_STORED_PROC, reason="Need certain version of datautil/pandas/numpy"
)
@pytest.mark.skipif(
"FIPS_TEST" in os.environ,
reason="SNOW-3425553: need FIPS mode investigation",
)
def test_add_packages_negative(session, caplog):
with pytest.raises(ValueError) as ex_info:
session.add_packages("python-dateutil****")
Expand Down Expand Up @@ -470,6 +478,10 @@ def test_add_requirements_twice_should_fail_if_packages_are_different(
IS_PY314,
reason="Python 3.14 uses pypi repository",
)
@pytest.mark.skipif(
"FIPS_TEST" in os.environ,
reason="SNOW-3425553: need FIPS mode investigation",
)
def test_add_unsupported_requirements_should_fail_if_custom_packages_upload_enabled_not_switched_on(
session, resources_path
):
Expand Down Expand Up @@ -529,6 +541,10 @@ def test_urllib() -> str:
IS_PY314,
reason="Python 3.14 uses pypi repository",
)
@pytest.mark.skipif(
"FIPS_TEST" in os.environ,
reason="SNOW-3425553: need FIPS mode investigation",
)
def test_add_unsupported_packages_should_fail_if_custom_packages_upload_enabled_not_switched_on(
session,
):
Expand Down Expand Up @@ -702,6 +718,10 @@ def check_if_package_works() -> str:
IS_IN_STORED_PROC,
reason="Subprocess calls are not allowed within stored procedures.",
)
@pytest.mark.skipif(
"FIPS_TEST" in os.environ,
reason="SNOW-3425553: need FIPS mode investigation",
)
def test_add_packages_with_native_dependency_without_force_push(session):
session.custom_package_usage_config = {"enabled": True}
with patch.object(session, "_is_anaconda_terms_acknowledged", lambda: True):
Expand Down Expand Up @@ -1005,6 +1025,10 @@ def get_skfuzzy_version() -> str:
IS_PY314,
reason="Python 3.14 uses pypi repository",
)
@pytest.mark.skipif(
"FIPS_TEST" in os.environ,
reason="SNOW-3425553: need FIPS mode investigation",
)
def test_add_requirements_unsupported_with_cache_path_negative(
session, resources_path, temporary_stage
):
Expand Down
12 changes: 12 additions & 0 deletions tests/integ/test_stored_procedure.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ def setup(session, resources_path, local_testing_mode):
IS_IN_STORED_PROC,
reason="Cannot create session in SP",
)
@pytest.mark.skipif(
"FIPS_TEST" in os.environ,
reason="SNOW-3425553: need FIPS mode investigation",
)
@patch("snowflake.snowpark._internal.udf_utils.VERSION", (999, 9, 9))
@pytest.mark.parametrize(
"packages,should_fail",
Expand Down Expand Up @@ -157,6 +161,10 @@ def return1(session_):
],
)
@patch("snowflake.snowpark._internal.udf_utils.VERSION", (999, 9, 9))
@pytest.mark.skipif(
"FIPS_TEST" in os.environ,
reason="SNOW-3425553: need FIPS mode investigation",
)
def test__do_register_sp_submits_correct_packages(
patched_resolve, session_packages, local_packages, db_parameters
):
Expand Down Expand Up @@ -2424,6 +2432,10 @@ def artifact_repo_test(session: snowflake.snowpark.Session) -> str:
("999.999.999", True), # Major version change - expect warning
],
)
@pytest.mark.skipif(
"FIPS_TEST" in os.environ,
reason="SNOW-3425553: need FIPS mode investigation",
)
def test_snowpark_python_bugfix_version_warning(
session, caplog, version_override, expect_warning
):
Expand Down
Loading