Repository navigation
fix(config): preserve file mode on write and copy - #2831
Merged
Merged
Conversation
Preserve the permission mode of config files when updating them, create new config files with mode 0600 instead of default umask, and ensure temporary files match source file permissions. - Preserve existing file mode or default to 0o600 on tmp file in `_write_content` in `src/devops_cli/config/settings.py`. - Preserve source file mode before copystat in `_copy` in `src/devops_cli/config/write_history.py`. - Add tests in `tests/config/test_config_file_mode.py` and `tests/test_config_write_history.py`. - Verified with fail-to-pass check (`devops ci fail-to-pass --base origin/main`). Change: `openspec/changes/archive/2026-10-31-2745-config-files-and-their-copies-keep/` Closes #2745
dan-petty
marked this pull request as ready for review
October 31, 2026 04:05
dan-petty
pushed a commit
that referenced
this pull request
Oct 31, 2026
🤖 I have created a release *beep* *boop* --- ## [0.25.0](v0.24.0...v0.25.0) (2026-10-31) ### Features * **gh:** preview requests in dry run for api, status, secrets ([#2832](#2832)) ([9baf3dd](9baf3dd)), closes [#2237](#2237) * **gh:** preview requests in dry run for issues, labels, runs ([#2826](#2826)) ([c58a50d](c58a50d)), closes [#2235](#2235) ### Bug Fixes * **config:** preserve file mode on write and copy ([#2831](#2831)) ([8028319](8028319)), closes [#2745](#2745) * **config:** report a clear error for merge-key unset ([#2828](#2828)) ([7514766](7514766)), closes [#2656](#2656) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Preserve the permission mode of config files when updating them, create new config files with mode 0600 instead of default umask, and ensure temporary files match source file permissions.
_write_contentinsrc/devops_cli/config/settings.py._copyinsrc/devops_cli/config/write_history.py.tests/config/test_config_file_mode.pyandtests/test_config_write_history.py.devops ci fail-to-pass --base origin/main).Change:
openspec/changes/archive/2026-10-31-2745-config-files-and-their-copies-keep/Closes #2745