diff --git a/sdk/ml/azure-ai-ml/assets.json b/sdk/ml/azure-ai-ml/assets.json index 16ea3647afab..db2df11812ee 100644 --- a/sdk/ml/azure-ai-ml/assets.json +++ b/sdk/ml/azure-ai-ml/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "python", "TagPrefix": "python/ml/azure-ai-ml", - "Tag": "python/ml/azure-ai-ml_d3ebe00cb3" + "Tag": "python/ml/azure-ai-ml_e021d2c7bc" } diff --git a/sdk/ml/azure-ai-ml/tests/component/e2etests/test_component.py b/sdk/ml/azure-ai-ml/tests/component/e2etests/test_component.py index c9b96e292eb1..f5077361ee64 100644 --- a/sdk/ml/azure-ai-ml/tests/component/e2etests/test_component.py +++ b/sdk/ml/azure-ai-ml/tests/component/e2etests/test_component.py @@ -1223,9 +1223,8 @@ def test_load_component_from_flow(self, client: MLClient, randstr, params_overri assert component._get_origin_code_value() == created_component._get_origin_code_value() - @pytest.mark.live_test_only("Needs re-recording to work with new test proxy sanitizers") def test_load_component_from_flow_in_registry(self, registry_client: MLClient, randstr): - target_path: str = "./tests/test_configs/flows/runs/with_environment.yml" + target_path: str = "./tests/test_configs/components/helloworld_component.yml" component = load_component( target_path, params_override=[ @@ -1243,4 +1242,5 @@ def test_load_component_from_flow_in_registry(self, registry_client: MLClient, r assert created_component.version == "2" assert component._get_origin_code_value() == created_component._get_origin_code_value() - assert component.environment == created_component.task.environment + assert component.type == created_component.type + assert component.command == created_component.command diff --git a/sdk/ml/azure-ai-ml/tests/connection/e2etests/test_connections.py b/sdk/ml/azure-ai-ml/tests/connection/e2etests/test_connections.py index 294fc52047f6..54fde4480bba 100644 --- a/sdk/ml/azure-ai-ml/tests/connection/e2etests/test_connections.py +++ b/sdk/ml/azure-ai-ml/tests/connection/e2etests/test_connections.py @@ -40,7 +40,6 @@ @pytest.mark.core_sdk_test @pytest.mark.usefixtures("recorded_test") class TestWorkspaceConnections(AzureRecordedTestCase): - @pytest.mark.live_test_only("Needs re-recording to work with new common sanitizers") def test_secret_population( self, client: MLClient, @@ -122,7 +121,6 @@ def test_workspace_connections_create_update_and_delete_git_pat( with pytest.raises(Exception): client.connections.get(name=wps_connection_name) - @pytest.mark.live_test_only("Needs re-recording to work with new common sanitizers") def test_workspace_connections_create_update_and_delete_snowflake_user_pwd( self, client: MLClient, @@ -898,7 +896,6 @@ def test_python_feed_crud( with pytest.raises(Exception): client.connections.get(name=wps_connection_name) - @pytest.mark.live_test_only("Needs re-recording to work with new common sanitizers") def test_container_registry_managed_id_crud( self, client: MLClient, diff --git a/sdk/ml/azure-ai-ml/tests/datastore/e2etests/test_datastore.py b/sdk/ml/azure-ai-ml/tests/datastore/e2etests/test_datastore.py index 80f78c5fbf5f..c60cef495018 100644 --- a/sdk/ml/azure-ai-ml/tests/datastore/e2etests/test_datastore.py +++ b/sdk/ml/azure-ai-ml/tests/datastore/e2etests/test_datastore.py @@ -4,7 +4,7 @@ from devtools_testutils import AzureRecordedTestCase, is_live from azure.ai.ml import MLClient, load_datastore -from azure.ai.ml.entities import AzureBlobDatastore, AzureFileDatastore +from azure.ai.ml.entities import AccountKeyConfiguration, AzureBlobDatastore, AzureFileDatastore from azure.ai.ml.entities._credentials import NoneCredentialConfiguration from azure.ai.ml.entities._datastore._on_prem import HdfsDatastore from azure.ai.ml.entities._datastore.datastore import Datastore @@ -79,7 +79,6 @@ def test_hdfs_keytab( with pytest.raises(Exception): client.datastores.get(random_name) - @pytest.mark.live_test_only("Needs re-recording to work with new common sanitizers") def test_blob_store( self, client: MLClient, @@ -99,14 +98,16 @@ def test_blob_store( created_datastore = datastore_create_get_list(client, internal_blob_ds, random_name) assert isinstance(created_datastore, AzureBlobDatastore) assert created_datastore.container_name == internal_blob_ds.container_name - assert created_datastore.account_name == internal_blob_ds.account_name - assert created_datastore.credentials.account_key == primary_account_key + assert created_datastore.account_name == (internal_blob_ds.account_name if is_live() else "Sanitized") + if is_live(): + assert created_datastore.credentials.account_key == primary_account_key + else: + created_datastore.credentials = AccountKeyConfiguration(account_key=primary_account_key) datastore_update_check_credential(client, created_datastore, secondary_account_key) client.datastores.delete(random_name) with pytest.raises(Exception): client.datastores.get(random_name) - @pytest.mark.live_test_only("Needs re-recording to work with new common sanitizers") def test_blob_store_credential_less( self, client: MLClient, @@ -123,13 +124,12 @@ def test_blob_store_credential_less( created_datastore = datastore_create_get_list(client, internal_blob_ds, random_name) assert isinstance(created_datastore, AzureBlobDatastore) assert created_datastore.container_name == internal_blob_ds.container_name - assert created_datastore.account_name == internal_blob_ds.account_name + assert created_datastore.account_name == (internal_blob_ds.account_name if is_live() else "Sanitized") assert isinstance(created_datastore.credentials, NoneCredentialConfiguration) client.datastores.delete(random_name) with pytest.raises(Exception): client.datastores.get(random_name) - @pytest.mark.live_test_only("Needs re-recording to work with new common sanitizers") def test_file_store( self, client: MLClient, @@ -149,8 +149,11 @@ def test_file_store( created_datastore = datastore_create_get_list(client, internal_file_ds, random_name) assert isinstance(created_datastore, AzureFileDatastore) assert created_datastore.file_share_name == internal_file_ds.file_share_name - assert created_datastore.account_name == internal_file_ds.account_name - assert created_datastore.credentials.account_key == primary_account_key + assert created_datastore.account_name == (internal_file_ds.account_name if is_live() else "Sanitized") + if is_live(): + assert created_datastore.credentials.account_key == primary_account_key + else: + created_datastore.credentials = AccountKeyConfiguration(account_key=primary_account_key) datastore_update_check_credential(client, created_datastore, secondary_account_key) client.datastores.delete(random_name) with pytest.raises(Exception): @@ -217,7 +220,6 @@ def test_adls_gen2_store( with pytest.raises(Exception): client.datastores.get(random_name) - @pytest.mark.live_test_only("Needs re-recording to work with new common sanitizers") def test_credential_less_adls_gen2_store( self, client: MLClient, @@ -230,7 +232,7 @@ def test_credential_less_adls_gen2_store( ] internal_adls_gen2 = load_datastore(adls_gen2_credential_less_file, params_override=params_override) created_datastore = datastore_create_get_list(client, internal_adls_gen2, random_name) - assert created_datastore.account_name == internal_adls_gen2.account_name + assert created_datastore.account_name == (internal_adls_gen2.account_name if is_live() else "Sanitized") assert isinstance(created_datastore.credentials, NoneCredentialConfiguration) client.datastores.delete(random_name) with pytest.raises(Exception): diff --git a/sdk/ml/azure-ai-ml/tests/environment/e2etests/test_environment.py b/sdk/ml/azure-ai-ml/tests/environment/e2etests/test_environment.py index 011db149a929..5059c2903069 100644 --- a/sdk/ml/azure-ai-ml/tests/environment/e2etests/test_environment.py +++ b/sdk/ml/azure-ai-ml/tests/environment/e2etests/test_environment.py @@ -89,7 +89,6 @@ def test_environment_create_or_update_docker(self, client: MLClient, env_name: C assert env_dump["id"] == ARM_ID_PREFIX + environment_id assert env_dump["image"] == environment.image - @pytest.mark.live_test_only("Needs re-recording to work with new test proxy sanitizers") def test_environment_create_or_update_docker_context( self, client: MLClient, env_name: Callable[[str], str] ) -> None: @@ -218,7 +217,6 @@ def test_environment_get_latest_label(self, client: MLClient, randstr: Callable[ sleep_if_live(2) assert client.environments.get(name, label="latest").version == version - @pytest.mark.live_test_only("Needs re-recording to work with new test proxy sanitizers") def test_registry_environment_create_conda_and_get( self, only_registry_client: MLClient, env_name: Callable[[str], str] ) -> None: diff --git a/sdk/ml/azure-ai-ml/tests/internal/e2etests/test_pipeline_job.py b/sdk/ml/azure-ai-ml/tests/internal/e2etests/test_pipeline_job.py index 06cc1091bb62..0408de1f674c 100644 --- a/sdk/ml/azure-ai-ml/tests/internal/e2etests/test_pipeline_job.py +++ b/sdk/ml/azure-ai-ml/tests/internal/e2etests/test_pipeline_job.py @@ -287,7 +287,6 @@ def pipeline_with_command_components(tsv_file, content): assert_job_cancel(pipeline_job, client, experiment_name="v15_v2_interop") - @pytest.mark.live_test_only("Needs re-recording to work with new common sanitizers") def test_pipeline_with_setting_node_output_mode(self, client: MLClient): # get dataset training_data = Input(type=AssetTypes.URI_FILE, path="https://dprepdata.blob.core.windows.net/demo/Titanic.csv")