Skip to content
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

Improve ExternalTaskSensor Async Implementation #36916

Merged
merged 6 commits into from
Jan 25, 2024

Conversation

pankajastro
Copy link
Member

This pull request addresses several differences between the synchronous and asynchronous implementations of ExternalTaskSensor. The changes include:

Soft Failure Handling:

  • Added soft failure handling for async implementations.
  • This ensures that the sensor doesn't fail the entire DAG when external tasks encounter errors.

Monitoring Multiple Tasks, Task Groups, and DAGs:

  • Enhanced the async implementation to monitor multiple tasks, task groups, and DAG.

Code Organization:

  • Moved database-related calls to the core hook module for better modularization.
  • Changed the access level of certain methods to private to discourage external usage and facilitate future breaking changes as needed.

^ 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.

@boring-cyborg boring-cyborg bot added area:core-operators Operators, Sensors and hooks within Core Airflow area:Triggerer labels Jan 19, 2024
airflow/hooks/utils.py Outdated Show resolved Hide resolved
airflow/hooks/utils.py Outdated Show resolved Hide resolved
airflow/hooks/utils.py Outdated Show resolved Hide resolved
airflow/hooks/utils.py Outdated Show resolved Hide resolved
airflow/hooks/utils.py Outdated Show resolved Hide resolved
airflow/triggers/external_task.py Outdated Show resolved Hide resolved
airflow/sensors/external_task.py Show resolved Hide resolved
airflow/hooks/utils.py Outdated Show resolved Hide resolved
@eladkal eladkal added this to the Airflow 2.9.0 milestone Jan 23, 2024
@eladkal eladkal added the type:improvement Changelog: Improvements label Jan 23, 2024
airflow/sensors/external_task.py Show resolved Hide resolved
airflow/sensors/external_task.py Outdated Show resolved Hide resolved
airflow/triggers/external_task.py Outdated Show resolved Hide resolved
airflow/triggers/external_task.py Outdated Show resolved Hide resolved
airflow/triggers/external_task.py Outdated Show resolved Hide resolved
airflow/utils/sensor_helper.py Outdated Show resolved Hide resolved
@phanikumv phanikumv merged commit e9a4bca into apache:main Jan 25, 2024
56 checks passed
@phanikumv phanikumv deleted the fix_external_sensor branch January 25, 2024 10:35
amoghrajesh pushed a commit to amoghrajesh/airflow that referenced this pull request Jan 30, 2024
abhishekbhakat pushed a commit to abhishekbhakat/my_airflow that referenced this pull request Mar 5, 2024
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:Triggerer type:improvement Changelog: Improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants