Skip to content

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

Merged
Ch3LL merged 12 commits into
saltstack:masterfrom
nicholasmhughes:add-keyvalue-create_if_missing
Jun 14, 2023
Merged

[master] file.keyvalue should allow creating a file if it doesn't exist#64028
Ch3LL merged 12 commits into
saltstack:masterfrom
nicholasmhughes:add-keyvalue-create_if_missing

Conversation

@nicholasmhughes

Copy link
Copy Markdown
Contributor

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
Comment thread salt/states/file.py Outdated
@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
@Ch3LL
Ch3LL temporarily deployed to ci June 7, 2023 00:37 — with GitHub Actions Inactive
@Ch3LL
Ch3LL temporarily deployed to ci June 7, 2023 00:37 — with GitHub Actions Inactive
@Ch3LL
Ch3LL temporarily deployed to ci June 7, 2023 00:37 — with GitHub Actions Inactive
@Ch3LL
Ch3LL temporarily deployed to ci June 7, 2023 00:38 — with GitHub Actions Inactive
@Ch3LL
Ch3LL temporarily deployed to ci June 7, 2023 00:59 — with GitHub Actions Inactive
@Ch3LL
Ch3LL temporarily deployed to ci June 7, 2023 00:59 — with GitHub Actions Inactive
@Ch3LL
Ch3LL temporarily deployed to ci June 7, 2023 00:59 — with GitHub Actions Inactive
@Ch3LL
Ch3LL temporarily deployed to ci June 7, 2023 00:59 — with GitHub Actions Inactive
@Ch3LL
Ch3LL temporarily deployed to ci June 7, 2023 01:01 — with GitHub Actions Inactive
@Ch3LL
Ch3LL temporarily deployed to ci June 7, 2023 01:01 — with GitHub Actions Inactive
@Ch3LL

Ch3LL commented Jun 7, 2023

Copy link
Copy Markdown
Contributor

Yeah if you don't mind. Recently a change was made to the pre commit config file to make the code compatible with 3.8 and up, since 3.7 is going end of life in a few weeks.

MKLeb
MKLeb previously approved these changes Jun 9, 2023
@nicholasmhughes
nicholasmhughes temporarily deployed to ci June 9, 2023 19:11 — with GitHub Actions Inactive
@nicholasmhughes
nicholasmhughes temporarily deployed to ci June 9, 2023 19:11 — with GitHub Actions Inactive
@nicholasmhughes
nicholasmhughes temporarily deployed to ci June 9, 2023 19:11 — with GitHub Actions Inactive
@nicholasmhughes
nicholasmhughes temporarily deployed to ci June 9, 2023 19:11 — with GitHub Actions Inactive
@nicholasmhughes
nicholasmhughes temporarily deployed to ci June 9, 2023 19:30 — with GitHub Actions Inactive
@nicholasmhughes
nicholasmhughes temporarily deployed to ci June 9, 2023 19:31 — with GitHub Actions Inactive
Ch3LL
Ch3LL previously approved these changes Jun 9, 2023
@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

Ch3LL commented Jun 12, 2023

Copy link
Copy Markdown
Contributor

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

@nicholasmhughes

Copy link
Copy Markdown
Contributor Author

@Ch3LL resolved. 👍

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