-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
Enable ending the task directly from the triggerer without going into the worker. #40084
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
boring-cyborg
bot
added
area:core-operators
Operators, Sensors and hooks within Core Airflow
area:Scheduler
including HA (high availability) scheduler
area:Triggerer
labels
Jun 6, 2024
Lee-W
reviewed
Jun 6, 2024
sunank200
force-pushed
the
terminal_state_from_triggerer
branch
from
June 7, 2024 06:37
1f22222
to
2015062
Compare
uranusjr
changed the title
Make task to go to terminal state from triggerer without needing a worker
Make task go to terminal state from triggerer without needing a worker
Jun 7, 2024
sunank200
force-pushed
the
terminal_state_from_triggerer
branch
from
June 12, 2024 05:37
2015062
to
e5c34b8
Compare
sunank200
requested review from
dstandish,
hussein-awala,
uranusjr,
jedcunningham,
ephraimbuddy,
kaxil,
XD-DENG and
ashb
as code owners
June 12, 2024 06:16
sunank200
requested review from
utkarsharma2,
potiuk,
pankajkoti,
pankajastro,
phanikumv and
kaxil
and removed request for
kaxil
June 12, 2024 06:19
Does this work with listeners? |
Lee-W
reviewed
Jun 13, 2024
pankajastro
reviewed
Jun 13, 2024
Related : #31718 |
sunank200
requested review from
pierrejeambrun,
eladkal,
o-nikolas,
mik-laj,
ryanahamilton and
bbovenzi
as code owners
July 24, 2024 11:35
158 files change does seem right 🤔 we probably need to rebase again |
sunank200
removed request for
hussein-awala,
XD-DENG,
bolkedebruin,
pierrejeambrun,
eladkal,
o-nikolas,
mik-laj,
ryanahamilton and
bbovenzi
July 24, 2024 11:36
Yes rebasing again |
sunank200
force-pushed
the
terminal_state_from_triggerer
branch
from
July 24, 2024 11:48
8b86d00
to
d42afd2
Compare
Lee-W
approved these changes
Jul 24, 2024
As this is approved by many, I'm planning on merging it within the next hour. Let me know if anyone still want to take a look |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area:core-operators
Operators, Sensors and hooks within Core Airflow
area:Scheduler
including HA (high availability) scheduler
area:Triggerer
type:new-feature
Changelog: New Features
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why
For some operators such as
DateTimeSensorAsync
,TimeDeltaSensorAsync
andTimeSensorAsync
it would be better if we could terminate the task without needing a worker.What
Introduce
BaseTaskEndEvent
to end the task without resuming on the worker.Triggers have two options: they can either send execution back to the task or end the task instance directly. If the trigger ends the task instance, the
method_name
should be None. Otherwise, provide themethod_name
to be used when resuming the execution in the task.Previously, we only paid attention to failure requests in
_execute_task_callbacks
. Now, we also execute any given callback type directly. In this scenario, the callback is submitted remotely, so we assume there's no need to change the state; we simply run the callback.Introduce
end_from_trigger
in each Async operator which end the task directly from the triggerer without going into the worker. For example:By default
end_from_trigger
isFalse
.^ 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.