Merge pull request #2309 from pikasTech/fix/2304-opencode-session-sidebar

fix: use git-enabled OpenCode runtime image
This commit is contained in:
Lyon
2026-06-30 21:14:20 +08:00
committed by GitHub
3 changed files with 6 additions and 1 deletions
+1
View File
@@ -340,6 +340,7 @@ lanes:
observability:
traceExplorerUrlTemplate: /v1/workbench/traces/{trace_id}/events
opencode:
image: 127.0.0.1:5000/hwlab/opencode:1.17.7-git
providerProfile: dsflash-go
providerId: dsflash-go
displayName: AgentRun dsflash-go
+3 -1
View File
@@ -5652,6 +5652,7 @@ function opencodeRuntimeConfigForProfile(deploy, profile) {
const providerProxyBasePath = configString(config.providerProxyBasePath) || "/v1";
const providerProxyBaseURL = configString(config.providerProxyBaseURL) || `http://127.0.0.1:${providerProxyPort}${providerProxyBasePath}`;
return {
image: configString(config.image) || "ghcr.io/anomalyco/opencode:1.17.7",
providerProfile,
providerId,
displayName: configString(config.displayName) || `AgentRun ${providerProfile}`,
@@ -5785,6 +5786,7 @@ function opencodeServerManifest({ profile = "v03", source, deploy = null, catalo
"hwlab.pikastech.local/opencode-model": opencodeConfig.model,
"hwlab.pikastech.local/opencode-provider-base-url": opencodeConfig.baseURL,
"hwlab.pikastech.local/opencode-provider-upstream-base-url": opencodeConfig.upstreamBaseURL,
"hwlab.pikastech.local/opencode-image": opencodeConfig.image,
"hwlab.pikastech.local/opencode-config-sha256": configSha256,
"hwlab.pikastech.local/opencode-api-key-secret-ref": `${apiKeySecretRef.name}/${apiKeySecretRef.key}`,
"hwlab.pikastech.local/agentrun-provider-secret-ref": `${opencodeConfig.agentrunSecretNamespace}/${opencodeConfig.agentrunSecretName}`,
@@ -5865,7 +5867,7 @@ function opencodeServerManifest({ profile = "v03", source, deploy = null, catalo
}],
containers: [{
name,
image: "ghcr.io/anomalyco/opencode:1.17.7",
image: opencodeConfig.image,
imagePullPolicy: "IfNotPresent",
command: ["/bin/sh", "-ec"],
args: ["exec opencode serve --hostname 0.0.0.0 --port 4096"],
+2
View File
@@ -758,6 +758,7 @@ test("v03 render includes JD01 secret-plane smoke on JD01 gitops root", { timeou
assert.equal(opencodeDeployment.metadata?.annotations?.["hwlab.pikastech.local/agentrun-provider-secret-ref"], "agentrun-v02/agentrun-v01-provider-dsflash-go");
assert.equal(opencodeDeployment.metadata?.annotations?.["hwlab.pikastech.local/opencode-provider-base-url"], "http://127.0.0.1:4097/v1");
assert.equal(opencodeDeployment.metadata?.annotations?.["hwlab.pikastech.local/opencode-provider-upstream-base-url"], "https://opencode.ai/zen/go/v1");
assert.equal(opencodeDeployment.metadata?.annotations?.["hwlab.pikastech.local/opencode-image"], "127.0.0.1:5000/hwlab/opencode:1.17.7-git");
assert.equal(opencodeDeployment.metadata?.annotations?.["hwlab.pikastech.local/opencode-provider-proxy-boot-sh"], "deploy/runtime/boot/opencode-provider-proxy.sh");
assert.equal(opencodeDeployment.metadata?.annotations?.["hwlab.pikastech.local/values-printed"], "false");
assert.match(opencodeDeployment.spec?.template?.metadata?.annotations?.["hwlab.pikastech.local/opencode-config-sha256"] ?? "", /^[a-f0-9]{64}$/u);
@@ -767,6 +768,7 @@ test("v03 render includes JD01 secret-plane smoke on JD01 gitops root", { timeou
assert.match(opencodeGitInit.args?.[0] ?? "", /git -C \/workspace init/u);
assert.ok(opencodeGitInit.volumeMounts?.some((entry) => entry.name === "workspace" && entry.mountPath === "/workspace"));
const opencodeContainer = collectContainersFromItem(opencodeDeployment).find((container) => container.name === "opencode-server");
assert.equal(opencodeContainer?.image, "127.0.0.1:5000/hwlab/opencode:1.17.7-git");
assert.deepEqual(opencodeContainer?.command, ["/bin/sh", "-ec"]);
assert.equal(opencodeContainer?.args?.[0], "exec opencode serve --hostname 0.0.0.0 --port 4096");
assert.doesNotMatch(opencodeContainer?.args?.[0] ?? "", /apk add|dl-cdn\.alpinelinux\.org/u, "opencode startup must not depend on runtime apk repository access");