Skip to content

feat: Introduce dataserver and coordinator configuration (part.2)#859

Merged
mattisonchao merged 15 commits intomainfrom
feat.conf.p2
Jan 16, 2026
Merged

feat: Introduce dataserver and coordinator configuration (part.2)#859
mattisonchao merged 15 commits intomainfrom
feat.conf.p2

Conversation

@mattisonchao
Copy link
Copy Markdown
Member

@mattisonchao mattisonchao commented Jan 15, 2026

Motivation

This pull request is part 2 for #848, supporting the YAML file configurations for both dataserver and coordinator, which will help configure the cluster with various configurations. such as TLS, auth, etc

Modification

  • Introduce the dataserver and coordinator YAML file.
  • Introduce a configuration schema to help users configure it with IDEA.
  • Introduce a tool to help generate the schema based on the latest struct. oxia config create-schema
  • Add some tests for coverage.

What next?

  • Support watching configurations to dynamically change some memory status.

@mattisonchao
Copy link
Copy Markdown
Member Author

I need to consider if moving the schema to the release is a better choice?

@mattisonchao mattisonchao marked this pull request as draft January 15, 2026 09:17
Copy link
Copy Markdown
Contributor

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 pull request introduces YAML configuration file support for both the dataserver and coordinator components, along with JSON schemas for IDE integration and a schema generation tool. The changes aim to improve configuration management by allowing operators to use YAML files instead of CLI flags, with support for TLS, authentication, and other cluster settings.

Changes:

  • Added YAML configuration loading infrastructure with the codec.ReadConf function
  • Created JSON schemas for dataserver and coordinator configurations with IDE support
  • Added a config create-schema command to generate schemas from Go structs
  • Updated coordinator and dataserver commands to support a --conf flag for loading YAML configuration

Reviewed changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
conf/schema/dataserver.json JSON schema for dataserver configuration with validation rules
conf/schema/coordinator.json JSON schema for coordinator configuration with validation rules
conf/dataserver.yaml Empty YAML template with schema reference for IDE support
conf/coordinator.yaml Empty YAML template with schema reference for IDE support
common/codec/options.go Configuration loading utility that reads YAML and applies defaults/validation
common/codec/options_test.go Unit tests for configuration loading functionality
common/codec/config_integration_test.go Integration tests with actual dataserver/coordinator configurations
cmd/server/cmd.go Updated to support --conf flag for YAML configuration
cmd/server/cmd_test.go Tests for server configuration loading
cmd/coordinator/cmd.go Updated to support --conf flag and renamed cluster-conf flag
cmd/coordinator/cmd_test.go Tests for coordinator configuration loading
cmd/config/cmd.go Root command for configuration utilities
cmd/config/createschema/cmd.go Schema generation command using jsonschema reflection
cmd/main.go Added config command to main CLI
cmd/go.mod Added jsonschema generation dependencies
cmd/go.sum Updated dependency checksums
Makefile Added generate-conf-schema target for schema generation

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

@mattisonchao mattisonchao marked this pull request as ready for review January 15, 2026 15:37
@mattisonchao mattisonchao requested a review from Copilot January 15, 2026 16:15
Copy link
Copy Markdown
Contributor

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

Copilot reviewed 15 out of 16 changed files in this pull request and generated 3 comments.


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

Copy link
Copy Markdown
Contributor

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

Copilot reviewed 30 out of 32 changed files in this pull request and generated 3 comments.


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

mattisonchao and others added 2 commits January 16, 2026 23:47
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@mattisonchao mattisonchao merged commit 7a1212a into main Jan 16, 2026
10 of 11 checks passed
@mattisonchao mattisonchao deleted the feat.conf.p2 branch January 16, 2026 16:08
mattisonchao added a commit that referenced this pull request Jan 18, 2026
### Motivation

#859 introduced the server-side configuration, but it is breaking the
existing cluster configuration parameter name.

### Modification


- Revert the breaking change and keep compatibility with the cluster
config `conf` parameter.
- Introduce `--sconfig` as server configuration path parameter.
- Introduce `--cconfig` as cluster configuration path parameter.
- Deprecated the `conf` parameter and use the new `--cconfig` instead.
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.

2 participants