Skip to content

feat(cloud): expose service settings management - #746

Merged
sdairs merged 1 commit into
stack/576-backup-bucketsfrom
stack/574-service-settings
Sep 7, 2026
Merged

sdairs merged 1 commit into
stack/576-backup-bucketsfrom
stack/574-service-settings

Conversation

@sdairs

@sdairs sdairs commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

Expose all five beta per-service ClickHouse settings endpoints as cloud service settings list|get|schema|set|unset. Read commands support OAuth, while set and unset follow the existing API-key-only write policy.

settings set accepts repeatable --setting NAME=JSON_VALUE arguments or a JSON settings map from --settings-file (- reads stdin). It preserves JSON value types and serializes that map into the API's required JSON-encoded settings string; malformed JSON and accidental full request wrappers fail before HTTP. Setting names remain dynamic and are validated by the API, with settings schema providing discovery. settings unset idempotently restores one setting's platform default.

Tests cover clap parsing and write classification, minimal and varied typed request construction, plain file input and wrapper rejection, all five real-binary routes, OAuth and API-key authentication, exact PATCH encoding, sparse JSON and human output, API errors, and invalid stdin before HTTP.

Validation:

  • cargo fmt --all --check
  • cargo clippy -p clickhousectl -- -D warnings
  • cargo check -p clickhousectl --no-default-features
  • cargo clippy -p clickhousectl --all-targets --no-default-features -- -D warnings
  • cargo test -p clickhousectl -- --test-threads=1

Closes #574

@iskakaushik iskakaushik left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@sdairs
sdairs merged commit e4a5c8b into main Sep 7, 2026
10 checks passed
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.

Expose per-service ClickHouse settings management

2 participants