feat(config): add versioned JSONC configuration - #235
Conversation
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR introduces a versioned JSONC configuration format, migrates legacy JSON configuration into nested sections, and adds a published JSON Schema.
Confidence Score: 4/5The PR appears safe to merge from a runtime perspective, with the non-blocking requirement that the generated schema URL be aligned with a release tag that actually contains the schema. Legacy migration and JSONC rewrite behavior preserve supported configuration semantics, but generated files currently reference a v1.1.0 schema tag that is not present and may not match the release version. Files Needing Attention: src/user-config.ts, schema/devspace-config.schema.json
|
| Filename | Overview |
|---|---|
| src/user-config.ts | Implements v1 schemas, legacy migration, JSONC loading, and comment-preserving writes; its generated schema URL depends on an unavailable future tag. |
| src/config.ts | Adapts runtime configuration to nested persisted sections while retaining environment-variable precedence and prior defaults. |
| src/cli.ts | Updates initialization, diagnostics, and config mutation commands to read and write the structured v1 configuration. |
| schema/devspace-config.schema.json | Adds the generated v1 JSON Schema, including the same release-tag-dependent identifier. |
| src/user-config.test.ts | Covers legacy migration, JSONC precedence, preservation of comments and unknown fields, variant transitions, and malformed input. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
Legacy[Legacy config.json] --> Migrate[migrateLegacyConfig]
JSONC[config.jsonc] --> Parse[JSONC parse and v1 validation]
Migrate --> Effective[Structured user config]
Parse --> Effective
Env[Environment overrides] --> Runtime[Runtime ServerConfig]
Effective --> Runtime
CLI[init / config set] --> Writer[Comment-preserving JSONC writer]
Writer --> JSONC
Writer --> SchemaRef[Generated $schema URL]
Reviews (1): Last reviewed commit: "test(config): cover jsonc migration and ..." | Re-trigger Greptile
| export const DEVSPACE_CONFIG_SCHEMA_URL = | ||
| "https://raw.githubusercontent.com/Waishnav/devspace/refs/tags/v1.1.0/schema/devspace-config.schema.json"; |
There was a problem hiding this comment.
Generated configurations reference the hard-coded v1.1.0 schema tag, while the package remains at 1.0.7 and the repository has no corresponding tag. Until a release containing this schema exists at that exact tag, editors cannot fetch the schema for validation and completion; publishing the feature under another version would leave the reference stale.
Waishnav
commented
Aug 23, 2026
Closing this stacked PR because the v1.1 configuration/runtime refactor is being collapsed into one review PR. The commits are preserved in the combined branch. |
Waishnav
commented
Aug 23, 2026
Superseded by the combined v1.1 refactor PR #238. |
DevSpace persistent configuration is still a flat JSON and environment-oriented interface. This layer introduces versioned ~/.devspace/config.jsonc as the canonical product configuration, publishes a v1 JSON Schema generated from the runtime codec, and keeps legacy config.json plus environment overrides compatible. Intentional CLI writes preserve comments and unknown fields, while startup never mutates legacy config automatically.
Stacked on #234.
Stack created with GitHub Stacks CLI • Give Feedback 💬