diff --git a/VERSION b/VERSION index d3c1d0e3b22ca..91a1e1ab181c5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.8.1-cap-CR-app-version3 \ No newline at end of file +2.8.1-cap-CR-app-version4 \ No newline at end of file diff --git a/reposerver/repository/app_version.go b/reposerver/repository/app_version.go index 40e4843729df6..618a93c896168 100644 --- a/reposerver/repository/app_version.go +++ b/reposerver/repository/app_version.go @@ -50,6 +50,8 @@ 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 @@ -74,6 +76,7 @@ func getVersionFromYaml(appPath, jsonPathExpression string) (*string, error) { } appVersion := buf.String() + log.Infof("AppVersion source content appVersion: %s", appVersion) return &appVersion, nil } @@ -103,7 +106,7 @@ func getAppVersions(appPath string, resourceName string, jsonPathExpression stri if err != nil { return nil, err } - log.Printf("appVersion value: %v\n", *appVersion) + log.Printf("appVersion value: %v (appPath=%s)", *appVersion, appPath) result := &Result{ AppVersion: *appVersion, diff --git a/reposerver/repository/repository.go b/reposerver/repository/repository.go index 32e168ebe42b1..fa9bce0e635a9 100644 --- a/reposerver/repository/repository.go +++ b/reposerver/repository/repository.go @@ -589,6 +589,9 @@ 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 } @@ -835,6 +838,7 @@ 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) @@ -859,6 +863,7 @@ 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)