-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Move BaseSensorOperator to TaskSDK definitions
#48244
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
Merged
Merged
Conversation
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
kaxil
commented
Mar 25, 2025
kaxil
commented
Mar 25, 2025
kaxil
commented
Mar 25, 2025
5f7eb7f to
e33ea1b
Compare
uranusjr
reviewed
Mar 26, 2025
uranusjr
reviewed
Mar 26, 2025
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:
44e4328 to
e0b0458
Compare
2c5ee02 to
465594b
Compare
kaxil
commented
Mar 27, 2025
kaxil
commented
Mar 27, 2025
providers/databricks/tests/unit/databricks/sensors/test_databricks_partition.py
Show resolved
Hide resolved
kaxil
commented
Mar 27, 2025
providers/databricks/tests/unit/databricks/sensors/test_databricks_sql.py
Show resolved
Hide resolved
7cdfa3c to
cfed275
Compare
amoghrajesh
reviewed
Mar 28, 2025
Contributor
amoghrajesh
left a comment
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.
I do not have any major concerns the way things have been done, a few nits here are there
providers/databricks/tests/unit/databricks/sensors/test_databricks_partition.py
Show resolved
Hide resolved
amoghrajesh
approved these changes
Mar 28, 2025
Contributor
amoghrajesh
left a comment
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.
Missed approving!
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
nailo2c
pushed a commit
to nailo2c/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:
nailo2c
pushed a commit
to nailo2c/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
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)