feat: Introduce dataserver and coordinator configuration (part.2)#859
feat: Introduce dataserver and coordinator configuration (part.2)#859mattisonchao merged 15 commits intomainfrom
Conversation
|
I need to consider if moving the schema to the release is a better choice? |
There was a problem hiding this comment.
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.ReadConffunction - Created JSON schemas for dataserver and coordinator configurations with IDE support
- Added a
config create-schemacommand to generate schemas from Go structs - Updated coordinator and dataserver commands to support a
--confflag 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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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>
### 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.
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
oxia config create-schemaWhat next?