Skip to content

Commit

Permalink
Only send reporting info for embedded clusters (#4766)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgalsaleh authored Jul 16, 2024
1 parent 4b2701d commit 07dc36e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions pkg/updatechecker/updatechecker.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,8 @@ func Configure(a *apptypes.App, updateCheckerSpec string) error {
appId := a.GetID()
appSlug := a.GetSlug()
isAirgap := a.GetIsAirgap()
isEC := util.IsEmbeddedCluster()

if isAirgap || isEC {
if isAirgap {
return nil
}

Expand Down Expand Up @@ -112,6 +111,14 @@ func Configure(a *apptypes.App, updateCheckerSpec string) error {
jobAppSlug := appSlug

_, err := job.AddFunc(cronSpec, func() {
// don't check for updates if it's an embedded cluster, only send reporting info
if util.IsEmbeddedCluster() {
if err := reporting.GetReporter().SubmitAppInfo(jobAppID); err != nil {
logger.Debugf("failed to submit app info for app %s", jobAppSlug)
}
return
}

logger.Debug("checking updates for app", zap.String("slug", jobAppSlug))

opts := types.CheckForUpdatesOpts{
Expand Down

0 comments on commit 07dc36e

Please sign in to comment.