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

[3006.x] file.managed correctly handles file path with '#' #66302

Merged
merged 5 commits into from
Apr 8, 2024

Conversation

Akm0d
Copy link
Contributor

@Akm0d Akm0d commented Apr 2, 2024

What does this PR do?

This PR fixes a bug in the file.managed state where file paths containing a "#" character are not handled correctly.

What issues does this PR fix or reference?

Fixes: 63060

Previous Behavior

The file.managed state fails to manage files correctly on subsequent runs if the file path contains a "#" character. The file is created correctly on the first run, but any subsequent run fails to manage the file. Salt attempts to diff on the incorrect file path, truncating the path at the "#" character.

New Behavior

The file.managed state now correctly handles file paths containing a "#" character. Files are managed correctly on all runs, and the correct file path is used for diffing.

Merge requirements satisfied?

Commits signed with GPG?

Yes

@Akm0d Akm0d requested a review from a team as a code owner April 2, 2024 22:02
@Akm0d Akm0d requested review from whytewolf and removed request for a team April 2, 2024 22:02
@salt-project-bot-prod-environment salt-project-bot-prod-environment bot changed the title file.managed correctly handles file path with '#' [3006.x] file.managed correctly handles file path with '#' Apr 2, 2024
@Akm0d Akm0d requested review from whytewolf and s0undt3ch April 8, 2024 20:17
Copy link
Collaborator

@s0undt3ch s0undt3ch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lint failures are inaccurate. Approving and merging.

@s0undt3ch s0undt3ch merged commit e8c3bdb into saltstack:3006.x Apr 8, 2024
179 of 181 checks passed
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.

3 participants