MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / ignoreUpdate

Function ignoreUpdate

agent/app/service/app_utils.go:2014–2038  ·  view source on GitHub ↗
(installed model.AppInstall)

Source from the content-addressed store, hash-verified

2012}
2013
2014func ignoreUpdate(installed model.AppInstall) bool {
2015 if installed.App.Type == "php" || installed.Status == constant.StatusInstalling {
2016 return true
2017 }
2018 ignores, _ := appIgnoreUpgradeRepo.List(appDetailRepo.WithAppId(installed.AppId), appIgnoreUpgradeRepo.WithScope("all"))
2019 if len(ignores) > 0 {
2020 return true
2021 }
2022 if installed.App.Key == constant.AppMysql {
2023 majorVersion := getMajorVersion(installed.Version)
2024 appDetails, _ := appDetailRepo.GetBy(appDetailRepo.WithAppId(installed.App.ID))
2025 for _, appDetail := range appDetails {
2026 if strings.HasPrefix(appDetail.Version, majorVersion) && common.CompareVersion(appDetail.Version, installed.Version) {
2027 return false
2028 }
2029 }
2030 return true
2031 }
2032 if installed.App.Key == "sqlbot" {
2033 if common.CompareVersion("1.1.0", installed.Version) {
2034 return true
2035 }
2036 }
2037 return false
2038}
2039
2040func RequestDownloadCallBack(downloadCallBackUrl string) {
2041 if downloadCallBackUrl == "" {

Callers 2

handleInstalledFunction · 0.85
checkAgentUpgradableFunction · 0.85

Calls 5

getMajorVersionFunction · 0.85
ListMethod · 0.65
WithAppIdMethod · 0.65
WithScopeMethod · 0.65
GetByMethod · 0.65

Tested by

no test coverage detected