Skip to content

Allow setting http_params in source dictionary - #67153

Draft
SndR85 wants to merge 3 commits into
saltstack:masterfrom
SndR85:fix-for-61052
Draft

SndR85 wants to merge 3 commits into
saltstack:masterfrom
SndR85:fix-for-61052

Conversation

@SndR85

@SndR85 SndR85 commented Jan 15, 2025

Copy link
Copy Markdown
Contributor

What does this PR do?

Allow the source parameter of file.managed and cp.cache_file to be a dictionary which allows it to set various http params.

What issues does this PR fix or reference?

Fixes #61052

Previous Behavior

Not able to set http params via source parameter

New Behavior

With this change it's possible to set http params via the source parameter in file.managed and cp.cache_file.

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes

Please review Salt's Contributing Guide for best practices, including the
PR Guidelines.

See GitHub's page on GPG signing for more information about signing commits with GPG.

@whytewolf

Copy link
Copy Markdown
Collaborator

can some documentation of the new option be added please.

@dwoz dwoz added the test:full Run the full test suite label Jun 19, 2026
@dwoz dwoz added this to the Potassium v3009.0 milestone Jun 19, 2026
@dwoz

dwoz commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

@SndR85 If you would still like to get this in we are actively merging things for 3009. Looks like there are just some unit test failures that need to be addressed.

SndR85 and others added 3 commits November 13, 2026 04:03
Add changelog/61052.added.md documenting the new dict-form source
parameter for file.managed and cp.cache_file.

Add TestGetHttpParamsFromSource unit tests covering: None/string/list
pass-through, dict URL+headers extraction, all valid param extraction,
unknown-key filtering, cert as string, cert as dict with/without key,
and missing URL raises.
@SndR85

SndR85 commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

@dwoz I'm currently not using Salt anymore. This PR is still marked as draft. I had an idea, but it's probably to big for me to take it on me. I saw that it's missing some pieces to get it working as it should be and I discovered that when I was writing the tests. I'm fine if this will be closed without being merged, thought I still like the idea of being able to add http params, for example for use of authentication, to get a file from a remote URL.

This branch was previously deployed

1 inactive deployment
ci — 327b452b Deployed Nov 13, 2026 by dwoz via Build Onedir Packages / RPM (x86_64) #28917
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.

[FEATURE REQUEST] file.managed / cp.cache_file - support for headers for http(s) urls

3 participants