From 87cf359ef6663a1355518d9508d9bbe53da6c29f Mon Sep 17 00:00:00 2001 From: panxiao81 Date: Mon, 21 Sep 2026 08:22:56 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=A0=87=E8=AE=B0=20OpenSandbox=20Runne?= =?UTF-8?q?r=20workload?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/opensandboxbackend/backend_test.go | 2 +- internal/taskworker/worker.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/opensandboxbackend/backend_test.go b/internal/opensandboxbackend/backend_test.go index 34f188c..4f8dfc0 100644 --- a/internal/opensandboxbackend/backend_test.go +++ b/internal/opensandboxbackend/backend_test.go @@ -90,7 +90,7 @@ func TestCreateUsesPoolAndPersistsRecoveryMetadata(t *testing.T) { if err != nil { t.Fatal(err) } - if lifecycle.created.Extensions["poolRef"] != "ci-vm" || lifecycle.created.Metadata[assignmentMetadata] != assignment().ID || lifecycle.created.Env["CI_SPIFFE_ID"] != assignment().Identity.SPIFFEID || executor.Name != "sandbox-42" { + if lifecycle.created.Extensions["poolRef"] != "ci-vm" || lifecycle.created.Metadata[assignmentMetadata] != assignment().ID || lifecycle.created.Metadata["ci.ddupan.top/runner"] != "true" || lifecycle.created.Env["CI_SPIFFE_ID"] != assignment().Identity.SPIFFEID || executor.Name != "sandbox-42" { t.Fatalf("request=%#v executor=%#v", lifecycle.created, executor) } if lifecycle.created.Env["CI_RUNNER_CAPABILITY"] != "capability" { diff --git a/internal/taskworker/worker.go b/internal/taskworker/worker.go index e52a9be..6c3b703 100644 --- a/internal/taskworker/worker.go +++ b/internal/taskworker/worker.go @@ -178,6 +178,7 @@ func (w Worker) launchSpec(assignment taskassignment.Assignment) (LaunchSpec, er func BackendMetadata(assignment taskassignment.Assignment) Metadata { return Metadata{ Labels: map[string]string{ + "ci.ddupan.top/runner": "true", "ci.ddupan.top/assignment-id": assignment.ID, "ci.ddupan.top/task-id": strconv.FormatInt(assignment.Task.GetId(), 10), "ci.ddupan.top/backend": string(assignment.Backend),