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

Refactor file writing logic #778

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

HomayoonAlimohammadi
Copy link
Contributor

Overview

Calling os.WriteFile might cause partial writes as we've seen with microk8s-cluster-agent: canonical/microk8s-cluster-agent#62
This PR adds a utils.WriteFile that should be used instead of os.WriteFile to prevent partial writes and empty files.

@HomayoonAlimohammadi HomayoonAlimohammadi requested a review from a team as a code owner November 8, 2024 09:42
Copy link
Contributor

@bschimke95 bschimke95 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@HomayoonAlimohammadi HomayoonAlimohammadi merged commit 528d459 into main Nov 8, 2024
18 of 20 checks passed
@HomayoonAlimohammadi HomayoonAlimohammadi deleted the KU-1973/refactor-write-file branch November 8, 2024 14:36
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