You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "uranusjr (via GitHub)" <gi...@apache.org> on 2023/03/01 22:14:56 UTC

[GitHub] [airflow] uranusjr opened a new pull request, #29846: Refactor startup/teardown flag and storage

uranusjr opened a new pull request, #29846:
URL: https://github.com/apache/airflow/pull/29846

   A new enum is introduced so we can combine the is_setup/teardown flags into one attribute. The children/setup_children/teardown_children in TaskGroup is also refactored into one single dict that stores all tasks categorized by their "kind" (setup, teardown, or "normal").
   
   Some minor typing changes are made to fix Mypy.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] uranusjr commented on pull request #29846: Refactor startup/teardown flag and storage

Posted by "uranusjr (via GitHub)" <gi...@apache.org>.
uranusjr commented on PR #29846:
URL: https://github.com/apache/airflow/pull/29846#issuecomment-1512272463

   Not needed anymore.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] uranusjr closed pull request #29846: Refactor startup/teardown flag and storage

Posted by "uranusjr (via GitHub)" <gi...@apache.org>.
uranusjr closed pull request #29846: Refactor startup/teardown flag and storage
URL: https://github.com/apache/airflow/pull/29846


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] norm commented on a diff in pull request #29846: Refactor startup/teardown flag and storage

Posted by "norm (via GitHub)" <gi...@apache.org>.
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] github-actions[bot] commented on pull request #29846: Refactor startup/teardown flag and storage

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #29846:
URL: https://github.com/apache/airflow/pull/29846#issuecomment-1512263683

   This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org