Skip to content

Fix CUSTOM_NAMED_RESOURCES priority in _load_named_resources#1287

Open
AbishekS wants to merge 1 commit into
mainfrom
export-D101888085
Open

Fix CUSTOM_NAMED_RESOURCES priority in _load_named_resources#1287
AbishekS wants to merge 1 commit into
mainfrom
export-D101888085

Conversation

@AbishekS

Copy link
Copy Markdown
Contributor

Summary: Swap the unpack order so namespace-scanned plugins form the base layer and the in-tree registries (GENERIC/AWS/CUSTOM) override them on name collision. Previously namespace plugins were unpacked last, so a downstream torchx_plugins.named_resources.* registration silently shadowed CUSTOM_NAMED_RESOURCES — including any capability injection the custom layer adds on top of the base factory. After: CUSTOM_NAMED_RESOURCES wins, matching the docstring contract downstream plugin authors rely on.

Differential Revision: D101888085

Summary: Swap the unpack order so namespace-scanned plugins form the base layer and the in-tree registries (GENERIC/AWS/CUSTOM) override them on name collision. Previously namespace plugins were unpacked last, so a downstream ``torchx_plugins.named_resources.*`` registration silently shadowed ``CUSTOM_NAMED_RESOURCES`` — including any capability injection the custom layer adds on top of the base factory. After: ``CUSTOM_NAMED_RESOURCES`` wins, matching the docstring contract downstream plugin authors rely on.

Differential Revision: D101888085
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 22, 2026
@meta-codesync

meta-codesync Bot commented Apr 22, 2026

Copy link
Copy Markdown

@AbishekS has exported this pull request. If you are a Meta employee, you can view the originating Diff in D101888085.

@codecov-commenter

codecov-commenter commented Apr 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.19%. Comparing base (5143c9f) to head (fcdbae7).
⚠️ Report is 19 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1287   +/-   ##
=======================================
  Coverage   92.19%   92.19%           
=======================================
  Files          96       96           
  Lines        6820     6820           
=======================================
  Hits         6288     6288           
  Misses        532      532           
Flag Coverage Δ
unittests 92.19% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants