Skip to content

Commit d18005d

Browse files
authored
Unskip integ tests mlops (aws#5887)
* test: add spark_py312 marker * temporarily skip test_to_pipeline_and_execute_with_lake_formation
1 parent 3a9cbc7 commit d18005d

3 files changed

Lines changed: 26 additions & 15 deletions

File tree

sagemaker-mlops/tests/integ/feature_store/feature_processor/test_feature_processor_integ.py

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -528,10 +528,11 @@ def transform(raw_s3_data_as_df):
528528
)
529529

530530

531-
@pytest.mark.skipif(
532-
sys.version_info[:2] not in [(3, 9), (3, 12)],
533-
reason=f"SageMaker Spark image only supports Python 3.9 and 3.12, got {sys.version_info[:2]}",
534-
)
531+
# @pytest.mark.skipif(
532+
# sys.version_info[:2] not in [(3, 9), (3, 12)],
533+
# reason=f"SageMaker Spark image only supports Python 3.9 and 3.12, got {sys.version_info[:2]}",
534+
# )
535+
@pytest.mark.spark_py312
535536
@pytest.mark.slow_test
536537
def test_feature_processor_transform_offline_only_store_ingestion_run_with_remote(
537538
sagemaker_session,
@@ -669,10 +670,11 @@ def transform(raw_s3_data_as_df):
669670
)
670671

671672

672-
@pytest.mark.skipif(
673-
sys.version_info[:2] not in [(3, 9), (3, 12)],
674-
reason=f"SageMaker Spark image only supports Python 3.9 and 3.12, got {sys.version_info[:2]}",
675-
)
673+
# @pytest.mark.skipif(
674+
# sys.version_info[:2] not in [(3, 9), (3, 12)],
675+
# reason=f"SageMaker Spark image only supports Python 3.9 and 3.12, got {sys.version_info[:2]}",
676+
# )
677+
@pytest.mark.spark_py312
676678
@pytest.mark.slow_test
677679
def test_to_pipeline_and_execute(
678680
sagemaker_session,
@@ -792,10 +794,16 @@ def transform(raw_s3_data_as_df):
792794
# cleanup_pipeline(pipeline_name="pipeline-name-01", sagemaker_session=sagemaker_session)
793795

794796

795-
@pytest.mark.skipif(
796-
sys.version_info[:2] not in [(3, 9), (3, 12)],
797-
reason=f"SageMaker Spark image only supports Python 3.9 and 3.12, got {sys.version_info[:2]}",
797+
# @pytest.mark.skipif(
798+
# sys.version_info[:2] not in [(3, 9), (3, 12)],
799+
# reason=f"SageMaker Spark image only supports Python 3.9 and 3.12, got {sys.version_info[:2]}",
800+
# )
801+
@pytest.mark.skip(
802+
reason="Lake Formation credential vending (GetTemporaryGlueTableCredentials) requires "
803+
"full LF environment setup (resource registration, trust policy, data location grants) "
804+
"that is not configured in CI. See quip-amazon.com/S3FEAMMMuKm0 for details."
798805
)
806+
@pytest.mark.spark_py312
799807
@pytest.mark.slow_test
800808
def test_to_pipeline_and_execute_with_lake_formation(
801809
sagemaker_session,
@@ -940,10 +948,11 @@ def transform(raw_s3_data_as_df):
940948
cleanup_feature_group(car_data_fg, sagemaker_session=sagemaker_session)
941949

942950

943-
@pytest.mark.skipif(
944-
sys.version_info[:2] not in [(3, 9), (3, 12)],
945-
reason=f"SageMaker Spark image only supports Python 3.9 and 3.12, got {sys.version_info[:2]}",
946-
)
951+
# @pytest.mark.skipif(
952+
# sys.version_info[:2] not in [(3, 9), (3, 12)],
953+
# reason=f"SageMaker Spark image only supports Python 3.9 and 3.12, got {sys.version_info[:2]}",
954+
# )
955+
@pytest.mark.spark_py312
947956
@pytest.mark.slow_test
948957
def test_schedule_and_event_trigger(
949958
sagemaker_session,

sagemaker-mlops/tests/integ/feature_store/feature_processor/test_feature_processor_spark_compat.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ def test_spark_session_factory_configs_include_dynamic_hadoop():
5454
assert f"org.apache.hadoop:hadoop-common:{hadoop_version}" in packages
5555

5656

57+
@pytest.mark.spark_py312
5758
@pytest.mark.slow_test
5859
def test_image_resolver_returns_uri_for_installed_pyspark():
5960
"""Verify the image resolver returns a valid URI for the installed PySpark + Python version."""

sagemaker-mlops/tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ markers =
6060
cron
6161
local_mode
6262
slow_test
63+
spark_py312: mark a test that requires Python 3.12 (Spark image compatibility).
6364
release
6465
image_uris_unit_test
6566
timeout: mark a test as a timeout.

0 commit comments

Comments
 (0)