Suppress SiteURL log error when in CI or local_testing mode (#34982)

This commit is contained in:
Christopher Poile 2026-01-20 14:58:08 -05:00 committed by GitHub
parent fde4393144
commit dcda5304ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -384,7 +384,10 @@ func NewServer(options ...Option) (*Server, error) {
}
if _, err = url.ParseRequestURI(*s.platform.Config().ServiceSettings.SiteURL); err != nil {
mlog.Error("SiteURL must be set. Some features will operate incorrectly if the SiteURL is not set. See documentation for details: https://mattermost.com/pl/configure-site-url")
// Don't spam the logs when in CI or local testing mode
if !(os.Getenv("IS_CI") == "true" || os.Getenv("IS_LOCAL_TESTING") == "true") {
mlog.Error("SiteURL must be set. Some features will operate incorrectly if the SiteURL is not set. See documentation for details: https://mattermost.com/pl/configure-site-url")
}
}
// Start email batching because it's not like the other jobs