feat: introducing declarative config for volcano#35
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a new declarative “project configuration” workflow centered around volcano-config.yaml, shifting reconciliation/validation to the server while the CLI becomes a thin client that parses/interpolates manifests, uploads them for apply (optionally dry-run), and can pull a canonical server-rendered YAML export.
Changes:
- Add
volcano config deploy(with${ENV_VAR}interpolation and--dry-run) andvolcano config pull(with--force) backed by new API endpoints and report rendering. - Expand the config manifest schema (project, databases, variables, buckets/policies, realtime, auth, functions/schedulers, frontends) and adjust tests/docs/starters to match the new semantics.
- Update generated API client models and various log/runtime types to match API shape changes (notably timestamps as RFC3339/time.Time).
Reviewed changes
Copilot reviewed 37 out of 39 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/e2e/localmode/localmode_test.go | Extends local-mode E2E smoke to cover config deploy/pull and variable sync behavior. |
| tests/e2e/api/helpers_fixtures_test.go | Removes a now-obsolete helper for writing a limited config manifest. |
| tests/e2e/api/config_test.go | Replaces prior config E2E with a broader declarative-config workflow test matrix (deploy/pull/dry-run/gating/warnings). |
| README.md | Updates user-facing documentation for declarative config semantics, interpolation, dry-run, and pull behavior. |
| internal/projectinit/starters/README.md | Clarifies why empty declared sections can be harmful under “fully synced” semantics. |
| internal/projectinit/starters/javascript/volcano/volcano-config.yaml | Adds starter guidance comments for the new deploy semantics. |
| internal/projectinit/starters/javascript-hello-world/volcano/volcano-config.yaml | Adds starter guidance comments for the new deploy semantics. |
| internal/projectconfig/service.go | Adds a thin service that applies/pulls config via authenticated sessions/API. |
| internal/projectconfig/manifest.go | Expands manifest schema, adds strict parsing + ${ENV} interpolation, and minimizes local validation. |
| internal/projectconfig/manifest_test.go | Reworks tests to validate parsing/interpolation/JSON shape and new default pull-path behavior. |
| internal/projectconfig/interpolate.go | Implements YAML-node interpolation for string scalar values (${ENV}, $$ escape). |
| internal/projectconfig/deploy.go | Removes legacy client-side reconciliation implementation (now server-owned). |
| internal/projectconfig/deploy_test.go | Removes tests for legacy client-side reconciliation logic. |
| internal/output/projectconfig.go | Adds rendering for server apply reports and 422 validation error lists. |
| internal/output/logs.go | Switches skipped-log filtering to common API types after log model changes. |
| internal/output/functions.go | Updates log rendering to use time.Time timestamps and common API types. |
| internal/logfollow/follow_test.go | Updates log stream test fixtures to use RFC3339 timestamp strings. |
| internal/function/scanner.go | Switches runtime catalog types to common API types. |
| internal/function/scanner_test.go | Updates scanner tests for common API runtime option types. |
| internal/function/packager_test.go | Updates packager tests for common API runtime option types. |
| internal/function/function.go | Updates runtime listing and deployment resolution types to common API types. |
| internal/frontend/frontend.go | Updates frontend deployment resolution types to common API types. |
| internal/cmd/functions/logs.go | Updates terminal-deployment detection to common API deployment type. |
| internal/cmd/functions/logs_test.go | Updates log fixtures to RFC3339 timestamps / updated log schema. |
| internal/cmd/functions/deploy.go | Updates batch failure type to common API type. |
| internal/cmd/frontends/logs.go | Updates terminal-deployment detection to common API deployment type. |
| internal/cmd/frontends/logs_test.go | Updates log fixtures to RFC3339 timestamps / updated log schema. |
| internal/cmd/config/config.go | Reworks config command group: adds deploy --dry-run, adds pull --force, and new error handling/reporting. |
| internal/cmd/config/config_test.go | Replaces legacy config command tests with new apply/pull/dry-run/validation/conflict/old-server coverage. |
| internal/apiclient/common/common.gen.go | Regenerates common API models/enums for new config endpoints and log timestamp changes. |
| internal/apiclient/client.gen.go | Regenerates API client for new config endpoints and related schema changes. |
| internal/api/project_config.go | Adds API wrappers for apply (JSON body) and pull (verbatim YAML) with 422 validation error type. |
| internal/api/log_stream.go | Switches streamed log event type to common API model. |
| internal/api/log_stream_test.go | Updates stream fixtures to RFC3339 timestamps. |
| internal/api/functions.go | Switches runtime/scheduler schedule types to common API models. |
| internal/api/frontends.go | Switches TLS config type to common API model. |
| internal/api/client_test.go | Updates log fixtures to RFC3339 timestamps. |
| go.mod | Promotes go.yaml.in/yaml/v3 to a direct dependency (needed by generated client). |
| .golangci.yml | Configures misspell to ignore API field spelling (signins). |
Files not reviewed (2)
- internal/apiclient/client.gen.go: Generated file
- internal/apiclient/common/common.gen.go: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goes in hand with https://github.com/Kong/volcano-hosting/pull/523