From 43a99a5783db543bf3513158ed9cdc7a44f05991 Mon Sep 17 00:00:00 2001 From: Agniva De Sarker Date: Fri, 15 Oct 2021 19:29:06 +0530 Subject: [PATCH] Move cloud init back to initEnterprise (#18668) * Move cloud init back to initEnterprise ```release-note NONE ``` * Remove debug lines ```release-note NONE ``` Co-authored-by: Mattermod --- app/enterprise.go | 3 +++ app/server.go | 8 -------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/app/enterprise.go b/app/enterprise.go index ab434dadfa..c1d2a778d4 100644 --- a/app/enterprise.go +++ b/app/enterprise.go @@ -238,4 +238,7 @@ func (s *Server) initEnterprise() { } }) } + if cloudInterface != nil { + s.Cloud = cloudInterface(s) + } } diff --git a/app/server.go b/app/server.go index 7bf6de85ba..a98668276f 100644 --- a/app/server.go +++ b/app/server.go @@ -462,14 +462,6 @@ func NewServer(options ...Option) (*Server, error) { }) - // This enterprise init should happen after the store is set - // but we don't want to move the s.initEnterprise() call because - // we had side-effects with that in the past and needs further - // investigation - if cloudInterface != nil { - s.Cloud = cloudInterface(s) - } - s.telemetryService = telemetry.New(s, s.Store, s.SearchEngine, s.Log) emailService, err := email.NewService(email.ServiceConfig{