From 53a7347bea4af7c3192c4e2133ebf015c0cb13be Mon Sep 17 00:00:00 2001 From: CityFun <31820853+zhengkunwang223@users.noreply.github.com> Date: Thu, 10 Sep 2026 18:11:26 +0800 Subject: [PATCH] fix: Fix an issue with pulling images when upgrading OpenList. (#13776) --- agent/app/service/app_upgrade.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/agent/app/service/app_upgrade.go b/agent/app/service/app_upgrade.go index 0d19b8784..32a47d62b 100644 --- a/agent/app/service/app_upgrade.go +++ b/agent/app/service/app_upgrade.go @@ -725,6 +725,20 @@ func renderUpgradeEnv(install *model.AppInstall, original []byte) ([]byte, error return nil, err } handleMap(envs, params) + if install.App.Key == "openlist" { + // The upgrade script updates this too late for the pre-pull phase. + image := "openlistteam/openlist:v" + strings.TrimPrefix(install.Version, "v") + if preInstalled := params["PRE_INSTALLED"]; preInstalled != "" { + image += "-" + preInstalled + } + params["OPENLIST_IMAGE"] = image + envs["OPENLIST_IMAGE"] = image + content, err := json.Marshal(envs) + if err != nil { + return nil, err + } + install.Env = string(content) + } if install.App.Key == constant.AppOpenresty { for _, key := range []string{"CONTAINER_PACKAGE_URL", "RESTY_ADD_PACKAGE_BUILDDEPS", "RESTY_CONFIG_OPTIONS_MORE"} { if value, ok := originalEnv[key]; ok {