Skip to content

Commit

Permalink
feat: appVersions. logs-5
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-codefresh committed Oct 27, 2023
1 parent a384038 commit fbe926d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.8.1-cap-CR-app-version4
2.8.1-cap-CR-app-version5
14 changes: 12 additions & 2 deletions server/application/application_event_reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,9 @@ func (s *applicationEventReporter) streamApplicationEvents(
}
} else {
// will get here only for root applications (not managed as a resource by another application)
log.Infof("getApplicationEventPayload 1 appVersions = %v", desiredManifests.ApplicationVersions)
log.Infof("getApplicationEventPayload 2 desiredManifests = %v", desiredManifests)
log.Infof("getApplicationEventPayload 3 application = %v", a)
appEvent, err := s.getApplicationEventPayload(ctx, a, es, ts, appInstanceLabelKey, trackingMethod, desiredManifests.ApplicationVersions)
if err != nil {
return fmt.Errorf("failed to get application event: %w", err)
Expand Down Expand Up @@ -297,6 +300,13 @@ func (s *applicationEventReporter) processResource(
originalAppRevisionMetadata, _ = s.getApplicationRevisionDetails(ctx, originalApplication, getOperationRevision(originalApplication))
}

log.Infof("getResourceEventPayload app = %s, appVersions = %v", parentApplicationToReport.Name, desiredManifests.ApplicationVersions)
log.Infof("getResourceEventPayload 1, parentApplicationToReport = %v", parentApplicationToReport)
log.Infof("getResourceEventPayload 2, actualState = %v", actualState)
log.Infof("getResourceEventPayload 3, desiredState = %v", desiredState)
log.Infof("getResourceEventPayload 4, originalApplication = %v", originalApplication)
log.Infof("getResourceEventPayload 5, revisionMetadataToReport = %v", revisionMetadataToReport)
log.Infof("getResourceEventPayload 6, originalAppRevisionMetadata = %v", originalAppRevisionMetadata)
ev, err := getResourceEventPayload(parentApplicationToReport, &rs, es, actualState, desiredState, appTree, manifestGenErr, ts, originalApplication, revisionMetadataToReport, originalAppRevisionMetadata, appInstanceLabelKey, trackingMethod, desiredManifests.ApplicationVersions)
if err != nil {
logCtx.WithError(err).Warn("failed to get event payload, resuming")
Expand Down Expand Up @@ -613,7 +623,7 @@ func getResourceEventPayload(
AppVersions: applicationVersionsEvents,
}

logCtx.Infof("AppVersion before encoding: %v", safeString(payload.AppVersions.AppVersion))
logCtx.Infof("AppVersion before encoding 1: %v", safeString(payload.AppVersions.AppVersion))
if payload.AppVersions.Dependencies == nil {
logCtx.Infof("AppVersion deps before encoding. Dependencies == nil")
} else {
Expand Down Expand Up @@ -732,7 +742,7 @@ func (s *applicationEventReporter) getApplicationEventPayload(
AppVersions: applicationVersionsEvents,
}

logCtx.Infof("AppVersion before encoding: %v", safeString(payload.AppVersions.AppVersion))
logCtx.Infof("AppVersion before encoding 2: %v", safeString(payload.AppVersions.AppVersion))
if payload.AppVersions.Dependencies == nil {
logCtx.Infof("AppVersion deps before encoding. Dependencies == nil")
} else {
Expand Down

0 comments on commit fbe926d

Please sign in to comment.