-
Notifications
You must be signed in to change notification settings - Fork 14.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't schedule dummy tasks #7880
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7880 +/- ##
==========================================
- Coverage 86.95% 86.23% -0.72%
==========================================
Files 927 927
Lines 44974 44977 +3
==========================================
- Hits 39107 38788 -319
- Misses 5867 6189 +322
Continue to review full report at Codecov.
|
I think it's a good idea that For example: Example:
In this case marking Also it's possible in the above example that there is ExternalSensor from Probably just need to update |
But the trigger rules will still be respected. I added this code when the task is to be marked for execution by the scheduler and the trigger rules have already been checked. All callbacks will also be executed, because when the task has callbacks, it will still be passed to the scheduler. This optimization applies only to cases when the task has no callbacks and when the decision to execute it has been made. |
airflow/operators/dummy_operator.py
Outdated
@@ -24,6 +24,9 @@ class DummyOperator(BaseOperator): | |||
""" | |||
Operator that does literally nothing. It can be used to group tasks in a | |||
DAG. | |||
|
|||
The task that uses this operator is automatically marked as successfully completed by the scheduler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mik-laj This is what confused me.
Maybe better saying something like:
The task is evaluated by the scheduler but never processed by the executor
WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. Might be worth adding!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small update to description needed but otherwise good.
airflow/operators/dummy_operator.py
Outdated
@@ -24,6 +24,9 @@ class DummyOperator(BaseOperator): | |||
""" | |||
Operator that does literally nothing. It can be used to group tasks in a | |||
DAG. | |||
|
|||
The task that uses this operator is automatically marked as successfully completed by the scheduler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. Might be worth adding!
(cherry picked from commit d87c59d)
(cherry picked from commit d87c59d)
(cherry picked from commit d87c59d)
(cherry picked from commit d87c59d)
#7871
Issue link: WILL BE INSERTED BY boring-cyborg
Make sure to mark the boxes below before creating PR: [x]
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.
Read the Pull Request Guidelines for more information.