KevinYang21 commented on a change in pull request #5079: [AIRFLOW-4285] Update 
task dependency context defination and usage
URL: https://github.com/apache/airflow/pull/5079#discussion_r300856977
 
 

 ##########
 File path: airflow/ti_deps/dep_context.py
 ##########
 @@ -88,43 +88,85 @@ def __init__(
 
 
 # In order to be able to get queued a task must have one of these states
-QUEUEABLE_STATES = {
-    State.FAILED,
+SCHEDULEABLE_STATES = {
     State.NONE,
+    State.UP_FOR_RETRY,
+    State.UP_FOR_RESCHEDULE,
+}
+
+RUNNABLE_STATES = {
+    # For cases like unit tests and run manually
+    State.NONE,
+    State.UP_FOR_RETRY,
+    State.UP_FOR_RESCHEDULE,
+    # For normal scheduler/backfill cases
     State.QUEUED,
+}
+
+QUEUEABLE_STATES = {
     State.SCHEDULED,
-    State.SKIPPED,
-    State.UPSTREAM_FAILED,
-    State.UP_FOR_RETRY,
+}
+
+BACKFILL_QUEUEABLE_STATES = {
+    # For cases like unit tests and run manually
+    State.NONE,
     State.UP_FOR_RESCHEDULE,
+    State.UP_FOR_RETRY,
+    # For normal backfill cases
+    State.SCHEDULED,
 }
 
-# Context to get the dependencies that need to be met in order for a task 
instance to
-# be backfilled.
-QUEUE_DEPS = {
-    NotRunningDep(),
 
 Review comment:
   Good point, I don't see a use case for them.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to