Skip to content

[v3-3-test] Prevent React plugins from inheriting a prior bundle's component - #72136

Merged
pierrejeambrun merged 1 commit into
apache:v3-3-testfrom
astronomer:backport-71943
Aug 27, 2026
Merged

pierrejeambrun merged 1 commit into
apache:v3-3-testfrom
astronomer:backport-71943

Conversation

@pierrejeambrun

Copy link
Copy Markdown
Member

Backport of #71943 to v3-3-test.

Cherry-picked from bdf3ee5.

The source fix (ReactPlugin.tsx) applied cleanly. ReactPlugin.test.tsx did not exist on v3-3-test — it was introduced by #70149, which is not on this branch — so rather than pull in that PR's unrelated context-props tests, only this PR's loadPlugin regression test was carried over as a standalone file. Verified locally: it fails without the fix and passes with it.


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 4.8)

Generated-by: Claude Code (Opus 4.8) following the guidelines

…che#71943)

A React plugin bundle exports its component by assigning to the shared
globalThis.AirflowPlugin as a side effect of being imported. When a bundle is
malformed or empty and never makes that assignment, the loader read whatever
value a previously-loaded plugin had left there, so one plugin silently
rendered another plugin's component instead of failing. Clear the shared global
before each import so a bundle that assigns nothing surfaces a clear error
rather than inheriting a stale component.

(cherry picked from commit bdf3ee5)
@boring-cyborg boring-cyborg Bot added the area:UI Related to UI/UX. For Frontend Developers. label Aug 27, 2026
@pierrejeambrun
pierrejeambrun merged commit 8d774f5 into apache:v3-3-test Aug 27, 2026
80 of 81 checks passed
@pierrejeambrun
pierrejeambrun deleted the backport-71943 branch August 27, 2026 10:05
@pierrejeambrun

Copy link
Copy Markdown
Member Author

Unrelated breeze doc ci failure

@github-actions github-actions Bot added this to the Airflow 3.3.2 milestone Aug 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi maintainer, this PR was merged without a milestone set.
We've automatically set the milestone to Airflow 3.3.2 based on: merged to version branch
If this milestone is not correct, please update it to the appropriate milestone.

This comment was generated by Milestone Tag Assistant.

vatsrahul1001 pushed a commit that referenced this pull request Sep 7, 2026
) (#72136)

A React plugin bundle exports its component by assigning to the shared
globalThis.AirflowPlugin as a side effect of being imported. When a bundle is
malformed or empty and never makes that assignment, the loader read whatever
value a previously-loaded plugin had left there, so one plugin silently
rendered another plugin's component instead of failing. Clear the shared global
before each import so a bundle that assigns nothing surfaces a clear error
rather than inheriting a stale component.

(cherry picked from commit bdf3ee5)
@vatsrahul1001 vatsrahul1001 added the type:bug-fix Changelog: Bug Fixes label Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers. type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants