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

Create driver-ready file atomically #789

Closed
wants to merge 1 commit into from

Conversation

elezar
Copy link
Member

@elezar elezar commented Jun 27, 2024

This change ensures that the driver-ready file is created atomically. This prevents operands from loading an empty file and not applying the relevant settings.


if err := os.Rename(tmpFile.Name(), statusFile); err != nil {
return fmt.Errorf("error moving temporary file to '%v': %w", statusFile, err)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
return fmt.Errorf("error moving temporary file to '%v': %w", statusFile, err)
return fmt.Errorf("error moving temporary file to '%s': %w", statusFile, err)

Copy link
Contributor

Choose a reason for hiding this comment

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

I have address this comment in #790

@cdesiniotis
Copy link
Contributor

Moving to #790

@elezar elezar deleted the create-driver-ready-atomically branch June 27, 2024 16:31
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