From 951ab2502e69886115a743a9032a6ce1f2d1fb8c Mon Sep 17 00:00:00 2001 From: CityFun <31820853+zhengkunwang223@users.noreply.github.com> Date: Wed, 30 Jul 2025 12:06:51 +0800 Subject: [PATCH] fix: Resolve the issue of ignoring MySQL failures (#9734) Refs https://github.com/1Panel-dev/1Panel/issues/9718 --- agent/app/dto/response/app_ignore_upgrade.go | 2 +- agent/app/service/app_ingore_upgrade.go | 2 +- agent/app/service/app_utils.go | 7 +++- frontend/src/api/interface/app.ts | 2 +- .../app-store/installed/ignore/index.vue | 40 ++++++++----------- 5 files changed, 25 insertions(+), 28 deletions(-) diff --git a/agent/app/dto/response/app_ignore_upgrade.go b/agent/app/dto/response/app_ignore_upgrade.go index 60eba45d4..570fc55a6 100644 --- a/agent/app/dto/response/app_ignore_upgrade.go +++ b/agent/app/dto/response/app_ignore_upgrade.go @@ -6,5 +6,5 @@ type AppIgnoreUpgradeDTO struct { AppDetailID uint `json:"appDetailID"` Scope string `json:"scope"` Version string `json:"version"` - Icon string `json:"icon"` + Name string `json:"name"` } diff --git a/agent/app/service/app_ingore_upgrade.go b/agent/app/service/app_ingore_upgrade.go index 49fcc5866..720b6a071 100644 --- a/agent/app/service/app_ingore_upgrade.go +++ b/agent/app/service/app_ingore_upgrade.go @@ -40,7 +40,7 @@ func (a AppIgnoreUpgradeService) List() ([]response.AppIgnoreUpgradeDTO, error) _ = appIgnoreUpgradeRepo.Delete(repo.WithByID(ignore.ID)) continue } - dto.Icon = app.Icon + dto.Name = app.Name if ignore.Scope == "version" { appDetail, err := appDetailRepo.GetFirst(repo.WithByID(ignore.AppDetailID)) if errors.Is(err, gorm.ErrRecordNotFound) { diff --git a/agent/app/service/app_utils.go b/agent/app/service/app_utils.go index cbfe6e0fa..cc25018a2 100644 --- a/agent/app/service/app_utils.go +++ b/agent/app/service/app_utils.go @@ -1764,6 +1764,10 @@ func ignoreUpdate(installed model.AppInstall) bool { if installed.App.Type == "php" || installed.Status == constant.StatusInstalling { return true } + ignores, _ := appIgnoreUpgradeRepo.List(appDetailRepo.WithAppId(installed.AppId), appIgnoreUpgradeRepo.WithScope("all")) + if len(ignores) > 0 { + return true + } if installed.App.Key == constant.AppMysql { majorVersion := getMajorVersion(installed.Version) appDetails, _ := appDetailRepo.GetBy(appDetailRepo.WithAppId(installed.App.ID)) @@ -1774,8 +1778,7 @@ func ignoreUpdate(installed model.AppInstall) bool { } return true } - ignores, _ := appIgnoreUpgradeRepo.List(appDetailRepo.WithAppId(installed.AppId), appIgnoreUpgradeRepo.WithScope("all")) - return len(ignores) > 0 + return false } func RequestDownloadCallBack(downloadCallBackUrl string) { diff --git a/frontend/src/api/interface/app.ts b/frontend/src/api/interface/app.ts index e3de49610..9cd98aefe 100644 --- a/frontend/src/api/interface/app.ts +++ b/frontend/src/api/interface/app.ts @@ -282,7 +282,7 @@ export namespace App { name: string; detailID: number; version: string; - icon: string; + scope: string; } export interface AppUpdateVersionReq { diff --git a/frontend/src/views/app-store/installed/ignore/index.vue b/frontend/src/views/app-store/installed/ignore/index.vue index 58e6a8ea1..ffdc25469 100644 --- a/frontend/src/views/app-store/installed/ignore/index.vue +++ b/frontend/src/views/app-store/installed/ignore/index.vue @@ -1,29 +1,22 @@