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

[master] file.keyvalue should allow creating a file if it doesn't exist #64028

Merged
merged 12 commits into from
Jun 14, 2023

Conversation

nicholasmhughes
Copy link
Collaborator

What does this PR do?

Adds the create_if_missing parameter to handle basic file creation for file.keyvalue

What issues does this PR fix or reference?

Fixes: #63545

Previous Behavior

file.keyvalue could not create a file, so file.touch or file.managed without content were often used.

New Behavior

Basic file creation is now possible, although management of permissions and ownership is not.

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.

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

@nicholasmhughes nicholasmhughes requested a review from a team as a code owner April 5, 2023 16:21
@nicholasmhughes nicholasmhughes requested review from MKLeb and removed request for a team April 5, 2023 16:21
@salt-project-bot-prod-environment salt-project-bot-prod-environment bot changed the title file.keyvalue should allow creating a file if it doesn't exist [master] file.keyvalue should allow creating a file if it doesn't exist Apr 5, 2023
salt/states/file.py Outdated Show resolved Hide resolved
@nicholasmhughes nicholasmhughes temporarily deployed to ci May 11, 2023 20:16 — with GitHub Actions Inactive
@nicholasmhughes nicholasmhughes temporarily deployed to ci May 11, 2023 20:16 — with GitHub Actions Inactive
@nicholasmhughes nicholasmhughes temporarily deployed to ci May 11, 2023 20:16 — with GitHub Actions Inactive
@nicholasmhughes nicholasmhughes requested a review from Ch3LL May 11, 2023 21:07
@nicholasmhughes nicholasmhughes temporarily deployed to ci May 11, 2023 21:30 — with GitHub Actions Inactive
@nicholasmhughes nicholasmhughes temporarily deployed to ci May 11, 2023 21:30 — with GitHub Actions Inactive
@nicholasmhughes nicholasmhughes temporarily deployed to ci May 11, 2023 21:30 — with GitHub Actions Inactive
@nicholasmhughes nicholasmhughes temporarily deployed to ci May 11, 2023 22:07 — with GitHub Actions Inactive
@nicholasmhughes nicholasmhughes temporarily deployed to ci May 11, 2023 22:07 — with GitHub Actions Inactive
@nicholasmhughes nicholasmhughes temporarily deployed to ci May 11, 2023 22:07 — with GitHub Actions Inactive
Ch3LL
Ch3LL previously approved these changes May 17, 2023
@Ch3LL Ch3LL temporarily deployed to ci May 17, 2023 20:21 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci May 17, 2023 20:21 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci May 17, 2023 20:26 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci May 18, 2023 01:30 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci May 18, 2023 01:30 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci May 18, 2023 01:30 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci May 18, 2023 02:07 — with GitHub Actions Inactive
@nicholasmhughes nicholasmhughes temporarily deployed to ci June 9, 2023 21:11 — with GitHub Actions Inactive
@nicholasmhughes nicholasmhughes temporarily deployed to ci June 9, 2023 21:11 — with GitHub Actions Inactive
@nicholasmhughes nicholasmhughes temporarily deployed to ci June 9, 2023 21:11 — with GitHub Actions Inactive
@nicholasmhughes nicholasmhughes temporarily deployed to ci June 9, 2023 21:11 — with GitHub Actions Inactive
@nicholasmhughes nicholasmhughes temporarily deployed to ci June 9, 2023 21:11 — with GitHub Actions Inactive
@nicholasmhughes nicholasmhughes temporarily deployed to ci June 9, 2023 21:11 — with GitHub Actions Inactive
@Ch3LL
Copy link
Contributor

Ch3LL commented Jun 12, 2023

@nicholasmhughes sorry but there seems to be a merge conflict. Mind resolving that?

@Ch3LL Ch3LL added the merge-conflict PR has a merge conflict label Jun 12, 2023
@nicholasmhughes nicholasmhughes dismissed stale reviews from Ch3LL and MKLeb via 756af02 June 12, 2023 20:51
@nicholasmhughes nicholasmhughes removed the merge-conflict PR has a merge conflict label Jun 12, 2023
@nicholasmhughes nicholasmhughes requested review from Ch3LL and MKLeb June 12, 2023 20:51
@nicholasmhughes
Copy link
Collaborator Author

@Ch3LL resolved. 👍

@Ch3LL Ch3LL temporarily deployed to ci June 13, 2023 20:25 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci June 13, 2023 20:25 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci June 13, 2023 20:25 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci June 13, 2023 20:25 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci June 13, 2023 20:41 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci June 13, 2023 20:47 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci June 13, 2023 21:43 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci June 13, 2023 21:43 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci June 13, 2023 21:43 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci June 13, 2023 21:43 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci June 13, 2023 21:43 — with GitHub Actions Inactive
@Ch3LL Ch3LL temporarily deployed to ci June 13, 2023 21:44 — with GitHub Actions Inactive
@Ch3LL Ch3LL merged commit 9ab90fd into saltstack:master Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

file.keyvalue should create the file if it doesn't exist
3 participants