sortega commented on code in PR #68568:
URL: https://github.com/apache/airflow/pull/68568#discussion_r3551712870
##########
task-sdk/tests/task_sdk/execution_time/test_task_runner.py:
##########
@@ -6267,3 +6284,49 @@ def test_bad_declaration_is_skipped_not_fatal(self):
with patch("airflow.sdk.execution_time.task_runner.allow_class",
side_effect=ValueError("nope")):
# Must not raise -- the walk swallows per-class registration
errors.
_register_deserialization_allowed_classes(dag,
structlog.get_logger())
+
+
+def _make_dag_tagged_ti(create_runtime_ti, tags):
+ """Build a RuntimeTaskInstance whose in-memory Dag carries the given
tags."""
+ from airflow.sdk import DAG
+ from airflow.sdk.bases.operator import BaseOperator
+
+ class _NoopOperator(BaseOperator):
+ def execute(self, context):
+ return None
+
+ with DAG("tagged_dag", tags=tags):
+ task = _NoopOperator(task_id="t")
Review Comment:
Done
--
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]