Strip publisher __pub_* kwargs in fileserver.update runner (#66793) - #69537
Merged
dwoz merged 3 commits intoJul 5, 2026
Merged
Conversation
twangboy
approved these changes
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
force-pushed
the
fix-66793-fileserver-update-pub-kwargs
branch
from
July 1, 2026 17:27
a4851b5 to
1c9b3ad
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes the
fileserver.updaterunner raisingPassed invalid arguments: update() got an unexpected keyword argument '__pub_user'when called throughsaltutil.runneror an orchestration (salt.runner).What issues does this PR fix or reference?
Fixes #66793.
Previous behavior
When
fileserver.updateis invoked via the runner client (minionsaltutil.runner, orsalt.runnerin an orchestration),load_args_and_kwargsinjects publisher metadata into the runner function's**kwargsas__pub_*keys.fileserver.updateforwarded those kwargs verbatim to the fileserver backends, whoseupdate()signatures (roots.update(),gitfs.update(remotes=None), ...) reject unknown keyword arguments, so the call failed with:salt-run fileserver.updatefrom the CLI was unaffected, since the CLI path does not inject__pub_*into the runner kwargs.New behavior
The runner strips
__pub_*publisher metadata withsalt.utils.args.clean_kwargsbefore 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?
changelog/66793.fixed.md)Commits signed with GPG?
No