Skip to content

Save the configuration to a TOML configuration file#369

Merged
CGodiksen merged 31 commits intomainfrom
dev/persist-configuration
Dec 11, 2025
Merged

Save the configuration to a TOML configuration file#369
CGodiksen merged 31 commits intomainfrom
dev/persist-configuration

Conversation

@CGodiksen
Copy link
Copy Markdown
Collaborator

Closes #368 by updating the configuration manager so it now persists the configuration to a modelardb.toml configuration file in the root of the local data folder. This file is updated when changes are made to the configuration using the UpdateConfiguration action. If the file is changed manually, the changes are first applied when the server is restarted.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements configuration persistence for ModelarDB-RS by introducing a TOML-based configuration file (modelardb.toml) stored in the root of the local data folder. The configuration is now loaded from this file on server startup and automatically updated when changes are made through the UpdateConfiguration action, providing a persistent state across server restarts.

Key Changes:

  • Configuration is now persisted to a modelardb.toml file that is created on first server startup
  • Configuration updates via the UpdateConfiguration action are saved to disk
  • Configuration structure refactored to separate serializable data from runtime state

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
docs/user/README.md Documents the new modelardb.toml configuration file and its behavior
Cargo.toml Adds toml and serde dependencies for configuration serialization
Cargo.lock Updates lock file with new TOML-related dependencies (toml 0.9.8)
crates/modelardb_server/Cargo.toml Adds toml and serde workspace dependencies to server crate
crates/modelardb_server/src/error.rs Adds error variants for TOML serialization/deserialization failures
crates/modelardb_server/src/context.rs Updates context initialization to use async try_new for configuration manager
crates/modelardb_server/src/storage/mod.rs Changes direct field access to getter methods for thread configuration
crates/modelardb_server/src/remote.rs Updates documentation and error handling for UpdateConfiguration action
crates/modelardb_server/src/configuration.rs Core implementation: splits Configuration struct for serialization, implements file I/O, adds validation, updates all setters to persist changes, and includes comprehensive tests

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@CGodiksen CGodiksen requested a review from chrthomsen December 9, 2025 19:39
@CGodiksen CGodiksen requested a review from chrthomsen December 10, 2025 10:24
@CGodiksen CGodiksen merged commit 8c60d57 into main Dec 11, 2025
7 of 9 checks passed
@CGodiksen CGodiksen deleted the dev/persist-configuration branch December 11, 2025 12:42
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.

Support persisting the node configuration to the Delta Lake

4 participants