Remove AIP-44 from airflow/sensors/base.py#44518
Merged
jscheffl merged 1 commit intoapache:mainfrom Nov 30, 2024
Merged
Conversation
shahar1
approved these changes
Nov 30, 2024
rawwar
reviewed
Dec 1, 2024
|
|
||
| def execute(self, context: Context) -> Any: | ||
| @provide_session | ||
| def execute(self, context: Context, session=NEW_SESSION) -> Any: |
Contributor
There was a problem hiding this comment.
adding additional arg session is causing lot of mypy failures in providers where BaseSensorOperator is being extended. Error's something like this:
providers/src/airflow/providers/microsoft/azure/sensors/data_factory.py:98: error:
Signature of "execute" incompatible with supertype "BaseSensorOperator"
[override]
def execute(self, context: Context) -> None:
^
providers/src/airflow/providers/microsoft/azure/sensors/data_factory.py:98: note: Superclass:
providers/src/airflow/providers/microsoft/azure/sensors/data_factory.py:98: note: def execute(context: Context, session: Any = ...) -> Any
providers/src/airflow/providers/microsoft/azure/sensors/data_factory.py:98: note: Subclass:
providers/src/airflow/providers/microsoft/azure/sensors/data_factory.py:98: note: def execute(self, context: Context) -> None
Should we just remove the decorator instead of updating execute method signature here?
Failing checks: https://github.com/apache/airflow/actions/runs/12101035549/job/33740515392?pr=44510
Contributor
Author
There was a problem hiding this comment.
Uuups, oh was at-sleep while the error was on main. If we revert I assume we should not make this is a batch with another PR - should we not "just" revert the PR from me that caused it?
Contributor
There was a problem hiding this comment.
I just fixed it and it passed all tests. That should be good? I removed the decorator as well
jscheffl
added a commit
that referenced
this pull request
Dec 1, 2024
1 task
got686-yandex
pushed a commit
to got686-yandex/airflow
that referenced
this pull request
Jan 30, 2025
got686-yandex
pushed a commit
to got686-yandex/airflow
that referenced
this pull request
Jan 30, 2025
…pache#44527) This reverts commit de94c06.
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.
related: #44436