Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
75326c8
config: sample describes every key of every section once
LeeroyHannigan Oct 31, 2026
cb16a64
config: tests pin extenddb.sample.toml to the configuration structs
LeeroyHannigan Oct 31, 2026
283f836
docs: generate docs/configuration.md from extenddb.sample.toml
LeeroyHannigan Oct 31, 2026
c498768
docs: Reference sidebar and admin guide point at the configuration page
LeeroyHannigan Oct 31, 2026
23ec8b3
config: precedence note names the one CLI override
LeeroyHannigan Oct 31, 2026
3ad4b50
config: sample text follows the code on limits, logging, overrides an…
LeeroyHannigan Oct 31, 2026
f56366d
docs: configuration page shows examples for no-default keys and links…
LeeroyHannigan Oct 31, 2026
a95184f
config: sample tests require every struct field, including optional ones
LeeroyHannigan Oct 31, 2026
9f91970
docs: table code spans break inside a word at phone widths
LeeroyHannigan Oct 31, 2026
37bb141
docs: configuration tables keep key names and defaults whole at phone…
LeeroyHannigan Oct 31, 2026
7612ce3
docs(config): every key has an environment form; every section refuse…
LeeroyHannigan Oct 31, 2026
3dfd5a9
Merge feat/docs-content-sweep into feat/docs-config-reference
LeeroyHannigan Nov 5, 2026
00967a6
Merge feat/docs-content-sweep into feat/docs-config-reference
LeeroyHannigan Nov 16, 2026
a34d001
fix(backup-store): derive Serialize on the store configuration types
LeeroyHannigan Nov 16, 2026
9b56404
test(config): pin the backup store sections of the sample
LeeroyHannigan Nov 16, 2026
1064211
docs(backup): fix three links to headings this branch removed
LeeroyHannigan Nov 16, 2026
36a847f
docs: regenerate the configuration page from the merged sample
LeeroyHannigan Nov 16, 2026
797749e
docs(config): restore three facts of main's key rows in the sample
LeeroyHannigan Nov 16, 2026
681a1b6
Merge feat/docs-content-sweep into feat/docs-config-reference
LeeroyHannigan Nov 18, 2026
b35eeec
test(config): pin the [auth.encryption] section of the sample to Encr…
LeeroyHannigan Nov 18, 2026
6e937bf
docs(config): split two sentences of the sample's [auth.encryption] keys
LeeroyHannigan Nov 18, 2026
dd63033
Merge feat/docs-content-sweep into feat/docs-config-reference
LeeroyHannigan Nov 19, 2026
f4a77be
docs(config): environment text describes this branch, not #546
LeeroyHannigan Nov 25, 2026
8205510
docs(config): eight sample descriptions corrected against the code
LeeroyHannigan Nov 25, 2026
f14bb58
test(config): pin the sample to the derive's field list and serde's d…
LeeroyHannigan Nov 25, 2026
e0b28d4
test(config): one rule for the "No default." marker in the tests and …
LeeroyHannigan Nov 25, 2026
3f9c43d
build(backup-store): Serialize on the store configuration types behin…
LeeroyHannigan Nov 25, 2026
f61164c
test(cli): remove the sample key check that the generated page satisf…
LeeroyHannigan Nov 25, 2026
7685ebc
docs(console): add the Configuration page to the console and PDF doc set
LeeroyHannigan Nov 25, 2026
b241f48
docs(site): scope the narrow-screen table rules to the Configuration …
LeeroyHannigan Nov 25, 2026
be98852
docs(site): drop the generator's own diff from the check of the page
LeeroyHannigan Nov 25, 2026
b66caf7
Merge feat/docs-content-sweep into feat/docs-config-reference
LeeroyHannigan Nov 25, 2026
00e67c4
docs(install): point the backup store link at the admin guide's section
LeeroyHannigan Nov 25, 2026
3befe33
build(config): declare the backup-store dev-dependency by path
LeeroyHannigan Nov 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/docs-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ on:
paths:
- 'docs/**'
- 'website/**'
- 'extenddb.sample.toml'
- 'Cargo.toml'
- '.github/workflows/docs-site.yml'
push:
branches: [main]
paths:
- 'docs/**'
- 'website/**'
- 'extenddb.sample.toml'
- 'Cargo.toml'
- '.github/workflows/docs-site.yml'
workflow_dispatch:
Expand Down Expand Up @@ -61,6 +63,9 @@ jobs:
- name: Typecheck
working-directory: website
run: npm run typecheck
- name: Configuration reference matches extenddb.sample.toml
working-directory: website
run: npm run check:config
- name: Build
working-directory: website
env:
Expand Down
5 changes: 5 additions & 0 deletions crates/backup-store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ uuid = { workspace = true }
# Failure-injection seam for the crate's own test suite; not part of the
# supported API surface and never enabled by production consumers.
test-util = []
# `Serialize` on the four configuration types, for the tests of
# `extenddb-config` that pin `extenddb.sample.toml` to them. Off in the
# library build, so a value that can carry an endpoint's user information
# has no serialize path there.
serialize = []

[target.'cfg(unix)'.dependencies]
libc = { workspace = true }
Expand Down
4 changes: 4 additions & 0 deletions crates/backup-store/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ use serde::Deserialize;

