feat: support local mode using dedicated localmode image#5
Conversation
a1de5f1 to
d4595aa
Compare
There was a problem hiding this comment.
Pull request overview
Updates Volcano CLI local-mode defaults to use the new dedicated local server image tag (kong/volcano:local-nightly) instead of the shared nightly tag, and aligns unit/e2e expectations accordingly.
Changes:
- Switch local-mode default server image to
kong/volcano:local-nightlyand update related unit/e2e tests. - Update docker-compose template fallback image to
kong/volcano:local-nightly. - Adjust local-mode start command help text and add workflow commentary around CI image pinning.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/e2e/localmode/localmode_test.go | Updates e2e default VOLCANO_IMAGE to local-nightly when unset. |
| internal/localmode/start_test.go | Updates unit test assertions and env stubs to local-nightly. |
| internal/localmode/service.go | Changes local-mode default image constant to local-nightly. |
| internal/localmode/compose_test.go | Updates compose environment tests to expect local-nightly. |
| internal/localmode/assets/docker-compose.template.yml | Updates compose template fallback image to local-nightly. |
| internal/cmd/localmode/localmode.go | Updates start command help example image tag. |
| .github/workflows/check.yml | Adds commentary for CI image pinning in localmode-e2e job. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
swkeever
left a comment
There was a problem hiding this comment.
Found 1 review finding.
| - name: Verify local-mode image exists | ||
| run: | | ||
| set -euo pipefail | ||
| docker manifest inspect kong/volcano:local-nightly >/dev/null |
There was a problem hiding this comment.
[P1] Use a published image tag for local-mode
With the current registry state, kong/volcano:local-nightly does not resolve (docker manifest inspect returns no such manifest), so every localmode-e2e workflow run will fail at this new check before tests start. The same tag is also now the CLI default, so users running volcano start without VOLCANO_IMAGE will hit the same pull failure; publish this tag before merging or keep the default/CI on an existing published image.
Suggested fix: Address this review finding.
4e04a9c to
2960f9a
Compare
Local Image Refactor CLI Plan
This document tracks CLI-side work needed to support the hosting repository split into separate local and cloud server images.
Goal
The CLI should run the local development stack against the local-only server image.
kong/volcano:local-nightlykong/volcano:cloud-nightlyThe CLI should continue to support
VOLCANO_IMAGEoverrides so developers and CI can pin a digest or test image.Current Behavior
internal/localmode/service.godefaultsdefaultVolcanoImagetokong/volcano:nightly.internal/localmode/compose.goresolves the final image in this order: default,.env.local, processVOLCANO_IMAGE.internal/localmode/assets/docker-compose.template.ymlhas a fallback${VOLCANO_IMAGE:-kong/volcano:latest}, but Go injects a resolvedVOLCANO_IMAGE, so the template fallback is rarely used.internal/localmode/info.goexpects/app/volcano-hosting local info --format jsoninside thevolcano-servercontainer.Supported Local Feature Set
The local image must support the command surface currently exposed under local mode:
volcano start,volcano status,volcano stop,volcano restartvolcano databasesvolcano functionsvolcano functions schedulersvolcano storagevolcano variablesvolcano config deployvolcano migrationsvolcano resetNot currently exposed as local commands:
Checklist
internal/localmode/service.godefault image tokong/volcano:local-nightly.internal/cmd/localmode/localmode.gohelp text to showVOLCANO_IMAGE=kong/volcano:local-nightly volcano start.internal/localmode/assets/docker-compose.template.ymlfallback image tokong/volcano:local-nightlyfor consistency.tests/e2e/localmode/localmode_test.gofromkong/volcano:nightlytokong/volcano:local-nightly..github/workflows/check.ymlpinned image tag/digest once the new local image is published. CI remains pinned to the last published image until hosting publisheskong/volcano:local-nightly.VOLCANO_IMAGEoverride in command help and project docs..env.localoverride behavior unchanged.VOLCANO_IMAGEtaking precedence over.env.local.volcano-server,volcano-postgres,volcano-redis.volcano./app/volcano-hosting.local info --format jsoncontract unchanged.Verification Checklist
go test ./internal/localmode/...go test ./internal/cmd/localmode/...go test ./...VOLCANO_IMAGE=kong/volcano:local-nightly volcano startvolcano statusvolcano databases listvolcano functions listvolcano storage bucket listvolcano stopCoordination With Hosting
kong/volcano:local-nightlyfromDockerfilebuilt withgo build -tags local.kong/volcano:cloud-nightlyfromDockerfile.serverbuilt without local tags./app/volcano-hosting local info --format jsonstable.internal/localmode/info.go.