From 34e48d5a335972efdf1cf9124b2938aa3de9d37d Mon Sep 17 00:00:00 2001 From: Wei-Yu Kao <115421902+wayner0628@users.noreply.github.com> Date: Sun, 1 Dec 2024 19:55:53 -0800 Subject: [PATCH] [copilot] rename sidecar to uploader (#6043) * rename all occurences Signed-off-by: wayner0628 * Revert Signed-off-by: wayner0628 * rename upload container Signed-off-by: wayner0628 * add test Signed-off-by: wayner0628 --------- Signed-off-by: wayner0628 --- flyteplugins/go/tasks/pluginmachinery/flytek8s/copilot.go | 2 +- .../go/tasks/pluginmachinery/flytek8s/copilot_test.go | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/flyteplugins/go/tasks/pluginmachinery/flytek8s/copilot.go b/flyteplugins/go/tasks/pluginmachinery/flytek8s/copilot.go index 427dae9978..a5e5e70099 100644 --- a/flyteplugins/go/tasks/pluginmachinery/flytek8s/copilot.go +++ b/flyteplugins/go/tasks/pluginmachinery/flytek8s/copilot.go @@ -20,7 +20,7 @@ import ( ) const ( - flyteSidecarContainerName = "sidecar" + flyteSidecarContainerName = "uploader" flyteInitContainerName = "downloader" ) diff --git a/flyteplugins/go/tasks/pluginmachinery/flytek8s/copilot_test.go b/flyteplugins/go/tasks/pluginmachinery/flytek8s/copilot_test.go index 182354d07c..f989e57567 100644 --- a/flyteplugins/go/tasks/pluginmachinery/flytek8s/copilot_test.go +++ b/flyteplugins/go/tasks/pluginmachinery/flytek8s/copilot_test.go @@ -4,6 +4,7 @@ import ( "context" "encoding/base64" "reflect" + "strings" "testing" "time" @@ -107,6 +108,12 @@ func TestFlyteCoPilotContainer(t *testing.T) { assert.Error(t, err) cfg.Memory = old }) + + t.Run("sidecar-container-name-change", func(t *testing.T) { + c, err := FlyteCoPilotContainer(flyteSidecarContainerName, cfg, []string{"hello"}) + assert.NoError(t, err) + assert.Equal(t, "uploader", strings.Split(c.Name, "-")[1]) + }) } func TestDownloadCommandArgs(t *testing.T) {