o-nikolas commented on code in PR #62962:
URL: https://github.com/apache/airflow/pull/62962#discussion_r2892414832
##########
providers/amazon/tests/system/amazon/aws/example_sagemaker_unified_studio_explicit_params.py:
##########
Review Comment:
Why are you creating a whole new system test for the same operator? This has
a lot of downstream effects, we should try to avoid this if we can. You can
just put another task which calls this operator in the existing system test.
##########
providers/amazon/src/airflow/providers/amazon/aws/operators/sagemaker_unified_studio.py:
##########
@@ -101,6 +101,11 @@ class SageMakerNotebookOperator(BaseOperator):
"""
operator_extra_links = (SageMakerUnifiedStudioLink(),)
+ # These fields are declared as template_fields so Airflow resolves XCom
references
+ # (e.g. task_instance.xcom_pull(...)) to actual string values before
execute() is called.
+ # Without this, the hook would be instantiated with unresolved
PlainXComArg objects,
+ # causing a ParamValidationError when the underlying SDK tries to use them
as strings.
+ template_fields = ("domain_id", "project_id", "domain_region")
Review Comment:
Any reason to only want to template these ones? What about some of the other
inputs to this operator?
##########
providers/amazon/tests/system/amazon/aws/example_sagemaker_unified_studio.py:
##########
@@ -78,10 +75,6 @@ def get_mwaa_environment_params(
parameters = {}
parameters[f"{AIRFLOW_PREFIX}DATAZONE_DOMAIN_ID"] = domain_id
parameters[f"{AIRFLOW_PREFIX}DATAZONE_PROJECT_ID"] = project_id
- parameters[f"{AIRFLOW_PREFIX}DATAZONE_ENVIRONMENT_ID"] = environment_id
- parameters[f"{AIRFLOW_PREFIX}DATAZONE_SCOPE_NAME"] = "dev"
- parameters[f"{AIRFLOW_PREFIX}DATAZONE_STAGE"] = "prod"
- parameters[f"{AIRFLOW_PREFIX}DATAZONE_ENDPOINT"] =
f"https://datazone.{region_name}.api.aws"
Review Comment:
Is it helpful to keep these to test the path for folks using older versions
of the SMUS SDK? Is that a relevant path even?
--
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]