Move BaseSensorOperator to TaskSDK definitions#48244
Merged
Merged
Conversation
kaxil
commented
Mar 25, 2025
kaxil
commented
Mar 25, 2025
kaxil
commented
Mar 25, 2025
kaxil
force-pushed
the
move-basop-sdk
branch
7 times, most recently
from
March 26, 2025 22:26
5f7eb7f to
e33ea1b
Compare
kaxil
marked this pull request as ready for review
March 26, 2025 22:26
kaxil
requested review from
XD-DENG,
amoghrajesh,
ashb and
uranusjr
as code owners
March 26, 2025 22:26
uranusjr
reviewed
Mar 26, 2025
uranusjr
reviewed
Mar 26, 2025
kaxil
force-pushed
the
move-basop-sdk
branch
2 times, most recently
from
March 27, 2025 12:20
03e1959 to
a22d544
Compare
kaxil
added a commit
to astronomer/airflow
that referenced
this pull request
Mar 27, 2025
As we are replacing BaseOperator usage from Core to Task SDK, we are running into several issues, one of the common one being over-usage of `task.run()`. While some cases can be easily replaced by `task.execute()` others needs execution of the tasks, sharing of XCom's in between, checking task state, correct exception etc. To make this easier I have added `run_task` fixture which I have been using in apache#48244 and it has worked out well. Example:
kaxil
added a commit
that referenced
this pull request
Mar 27, 2025
As we are replacing BaseOperator usage from Core to Task SDK, we are running into several issues, one of the common one being over-usage of `task.run()`. While some cases can be easily replaced by `task.execute()` others needs execution of the tasks, sharing of XCom's in between, checking task state, correct exception etc. To make this easier I have added `run_task` fixture which I have been using in #48244 and it has worked out well. Example:
kaxil
force-pushed
the
move-basop-sdk
branch
3 times, most recently
from
March 27, 2025 19:53
2c5ee02 to
465594b
Compare
kaxil
commented
Mar 27, 2025
kaxil
commented
Mar 27, 2025
kaxil
commented
Mar 27, 2025
kaxil
force-pushed
the
move-basop-sdk
branch
2 times, most recently
from
March 27, 2025 21:00
7cdfa3c to
cfed275
Compare
amoghrajesh
reviewed
Mar 28, 2025
amoghrajesh
left a comment
Contributor
There was a problem hiding this comment.
I do not have any major concerns the way things have been done, a few nits here are there
pankajkoti
pushed a commit
to astronomer/airflow
that referenced
this pull request
Mar 28, 2025
As we are replacing BaseOperator usage from Core to Task SDK, we are running into several issues, one of the common one being over-usage of `task.run()`. While some cases can be easily replaced by `task.execute()` others needs execution of the tasks, sharing of XCom's in between, checking task state, correct exception etc. To make this easier I have added `run_task` fixture which I have been using in apache#48244 and it has worked out well. Example:
pankajkoti
pushed a commit
to astronomer/airflow
that referenced
this pull request
Mar 28, 2025
shubham-pyc
pushed a commit
to shubham-pyc/airflow
that referenced
this pull request
Apr 2, 2025
As we are replacing BaseOperator usage from Core to Task SDK, we are running into several issues, one of the common one being over-usage of `task.run()`. While some cases can be easily replaced by `task.execute()` others needs execution of the tasks, sharing of XCom's in between, checking task state, correct exception etc. To make this easier I have added `run_task` fixture which I have been using in apache#48244 and it has worked out well. Example:
shubham-pyc
pushed a commit
to shubham-pyc/airflow
that referenced
this pull request
Apr 2, 2025
aaron-y-chen
pushed a commit
to aaron-y-chen/airflow
that referenced
this pull request
Apr 4, 2025
As we are replacing BaseOperator usage from Core to Task SDK, we are running into several issues, one of the common one being over-usage of `task.run()`. While some cases can be easily replaced by `task.execute()` others needs execution of the tasks, sharing of XCom's in between, checking task state, correct exception etc. To make this easier I have added `run_task` fixture which I have been using in apache#48244 and it has worked out well. Example:
aaron-y-chen
pushed a commit
to aaron-y-chen/airflow
that referenced
this pull request
Apr 4, 2025
simonprydden
pushed a commit
to simonprydden/airflow
that referenced
this pull request
Apr 8, 2025
As we are replacing BaseOperator usage from Core to Task SDK, we are running into several issues, one of the common one being over-usage of `task.run()`. While some cases can be easily replaced by `task.execute()` others needs execution of the tasks, sharing of XCom's in between, checking task state, correct exception etc. To make this easier I have added `run_task` fixture which I have been using in apache#48244 and it has worked out well. Example:
simonprydden
pushed a commit
to simonprydden/airflow
that referenced
this pull request
Apr 8, 2025
kosteev
pushed a commit
to GoogleCloudPlatform/composer-airflow
that referenced
this pull request
May 28, 2025
As we are replacing BaseOperator usage from Core to Task SDK, we are running into several issues, one of the common one being over-usage of `task.run()`. While some cases can be easily replaced by `task.execute()` others needs execution of the tasks, sharing of XCom's in between, checking task state, correct exception etc. To make this easier I have added `run_task` fixture which I have been using in apache/airflow#48244 and it has worked out well. Example: GitOrigin-RevId: 80840cb5734630f95d831dd10ae103c3df3a4b2f
kosteev
pushed a commit
to GoogleCloudPlatform/composer-airflow
that referenced
this pull request
Sep 24, 2025
As we are replacing BaseOperator usage from Core to Task SDK, we are running into several issues, one of the common one being over-usage of `task.run()`. While some cases can be easily replaced by `task.execute()` others needs execution of the tasks, sharing of XCom's in between, checking task state, correct exception etc. To make this easier I have added `run_task` fixture which I have been using in apache/airflow#48244 and it has worked out well. Example: GitOrigin-RevId: 80840cb5734630f95d831dd10ae103c3df3a4b2f
kosteev
pushed a commit
to GoogleCloudPlatform/composer-airflow
that referenced
this pull request
Oct 22, 2025
As we are replacing BaseOperator usage from Core to Task SDK, we are running into several issues, one of the common one being over-usage of `task.run()`. While some cases can be easily replaced by `task.execute()` others needs execution of the tasks, sharing of XCom's in between, checking task state, correct exception etc. To make this easier I have added `run_task` fixture which I have been using in apache/airflow#48244 and it has worked out well. Example: GitOrigin-RevId: 80840cb5734630f95d831dd10ae103c3df3a4b2f
kosteev
pushed a commit
to GoogleCloudPlatform/composer-airflow
that referenced
this pull request
Feb 27, 2026
As we are replacing BaseOperator usage from Core to Task SDK, we are running into several issues, one of the common one being over-usage of `task.run()`. While some cases can be easily replaced by `task.execute()` others needs execution of the tasks, sharing of XCom's in between, checking task state, correct exception etc. To make this easier I have added `run_task` fixture which I have been using in apache/airflow#48244 and it has worked out well. Example: GitOrigin-RevId: 80840cb5734630f95d831dd10ae103c3df3a4b2f
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
closes #45743
I am not touching Providers (to change import Path for
BaseSensorOperator) in this PR since I might moveBaseOperatorandBaseSensorOperatorunderairflow.sdk.basesmodule since they aren't really needed for DAG Authors.Future Work:
ExternalTaskSensorto AIP-72. It currently uses DB. (Will handle it as part of ExternalTaskSensor is failing when logical_date is null #47447)supervisefunction (AIP-72: Move logic to load Secrets backend on Workers #48446)