/// Which store implementation `[backup.store]` selects.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Deserialize)]
#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
#[serde(rename_all = "lowercase")]
pub enum BackupStoreKind {
/// Local directory store. The default: local development works with no
Expand Down Expand Up @@ -193,6 +194,7 @@ impl BackupStoreKind {
/// key (`store`) in its `[backup]` model rather than flattening it; that
/// keeps one definition of these fields and unknown-field rejection on both.
#[derive(Debug, Clone, PartialEq, Eq, Deserialize)]
#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
#[serde(deny_unknown_fields)]
pub struct BackupStoreConfig {
/// Selected store kind; `filesystem` when absent.
Expand All @@ -208,6 +210,7 @@ pub struct BackupStoreConfig {

/// `[backup.store.filesystem]` settings.
#[derive(Debug, Clone, PartialEq, Eq, Deserialize)]
#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
#[serde(deny_unknown_fields)]
pub struct FilesystemStoreConfig {
/// Root directory for backup objects. Must exist at startup.
Expand All @@ -219,6 +222,7 @@ pub struct FilesystemStoreConfig {
/// user information, which `open` refuses but a log of the configuration
/// written before `open` would otherwise carry.
#[derive(Clone, PartialEq, Eq, Deserialize)]
#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
#[serde(deny_unknown_fields)]
pub struct S3StoreConfig {
/// Destination bucket.
Expand Down
2 changes: 2 additions & 0 deletions crates/config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,6 @@ anyhow = { workspace = true }
tracing = { workspace = true }

[dev-dependencies]
# The sample pin tests serialize the backup store configuration types.
extenddb-backup-store = { path = "../backup-store", features = ["serialize"] }
tempfile = "3"
1 change: 1 addition & 0 deletions crates/config/src/backup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ pub const DEFAULT_ROOT_DIR_NAME: &str = "backups";
pub const DEFAULT_SPOOL_DIR_NAME: &str = "backup-spool";

#[derive(Debug, Clone, Deserialize, PartialEq, Eq)]
#[cfg_attr(test, derive(serde::Serialize))]
#[serde(deny_unknown_fields)]
pub struct BackupConfig {
/// Uncompressed bytes per data file; a file closes once it reaches this,
Expand Down
4 changes: 2 additions & 2 deletions crates/config/src/encryption.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

//! The `[auth.encryption]` section.

use serde::{Deserialize, Deserializer};
use serde::{Deserialize, Deserializer, Serialize};

use crate::expand_tilde;

/// The `[auth.encryption]` section: the key-encryption key (KEK) file and the
/// locked memory rule.
#[derive(Debug, Clone, Deserialize)]
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(deny_unknown_fields)]
pub struct EncryptionConfig {
/// Path of the KEK file. Not set: the server uses the catalog key in the
Expand Down
19 changes: 12 additions & 7 deletions crates/config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use std::path::PathBuf;

use extenddb_core::limits::LimitsConfig;
use serde::Deserialize;
use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, Deserialize)]
#[serde(deny_unknown_fields)]
Expand Down Expand Up @@ -51,7 +51,7 @@ pub struct AppConfig {
}

/// Configuration for import or export allowed paths.
#[derive(Debug, Clone, Default, Deserialize)]
#[derive(Debug, Clone, Default, Deserialize, Serialize)]
#[serde(deny_unknown_fields)]
pub struct ImportExportPathConfig {
/// Allowed directories. All file paths are canonicalized and must resolve
Expand All @@ -60,7 +60,7 @@ pub struct ImportExportPathConfig {
pub paths: Vec<String>,
}

#[derive(Debug, Clone, Deserialize)]
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(deny_unknown_fields)]
pub struct ServerConfig {
#[serde(default = "default_bind_addr")]
Expand Down Expand Up @@ -123,7 +123,7 @@ impl ServerConfig {
///
/// TLS is always enabled. The `enabled` field is accepted for backward
/// compatibility but the server refuses to start if set to `false`.
#[derive(Debug, Clone, Deserialize)]
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(deny_unknown_fields)]
pub struct TlsConfig {
/// TLS is mandatory. Accepted for backward compatibility; the server
Expand Down Expand Up @@ -272,7 +272,7 @@ impl<'de> serde::Deserialize<'de> for StorageConfig {
}
}

#[derive(Debug, Clone, Deserialize)]
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(deny_unknown_fields)]
pub struct AuthConfig {
/// Auth provider: `"builtin"` (`SigV4` + IAM policies). The `"none"` value
Expand Down Expand Up @@ -306,7 +306,7 @@ impl Default for AuthConfig {
/// Each `*_seconds` field has a sensible default; operators only need to
/// override values when they want to deviate from the docs. The configuration
/// is static — values are read once at startup.
#[derive(Debug, Clone, Deserialize)]
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(deny_unknown_fields)]
pub struct AuthCacheConfigToml {
/// Master switch. When `false`, all caches operate in pass-through mode
Expand Down Expand Up @@ -359,7 +359,7 @@ fn default_cache_max_entries() -> u64 {
10_000
}

#[derive(Debug, Clone, Deserialize)]
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(deny_unknown_fields)]
pub struct LoggingConfig {
#[serde(default = "default_log_level")]
Expand Down Expand Up @@ -565,6 +565,11 @@ mod encryption;
pub use display::{MASK, build_config_entries, should_redact};
pub use encryption::EncryptionConfig;

#[cfg(test)]
mod sample_toml_support;
#[cfg(test)]
mod sample_toml_tests;

#[cfg(test)]
mod tests {
use super::*;
Expand Down
Loading
Loading