Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.12: fix for urlunparse() not returning properly-prefixed file:/// URLs #66911

Closed
wants to merge 1 commit into from

Conversation

Rudd-O
Copy link

@Rudd-O Rudd-O commented Sep 21, 2024

What does this PR do?

Fixes salt:/// URL handling.

Issue spotted when using file.template and Salt-SSH. This issue caused the relative portion of the URL to be truncated two characters in the front, which caused the template files affected not being found by the minion.

Technically, a file:path/to/file URL is legal (although quite nonsensical), but since we know this create() function only gets paths that are absolute (or, rather, always relative to a specific root path), it's OK for us to do this. Even the return line of the function betrays this by adding prefix salt:///.

What issues does this PR fix or reference?

None known, so far it is original bug.

Previous Behavior

This used to work.

New Behavior

This does not work in 3007.1 anymore.

Merge requirements satisfied?

Sorry, I just want to fix this issue, I don't have time for these requirements. If someone else wants to adopt this change, good, please go ahead and steal the change — you are hereby authorized to do so, you don't even have to credit me (but it would be nice if I was). If not, Salt-SSH can stay broken and I can live with my patch locally forever. If you need a towncrier change log entry, please just push that to the branch.

…e:/// URLs

Spotted when using `file.template` and Salt-SSH.

This issue caused the relative portion of the URL to be truncated two characters in the front, which caused the template files affected not being found by the minion.
@Rudd-O Rudd-O requested a review from a team as a code owner September 21, 2024 12:49
@salt-project-bot-prod-environment salt-project-bot-prod-environment bot changed the title Python 3.12: fix for urlunparse() not returning properly-prefixed fil… [master] Python 3.12: fix for urlunparse() not returning properly-prefixed fil… Sep 21, 2024
@Rudd-O Rudd-O changed the title [master] Python 3.12: fix for urlunparse() not returning properly-prefixed fil… Python 3.12: fix for urlunparse() not returning properly-prefixed file:/// URLs Sep 21, 2024
@twangboy
Copy link
Contributor

duplicate of: #66899

@twangboy twangboy closed this Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants