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

Update GoDoc for ioutils (AtomicWriteFile) to document expected behavior #47516

Closed
thaJeztah opened this issue Mar 6, 2024 · 0 comments · Fixed by #47664
Closed

Update GoDoc for ioutils (AtomicWriteFile) to document expected behavior #47516

thaJeztah opened this issue Mar 6, 2024 · 0 comments · Fixed by #47664
Labels
exp/beginner exp/intermediate kind/enhancement Enhancements are not bugs or new features but can improve usability or performance.

Comments

@thaJeztah
Copy link
Member

Description

The ioutils utilities have different semantics than Go stdlib file utilities; unlike stdlib, these functions do not depend on the active umask. We should update their GoDoc to document the behavior, so that consumers are aware of their semantics.

Alternatively, we can change their behavior to take umassk into account, but this would be a breaking change, so not sure if we want to go that direction.

@thaJeztah thaJeztah added kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. exp/beginner exp/intermediate labels Mar 6, 2024
crazybolillo added a commit to crazybolillo/moby that referenced this issue Apr 3, 2024
Unlike its stdlib counterparts, AtomicFileWriter does not take into
consideration umask due to its use of chmod. Failure to recognize this
may cause subtle problems like the one described in moby#47498.

Therefore the documentation has been updated to let users know that
umask is not taken into consideration when using AtomicFileWriter.

Closes moby#47516.
crazybolillo added a commit to crazybolillo/moby that referenced this issue Apr 3, 2024
Unlike its stdlib counterparts, AtomicFileWriter does not take into
consideration umask due to its use of chmod. Failure to recognize this
may cause subtle problems like the one described in moby#47498.

Therefore the documentation has been updated to let users know that
umask is not taken into consideration when using AtomicFileWriter.

Closes moby#47516.

Signed-off-by: Antonio Aguilar <antonio@zoftko.com>
crazybolillo added a commit to crazybolillo/moby that referenced this issue Apr 3, 2024
Unlike its stdlib counterparts, AtomicFileWriter does not take into
consideration umask due to its use of chmod. Failure to recognize this
may cause subtle problems like the one described in moby#47498.

Therefore the documentation has been updated to let users know that
umask is not taken into consideration when using AtomicFileWriter.

Closes moby#47516.

Signed-off-by: Antonio Aguilar <antonio@zoftko.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exp/beginner exp/intermediate kind/enhancement Enhancements are not bugs or new features but can improve usability or performance.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant