Taragolis commented on code in PR #38178:
URL: https://github.com/apache/airflow/pull/38178#discussion_r1526219506
##########
tests/providers/amazon/aws/operators/test_ecs.py:
##########
@@ -680,6 +681,23 @@ def test_execute_complete(self, client_mock):
# task gets described to assert its success
client_mock().describe_tasks.assert_called_once_with(cluster="c",
tasks=["my_arn"])
+ @pytest.mark.db_test
+ def test_partial_deprecated_region(self, dag_maker):
+ with dag_maker("test_partial_deprecated_region_esc_run_task"):
+ EcsRunTaskOperator.partial(
+ task_id="fake-task-id",
+ region="ca-west-1",
+ cluster="foo",
+ task_definition="bar",
+ ).expand(overrides=[{}, {}, {}])
+
+ dr = dag_maker.create_dagrun(execution_date=timezone.utcnow())
+ warning_match = r"`region` is deprecated and will be removed"
+ for ti in dr.task_instances:
+ with pytest.warns(AirflowProviderDeprecationWarning,
match=warning_match):
+ ti.render_templates()
Review Comment:
Ok, that what I worried.
There is no easy way to check rendered templates for Partial operators, this
might be a regression of https://github.com/apache/airflow/pull/37856
--
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]