From f776ca35507f6b599b94c3cb69e440e88fbda34c Mon Sep 17 00:00:00 2001 From: andrii-codefresh Date: Fri, 27 Oct 2023 00:18:47 +0300 Subject: [PATCH] Revert "logs-4" This reverts commit 452dc4a732d57fdebf2b46d32e91b27c994f0f47. --- VERSION | 2 +- reposerver/repository/app_version.go | 5 +---- reposerver/repository/repository.go | 5 ----- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/VERSION b/VERSION index 91a1e1ab181c5..d3c1d0e3b22ca 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.8.1-cap-CR-app-version4 \ No newline at end of file +2.8.1-cap-CR-app-version3 \ No newline at end of file diff --git a/reposerver/repository/app_version.go b/reposerver/repository/app_version.go index 618a93c896168..40e4843729df6 100644 --- a/reposerver/repository/app_version.go +++ b/reposerver/repository/app_version.go @@ -50,8 +50,6 @@ func getVersionFromYaml(appPath, jsonPathExpression string) (*string, error) { return nil, err } - log.Infof("AppVersion source content: %s", string(content)) - var obj interface{} if err := yaml.Unmarshal(content, &obj); err != nil { return nil, err @@ -76,7 +74,6 @@ func getVersionFromYaml(appPath, jsonPathExpression string) (*string, error) { } appVersion := buf.String() - log.Infof("AppVersion source content appVersion: %s", appVersion) return &appVersion, nil } @@ -106,7 +103,7 @@ func getAppVersions(appPath string, resourceName string, jsonPathExpression stri if err != nil { return nil, err } - log.Printf("appVersion value: %v (appPath=%s)", *appVersion, appPath) + log.Printf("appVersion value: %v\n", *appVersion) result := &Result{ AppVersion: *appVersion, diff --git a/reposerver/repository/repository.go b/reposerver/repository/repository.go index fa9bce0e635a9..32e168ebe42b1 100644 --- a/reposerver/repository/repository.go +++ b/reposerver/repository/repository.go @@ -589,9 +589,6 @@ func (s *Service) GenerateManifest(ctx context.Context, q *apiclient.ManifestReq var err error cacheFn := func(cacheKey string, refSourceCommitSHAs cache.ResolvedRevisions, firstInvocation bool) (bool, error) { ok, resp, err := s.getManifestCacheEntry(cacheKey, q, refSourceCommitSHAs, firstInvocation) - if resp != nil { - log.Infof("appVersion from cache. App = %s, Version = %v", q.AppName, resp.ApplicationVersions) - } res = resp return ok, err } @@ -838,7 +835,6 @@ func (s *Service) runManifestGenAsync(ctx context.Context, repoRoot, commitSHA, // Update the cache to include failure information innerRes.NumberOfConsecutiveFailures++ innerRes.MostRecentError = err.Error() - log.Infof("Save App %s to cache 1. Versions: %v", q.AppName, innerRes.ManifestResponse.ApplicationVersions) cacheErr = s.cache.SetManifests(cacheKey, appSourceCopy, q.RefSources, q, q.Namespace, q.TrackingMethod, q.AppLabelKey, q.AppName, innerRes, refSourceCommitSHAs) if cacheErr != nil { log.Warnf("manifest cache set error %s: %v", appSourceCopy.String(), cacheErr) @@ -863,7 +859,6 @@ func (s *Service) runManifestGenAsync(ctx context.Context, repoRoot, commitSHA, } manifestGenResult.Revision = commitSHA manifestGenResult.VerifyResult = opContext.verificationResult - log.Infof("Save App %s to cache 2. Versions: %v", q.AppName, manifestGenCacheEntry.ManifestResponse.ApplicationVersions) err = s.cache.SetManifests(cacheKey, appSourceCopy, q.RefSources, q, q.Namespace, q.TrackingMethod, q.AppLabelKey, q.AppName, &manifestGenCacheEntry, refSourceCommitSHAs) if err != nil { log.Warnf("manifest cache set error %s/%s: %v", appSourceCopy.String(), cacheKey, err)