From cde3f52f5c737bf202bf69fc8a813a2517a5d254 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 14 Apr 2026 06:20:07 +0000 Subject: [PATCH] refactor: use isCliProxyNeeded() in docker.go to remove logic duplication The cli-proxy image collection in docker.go duplicated the logic from isCliProxyNeeded() in compiler_difc_proxy.go. Replace the inline check with the existing function to eliminate the duplication and ensure both codepaths stay in sync when the proxy enablement logic changes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- pkg/workflow/docker.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/pkg/workflow/docker.go b/pkg/workflow/docker.go index 25588370af..38bef5149d 100644 --- a/pkg/workflow/docker.go +++ b/pkg/workflow/docker.go @@ -103,13 +103,9 @@ func collectDockerImages(tools map[string]any, workflowData *WorkflowData, actio } } - // Add cli-proxy sidecar container when the cli-proxy is needed (explicitly via - // cli-proxy feature flag, or implicitly via integrity-reactions feature flag) - // and the AWF version supports it. Without this, --skip-pull causes AWF to fail - // because the cli-proxy image was never pulled. - cliProxyNeeded := isFeatureEnabled(constants.CliProxyFeatureFlag, workflowData) || - isFeatureEnabled(constants.IntegrityReactionsFeatureFlag, workflowData) - if cliProxyNeeded && awfSupportsCliProxy(firewallConfig) { + // Add cli-proxy sidecar container when the cli-proxy is needed. + // Without this, --skip-pull causes AWF to fail because the cli-proxy image was never pulled. + if isCliProxyNeeded(workflowData) { cliProxyImage := constants.DefaultFirewallRegistry + "/cli-proxy:" + awfImageTag if !imageSet[cliProxyImage] { images = append(images, cliProxyImage)