jason810496 commented on code in PR #53960:
URL: https://github.com/apache/airflow/pull/53960#discussion_r2245470122


##########
providers/standard/src/airflow/providers/standard/operators/hitl.py:
##########
@@ -218,14 +219,15 @@ def get_tasks_to_skip():
         return ret
 
 
-class HITLBranchOperator(HITLOperator):
+class HITLBranchOperator(HITLOperator, BranchMixIn):

Review Comment:
   Just a bit curious about why do we inherent `BranchMixIn` instead of  
`BaseBranchOperator` here.



##########
providers/standard/tests/unit/standard/operators/test_hitl.py:
##########
@@ -291,3 +297,68 @@ def test_init_without_default(self) -> None:
 
         assert op.options == ["OK", "NOT OK"]
         assert op.defaults is None
+
+
+class TestHITLBranchOperator:
+    # def test_without_dag_run(self, dag_maker):
+    #     """This checks the defensive against non-existent tasks in a dag 
run"""
+    #     dag_id = "hitl_branch_operator_test"
+    #     with dag_maker(
+    #         dag_id,
+    #         default_args={"owner": "airflow", "start_date": DEFAULT_DATE},
+    #         schedule=INTERVAL,
+    #         serialized=True,
+    #     ) as test_dag:
+    #         branch_1 = EmptyOperator(task_id="branch_1")
+    #         branch_2 = EmptyOperator(task_id="branch_2")
+    #         branch_op = HITLBranchOperator(
+    #             task_id="make_choice",
+    #             subject="This is subject",
+    #             options=["branch_1", "branch_2"],
+    #         )
+    #
+    #         branch_op >> [branch_1, branch_2]

Review Comment:
   Should we remove the comment or add the corresponding test?



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