Skip to content

Conversation

@eladkal
Copy link
Contributor

@eladkal eladkal commented Mar 8, 2023

EmptyOperator should not be executed on workers thus it should not be considered for the mini scheduler optimization. closes: #29974

TODO:

  • add test

^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an 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 a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

EmptyOperator should not be executed on workers thus it should not be considered for the mini scheduler optimization.
closes: apache#29974
@eladkal eladkal force-pushed the ti branch 2 times, most recently from bd23b18 to 2f21990 Compare March 8, 2023 15:22
@eladkal eladkal marked this pull request as ready for review March 8, 2023 15:28
@eladkal eladkal requested review from XD-DENG, ashb and kaxil as code owners March 8, 2023 15:28
@eladkal eladkal requested review from ephraimbuddy and potiuk March 8, 2023 15:28
@potiuk
Copy link
Member

potiuk commented Mar 8, 2023

NIce one.

@potiuk potiuk added this to the Airflow 2.5.2 milestone Mar 8, 2023
@jedcunningham
Copy link
Member

It should probably check for callbacks and outlets as well:

and not ti.task.on_execute_callback
and not ti.task.on_success_callback
and not ti.task.outlets

Or, just letting the scheduler deal with it instead is probably fine too. I'm good either way.

…ini scheduler.

for example: EmptyOperator with on_execute_callback, on_success_callback, outlets
@eladkal
Copy link
Contributor Author

eladkal commented Mar 8, 2023

@jedcunningham good point. added handling for that cases

@eladkal eladkal merged commit a15792d into apache:main Mar 8, 2023
@eladkal eladkal deleted the ti branch March 8, 2023 22:29
@eladkal eladkal modified the milestones: Airflow 2.5.2, Airflow 2.5.3 Mar 8, 2023
@pierrejeambrun pierrejeambrun added the type:bug-fix Changelog: Bug Fixes label Mar 22, 2023
pierrejeambrun pushed a commit that referenced this pull request Mar 23, 2023
* Avoid considering EmptyOperator in mini scheduler

EmptyOperator should not be executed on workers thus it should not be considered for the mini scheduler optimization.
closes: #29974

(cherry picked from commit a15792d)
pierrejeambrun pushed a commit that referenced this pull request Mar 24, 2023
* Avoid considering EmptyOperator in mini scheduler

EmptyOperator should not be executed on workers thus it should not be considered for the mini scheduler optimization.
closes: #29974

(cherry picked from commit a15792d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistent behavior of EmptyOperator between start and end tasks

5 participants