Skip to content

Fix plugin registration returning early on duplicate names - #60498

Merged
potiuk merged 1 commit into
apache:mainfrom
pgagnon:fix-plugins-manager-return-continue
Feb 11, 2026
Merged

potiuk merged 1 commit into
apache:mainfrom
pgagnon:fix-plugins-manager-return-continue

Conversation

@pgagnon

@pgagnon pgagnon commented Jan 14, 2026 •

Copy link
Copy Markdown
Contributor

The __register_plugins function was using 'return' instead of 'continue' when encountering a duplicate plugin name. This caused the entire loop to exit early, preventing subsequent plugins from being loaded.

@potiuk

potiuk commented Jan 21, 2026

Copy link
Copy Markdown
Member

Can you add unit tests please - that would avoid future similar regressions

@potiuk potiuk added this to the Airflow 3.1.7 milestone Jan 23, 2026
@potiuk

potiuk commented Jan 23, 2026

Copy link
Copy Markdown
Member

:D ? Would be great to have a unit test so that we can back-port it to 3.1.7

@pgagnon

pgagnon commented Jan 23, 2026

Copy link
Copy Markdown
Contributor Author

:D ? Would be great to have a unit test so that we can back-port it to 3.1.7

I'm a bit behind because I'm traveling. Will add asap. :-)

@potiuk

potiuk commented Feb 3, 2026

Copy link
Copy Markdown
Member

I'm a bit behind because I'm traveling. Will add asap. :-)

He He... tell me more about travelling and beig behind :)

@pgagnon
pgagnon force-pushed the fix-plugins-manager-return-continue branch 2 times, most recently from 0d1f7cb to 9ba03dd Compare February 8, 2026 19:41
@pgagnon

pgagnon commented Feb 8, 2026

Copy link
Copy Markdown
Contributor Author

@potiuk I counterchecked against other current PRs and the doc test failures are unrelated to this commit.

@potiuk

potiuk commented Feb 9, 2026

Copy link
Copy Markdown
Member

Yep. We had an issue yesterday that setuptools new release broke sphinx extension. Rebasing should help, it's already addressed in main.

The __register_plugins function was using 'return' instead of 'continue'
when encountering a duplicate plugin name. This caused the entire
loop to exit early, preventing subsequent plugins from being loaded.

Fixes a bug in apache#32692.
@pgagnon
pgagnon force-pushed the fix-plugins-manager-return-continue branch from 9ba03dd to cb3ccef Compare February 9, 2026 09:50
@potiuk
potiuk merged commit cf47121 into apache:main Feb 11, 2026
72 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Backport failed to create: v3-1-test. View the failure log Run details

Status Branch Result
❌ v3-1-test Commit Link

You can attempt to backport this manually by running:

cherry_picker cf47121 v3-1-test

This should apply the commit to the v3-1-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.

After you have resolved the conflicts, you can continue the backport process by running:

cherry_picker --continue

If you don't have cherry-picker installed, see the installation guide.

ytoprakc pushed a commit to ytoprakc/airflow that referenced this pull request Feb 12, 2026
)

The __register_plugins function was using 'return' instead of 'continue'
when encountering a duplicate plugin name. This caused the entire
loop to exit early, preventing subsequent plugins from being loaded.

Fixes a bug in apache#32692.
Ratasa143 pushed a commit to Ratasa143/airflow that referenced this pull request Feb 15, 2026
)

The __register_plugins function was using 'return' instead of 'continue'
when encountering a duplicate plugin name. This caused the entire
loop to exit early, preventing subsequent plugins from being loaded.

Fixes a bug in apache#32692.
choo121600 pushed a commit to choo121600/airflow that referenced this pull request Feb 22, 2026
)

The __register_plugins function was using 'return' instead of 'continue'
when encountering a duplicate plugin name. This caused the entire
loop to exit early, preventing subsequent plugins from being loaded.

Fixes a bug in apache#32692.
@vatsrahul1001

Copy link
Copy Markdown
Contributor

__register_plugins is not in v3-1-test

Subham-KRLX pushed a commit to Subham-KRLX/airflow that referenced this pull request Mar 4, 2026
)

The __register_plugins function was using 'return' instead of 'continue'
when encountering a duplicate plugin name. This caused the entire
loop to exit early, preventing subsequent plugins from being loaded.

Fixes a bug in apache#32692.
dominikhei pushed a commit to dominikhei/airflow that referenced this pull request Mar 11, 2026
)

The __register_plugins function was using 'return' instead of 'continue'
when encountering a duplicate plugin name. This caused the entire
loop to exit early, preventing subsequent plugins from being loaded.

Fixes a bug in apache#32692.
Ankurdeewan pushed a commit to Ankurdeewan/airflow that referenced this pull request Mar 15, 2026
)

The __register_plugins function was using 'return' instead of 'continue'
when encountering a duplicate plugin name. This caused the entire
loop to exit early, preventing subsequent plugins from being loaded.

Fixes a bug in apache#32692.
radhwene pushed a commit to radhwene/airflow that referenced this pull request Mar 21, 2026
)

The __register_plugins function was using 'return' instead of 'continue'
when encountering a duplicate plugin name. This caused the entire
loop to exit early, preventing subsequent plugins from being loaded.

Fixes a bug in apache#32692.
potiuk pushed a commit that referenced this pull request Aug 29, 2026
#72253)

__register_plugins used `return` instead of `continue` when encountering
a duplicate plugin name, so the first duplicate abandoned the rest of the
batch and every plugin after it was silently dropped.

airflow-core carries a duplicate of this function and was fixed twice: in
#60498 (`return` became a warning plus `continue`) and in #66649 (also
record the duplicate in import_errors). Neither fix reached the Task SDK
copy. Because that copy is the one used by the task-running process,
plugins would load for the scheduler and API server but silently go
missing inside tasks - most visibly, task instance listeners registered
by a plugin would never fire.

The __register_plugins body is now byte-identical to the airflow-core one.
imrichardwu pushed a commit to imrichardwu/airflow that referenced this pull request Sep 11, 2026
apache#72253)

__register_plugins used `return` instead of `continue` when encountering
a duplicate plugin name, so the first duplicate abandoned the rest of the
batch and every plugin after it was silently dropped.

airflow-core carries a duplicate of this function and was fixed twice: in
apache#60498 (`return` became a warning plus `continue`) and in apache#66649 (also
record the duplicate in import_errors). Neither fix reached the Task SDK
copy. Because that copy is the one used by the task-running process,
plugins would load for the scheduler and API server but silently go
missing inside tasks - most visibly, task instance listeners registered
by a plugin would never fire.

The __register_plugins body is now byte-identical to the airflow-core one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants