Shnekit commented on code in PR #62962:
URL: https://github.com/apache/airflow/pull/62962#discussion_r2932005801


##########
providers/amazon/tests/system/amazon/aws/example_sagemaker_unified_studio.py:
##########
@@ -156,12 +161,35 @@ def mock_mwaa_environment(parameters: dict):
     )
     # [END howto_operator_sagemaker_unified_studio_notebook]
 
+    # [START howto_operator_sagemaker_unified_studio_notebook_explicit_params]
+    # Run notebook with domain_id/project_id passed explicitly as operator 
parameters.
+    # No environment variables needed — the SDK resolves the S3 path and 
region from domain_id and project_id.
+    run_notebook_explicit_params = SageMakerNotebookOperator(
+        task_id="run-notebook-explicit",
+        domain_id=domain_id,
+        project_id=project_id,
+        input_config={"input_path": notebook_path, "input_params": {}},
+        output_config={"output_formats": ["NOTEBOOK"]},  # optional
+        compute={
+            "instance_type": "ml.m5.large",
+            "volume_size_in_gb": 30,
+        },  # optional
+        termination_condition={"max_runtime_in_seconds": 600},  # optional
+        tags={},  # optional
+        wait_for_completion=True,  # optional
+        waiter_delay=5,  # optional
+        deferrable=False,  # optional
+    )
+    # [END howto_operator_sagemaker_unified_studio_notebook_explicit_params]
+
     chain(
         # TEST SETUP
         test_context,
         setup_mwaa_environment,
-        # TEST BODY
+        # TEST BODY: legacy env-var-based resolution
         run_notebook,
+        # TEST BODY: explicit params, no env vars required
+        run_notebook_explicit_params,

Review Comment:
   Good point, fixing in the next rev



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to