Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix type errors in operator link calls#54321

Merged
potiuk merged 1 commit intoapache:mainfrom
amoghrajesh:fix-operatorlink-ci
Aug 10, 2025
Merged

Fix type errors in operator link calls#54321
potiuk merged 1 commit intoapache:mainfrom
amoghrajesh:fix-operatorlink-ci

Conversation

Copy link
Contributor

amoghrajesh commented Aug 10, 2025

Adds type: ignore comments to resolve mypy errors when calling BaseOperatorLink.get_link() with core operator types instead of the expected SDK BaseOperator type.

The BaseOperatorLink.get_link() method in the task SDK expects a BaseOperator parameter, but in the the references where we call it, we're passing:

  • SerializedBaseOperator
  • MappedOperator

For now, added type: ignore[arg-type] comments with TODO references to GH-52141, which tracks the broader issue of SDK/core type separation.

related #54295

Fixes CI errors:


airflow-core/src/airflow/serialization/serialized_objects.py:1300: error: Argument 1 to "get_link" of "BaseOperatorLink" has incompatible type "SerializedBaseOperator"; expected "BaseOperator"
[arg-type]
return link.get_link(self.unmap(None), ti_key=ti.key)
^~~~~~~~~~~~~~~~
airflow-core/src/airflow/models/mappedoperator.py:168: error: Argument 1 to "get_link" of "BaseOperatorLink" has incompatible type "MappedOperator"; expected "BaseOperator" [arg-type]
return link.get_link(self, ti_key=ti.key)
^~~~
Found 2 errors in 2 files (checked 982 source files)

Example: https://github.com/apache/airflow/actions/runs/16862119240/job/47764118285


^ 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 airflow-core/newsfragments.

amoghrajesh requested review from ashb, bolkedebruin and uranusjr as code owners August 10, 2025 16:41
amoghrajesh self-assigned this Aug 10, 2025
boring-cyborg bot added the area:serialization label Aug 10, 2025
amoghrajesh requested review from gopidesupavan and potiuk August 10, 2025 16:44
amoghrajesh mentioned this pull request Aug 10, 2025
potiuk approved these changes Aug 10, 2025
potiuk merged commit 92856b1 into apache:main Aug 10, 2025
58 checks passed
potiuk mentioned this pull request Aug 10, 2025
RoyLee1224 pushed a commit to RoyLee1224/airflow that referenced this pull request Aug 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

potiuk potiuk approved these changes

uranusjr Awaiting requested review from uranusjr uranusjr is a code owner

ashb Awaiting requested review from ashb ashb is a code owner

bolkedebruin Awaiting requested review from bolkedebruin bolkedebruin is a code owner

gopidesupavan Awaiting requested review from gopidesupavan

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants