norm commented on code in PR #29846:
URL: https://github.com/apache/airflow/pull/29846#discussion_r1123383598


##########
airflow/models/abstractoperator.py:
##########
@@ -102,6 +103,12 @@ class AbstractOperator(Templater, DAGNode):
     outlets: list
     inlets: list
 
+    setup_teardown: SetupTeardown | None = None
+    """Indicate whether this is a setup or teadown task.

Review Comment:
   Minor: teardown not teadown (ugh, tea)
   



##########
airflow/utils/setup_teardown.py:
##########
@@ -16,42 +16,49 @@
 # under the License.
 from __future__ import annotations
 
-from contextlib import contextmanager
+import contextlib
+import enum
 
 from airflow.exceptions import AirflowException
 
 
+class SetupTeardown(enum.Enum):
+    """Flag to indicate a setup/teardown context."""
+
+    setup = "setup"
+    teardown = "teardown"

Review Comment:
   Out of curiosity, while I can (almost) follow *what* this is doing, I'm not 
sure of the *why* — what is the advantage to this refactor?



-- 
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