Skip to content

Strip publisher __pub_* kwargs in fileserver.update runner (#66793) - #69537

Merged
dwoz merged 3 commits into
saltstack:3006.xfrom
ggiesen:fix-66793-fileserver-update-pub-kwargs
Jul 5, 2026
Merged

Strip publisher __pub_* kwargs in fileserver.update runner (#66793)#69537
dwoz merged 3 commits into
saltstack:3006.xfrom
ggiesen:fix-66793-fileserver-update-pub-kwargs

Conversation

@ggiesen

@ggiesen ggiesen commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes the fileserver.update runner raising Passed invalid arguments: update() got an unexpected keyword argument '__pub_user' when called through saltutil.runner or an orchestration (salt.runner).

What issues does this PR fix or reference?

Fixes #66793.

Previous behavior

When fileserver.update is invoked via the runner client (minion saltutil.runner, or salt.runner in an orchestration), load_args_and_kwargs injects publisher metadata into the runner function's **kwargs as __pub_* keys. fileserver.update forwarded those kwargs verbatim to the fileserver backends, whose update() signatures (roots.update(), gitfs.update(remotes=None), ...) reject unknown keyword arguments, so the call failed with:

Passed invalid arguments: update() got an unexpected keyword argument '__pub_user'

salt-run fileserver.update from the CLI was unaffected, since the CLI path does not inject __pub_* into the runner kwargs.

New behavior

The runner strips __pub_* publisher metadata with salt.utils.args.clean_kwargs before forwarding to the backends. The runner-job user attribution added in #63148 is unaffected, since it is applied in the runner client rather than via these kwargs.

Merge requirements satisfied?

  • Tests written/updated (regression test fails without the fix; full runner test file passes)
  • Changelog entry (changelog/66793.fixed.md)

Commits signed with GPG?

No

@twangboy twangboy added this to the Sulphur v3006.27 milestone Jul 1, 2026
@twangboy twangboy added the test:full Run the full test suite label Jul 1, 2026
…#66793)

When fileserver.update is invoked through saltutil.runner or an
orchestration, the runner client injects publisher metadata into the
runner function's kwargs as __pub_* keys (via load_args_and_kwargs).
fileserver.update forwarded those kwargs verbatim to the fileserver
backends, whose update() signatures (e.g. roots.update(),
gitfs.update(remotes=None)) reject unknown keyword arguments, raising:

    Passed invalid arguments: update() got an unexpected keyword
    argument '__pub_user'

Strip the __pub_* publisher metadata with salt.utils.args.clean_kwargs
before forwarding to the backends. This keeps the runner-job user
attribution added in saltstack#63148 intact (it is applied upstream in the
runner client, not via these kwargs).
@twangboy
twangboy force-pushed the fix-66793-fileserver-update-pub-kwargs branch from a4851b5 to 1c9b3ad Compare July 1, 2026 17:27
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.

3 participants