-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
AIP-40: Deferrable Tasks #15389
AIP-40: Deferrable Tasks #15389
Conversation
f957c32
to
fde074e
Compare
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*. |
1551b7c
to
a16c727
Compare
18c8b99
to
fbef4b4
Compare
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*. |
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*. |
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*. |
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*. |
The Workflow run is cancelling this PR. Building image for the PR has been cancelled |
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*. |
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*. |
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*. |
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*. |
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*. |
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*. |
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*. |
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*. |
The Workflow run is cancelling this PR. Building image for the PR has been cancelled |
c980c2b
to
8e05ca7
Compare
0fdc216
to
86e04a6
Compare
291c370
to
345ab34
Compare
This adds two concepts - being able to defer operators, in which they enter a state where they are not running but waiting for an event to resume, and Triggers, which are asynchronous bits of code that run in massive parallel and fire events to un-defer operators. See AIP-40 for more details.
345ab34
to
4639624
Compare
super().__init__(*args, **kwargs) | ||
|
||
if capacity is None: | ||
self.capacity = conf.getint('triggerer', 'default_capacity', fallback=1000) |
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.
self.capacity = conf.getint('triggerer', 'default_capacity', fallback=1000) | |
self.capacity = conf.getint('triggerer', 'default_capacity') |
(Eventually I'll start my crusade against fallback
, but this will mean 1 less when that time comes)
Stale review - we can followup with more changes
The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease. |
Looks good to me -- I think we can follow up if there are more changes |
Adds triggerer component added in apache#15389 (AIP-40) to the docker-compose.yaml file for quick start
Adds triggerer component added in #15389 (AIP-40) to the docker-compose.yaml file for quick start
Adds triggerer component added in #15389 (AIP-40) to the Helm Chart
This is the implementation of AIP-40, Deferrable "Async" Tasks (https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=177050929).
The main changes are:
airflow.triggers
packagetrigger
tableAsync
versions of the various date/time sensors have been added which defer rather than poke.triggerer
await
) and blocking the loop.deferred
state which indicates they are waiting on a trigger to runtrigger_id
column, and a failure timeout is in atrigger_timeout
columnfailed
stateTaskDeferred
exception, or callingself.defer
on the TaskInstance which does the same thing.next_method
andnext_kwargs
column are added to specify what a task instance/operator's execution entry point should be if it's not the default ofexecute()
. They are currently only used by deferral, but have been written to be independent in case they are useful elsewhere.jump-consistent-hash
is a small MIT licensed library that implements a fast, consistent hash algorithmpytest-asyncio
is an Apache 2 licensed library that enables async tests to be written easilyChanges that are deliberately not in here and will be in a future PR for them specifically:
triggerer
in what it runstriggerer
triggerer
Remaining fixes: