Skip to content

Conversation

cgwalters
Copy link
Member

The ostree config set CLI should really disallow writing invalid values. To implement that, add a new API that also reloads to the new config, and
rolls back on failure.

Closes: #1827

The `ostree config set` CLI should really disallow
writing invalid values. To implement that, add a new
API that also *reloads* to the new config, and
rolls back on failure.

Closes: ostreedev#1827

Signed-off-by: Colin Walters <walters@verbum.org>
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new API ostree_repo_write_config_and_reload to validate configuration changes before writing them to disk, enhancing the robustness of ostree's configuration management. I've identified a potential inconsistency issue and provided a fix. Additionally, I've suggested updating the test suite to reflect the new number of tests.

@cgwalters cgwalters mentioned this pull request Jul 9, 2025
33 tasks
Copy link
Member

@jmarrero jmarrero left a comment

Choose a reason for hiding this comment

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

lgtm

@jmarrero jmarrero merged commit ab48247 into ostreedev:main Jul 10, 2025
26 checks passed
@r4f4 r4f4 mentioned this pull request Jul 10, 2025
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.

ostree config set should not write out new config file if new set value is invalid
2 participants