Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[master] redesign configuration Interface #3164

Open
7 tasks
tusharmath opened this issue Nov 27, 2024 · 4 comments · May be fixed by #3195
Open
7 tasks

[master] redesign configuration Interface #3164

tusharmath opened this issue Nov 27, 2024 · 4 comments · May be fixed by #3195

Comments

@tusharmath
Copy link
Contributor

tusharmath commented Nov 27, 2024

  • Split runtime config and schema config
  • Create schema config from ServiceDocument
  • Validation should contain Position information
  • Merge should only happen for schema config
  • CLI should take schema and runtime config separately
  • Drop Json and YML options for creating Schema configurations.
  • Add a ServiceDocument -> ServiceDocument validation before ServiceDocument -> Blueprint.
@tusharmath
Copy link
Contributor Author

To split configurations we can consider the following refactor on Config

// After (v2)
pub enum Config {
    SchemaConfig(SchemaConfig),
    RuntimeConfig(RuntimeConfig),
}

// Merge only Schema
pub struct SchemaConfig {
    pub schema: RootSchema,
    pub types: BTreeMap<String, Type>,
    pub unions: BTreeMap<String, Union>,
    pub enums: BTreeMap<String, Enum>,  
}

pub struct RuntimeConfig {
    pub server: Server,
    pub upstream: Upstream,
    pub telemetry: Telemetry,
    pub links: Vec<Link>,    
}

@ssddOnTop ssddOnTop assigned ssddOnTop and unassigned ssddOnTop Nov 27, 2024
@tusharmath
Copy link
Contributor Author

tusharmath commented Dec 3, 2024

Phase 1

  • Merge on Config should ignore server, upstream and telemetry (Alphabetical order).
  • server, upstream and telemetry should be read from root configuration.
  • Merge links into root configuration.

Phase 2

  • Merge directives (Make all directives repeatable).

Phase 3

  • Support input types in Config
  • Make Config sub-type of ServiceDocument

@meskill
Copy link
Contributor

meskill commented Dec 4, 2024

pr #3190 for phase 1

For phase 2 the multiple directives are already done by #3124

@meskill
Copy link
Contributor

meskill commented Dec 4, 2024

  • Make Config sub-type of ServiceDocument

What does it mean?

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 a pull request may close this issue.

3 participants