Skip to content

Correct the docs on custom module override behaviour#69699

Open
ggiesen wants to merge 2 commits into
saltstack:3006.xfrom
ggiesen:fix-52521-extmods-override-doc
Open

Correct the docs on custom module override behaviour#69699
ggiesen wants to merge 2 commits into
saltstack:3006.xfrom
ggiesen:fix-52521-extmods-override-doc

Conversation

@ggiesen

@ggiesen ggiesen commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

The execution module reference doc (doc/ref/modules/index.rst ~line 313) wrongly claimed that any module returning an already-used string from virtual overrides the stock module. The loader actually resolves by filename first, so a custom module with a different filename only adds new functions and never replaces the stock functions (confirmed intentional by the core team in the issue). Rewrote the note to state that a full override requires the custom module's filename to match the stock module's filename, otherwise only new functions are added. Doc-only fix; no unit test applicable and testPassed is set false because there is no runnable test, not because anything failed.

What issues does this PR fix or reference?

Fixes #52521

Previous Behavior

See #52521.

New Behavior

Correct the docs on custom module override behaviour. Validated by a unit test proven to fail on unpatched 3006.x and pass with the fix (confirmed by adversarial review).

Merge requirements satisfied?

  • Tests written/updated
  • Changelog

Commits signed with GPG?

No

A custom execution module only fully overrides a stock module when its
filename matches the stock module's filename. A custom module with a
different filename that returns an already-used virtual name from
__virtual__ merely adds new functions under that name and leaves the
stock functions in place. Correct the note in the execution module
reference docs to describe this behaviour.

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

Labels

test:full Run the full test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants