From b777b8920a8632989d76c650468eb83805afc403 Mon Sep 17 00:00:00 2001 From: oleksandr-codefresh Date: Wed, 6 Nov 2024 12:09:54 +0200 Subject: [PATCH 01/27] event-reporter: created dedicated func resolveApplicationVersions --- .../reporter/application_event_reporter.go | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/event_reporter/reporter/application_event_reporter.go b/event_reporter/reporter/application_event_reporter.go index a64cd1c0a1f82..441227f0910e2 100644 --- a/event_reporter/reporter/application_event_reporter.go +++ b/event_reporter/reporter/application_event_reporter.go @@ -141,14 +141,7 @@ func (s *applicationEventReporter) StreamApplicationEvents( desiredManifests, manifestGenErr := s.getDesiredManifests(ctx, a, nil, logCtx) - syncRevision := utils.GetOperationStateRevision(a) - var applicationVersions *apiclient.ApplicationVersions - if syncRevision != nil { - syncManifests, _ := s.getDesiredManifests(ctx, a, syncRevision, logCtx) - applicationVersions = syncManifests.GetApplicationVersions() - } else { - applicationVersions = nil - } + applicationVersions := s.resolveApplicationVersions(ctx, a, logCtx) logCtx.Info("getting parent application name") @@ -225,6 +218,19 @@ func (s *applicationEventReporter) StreamApplicationEvents( return nil } +func (s *applicationEventReporter) resolveApplicationVersions(ctx context.Context, a *appv1.Application, logCtx *log.Entry) *apiclient.ApplicationVersions { + syncRevision := utils.GetOperationStateRevision(a) + var applicationVersions *apiclient.ApplicationVersions + if syncRevision != nil { + syncManifests, _ := s.getDesiredManifests(ctx, a, syncRevision, logCtx) + applicationVersions = syncManifests.GetApplicationVersions() + } else { + applicationVersions = nil + } + + return applicationVersions +} + func (s *applicationEventReporter) getAppForResourceReporting( rs appv1.ResourceStatus, ctx context.Context, From 2f4c9b3cba57b03c40c9fa6cd70f5ee55b587843 Mon Sep 17 00:00:00 2001 From: oleksandr-codefresh Date: Wed, 6 Nov 2024 12:14:31 +0200 Subject: [PATCH 02/27] event-reporter: added new types for variables grouping --- event_reporter/reporter/types.go | 34 ++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 event_reporter/reporter/types.go diff --git a/event_reporter/reporter/types.go b/event_reporter/reporter/types.go new file mode 100644 index 0000000000000..b8d2147e5fb75 --- /dev/null +++ b/event_reporter/reporter/types.go @@ -0,0 +1,34 @@ +package reporter + +import ( + "github.com/argoproj/argo-cd/v2/event_reporter/utils" + "github.com/argoproj/argo-cd/v2/pkg/apiclient/application" + appv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1" + "github.com/argoproj/argo-cd/v2/reposerver/apiclient" +) + +type ReportedResource struct { + rs *appv1.ResourceStatus + rsAsAppInfo *ReportedResourceAsApp // passed if resource is application + actualState *application.ApplicationResourceResponse + desiredState *apiclient.Manifest + manifestGenErr *bool +} + +type ReportedResourceAsApp struct { + app *appv1.Application + revisionsMetadata *utils.AppSyncRevisionsMetadata + applicationVersions *apiclient.ApplicationVersions +} + +type ReportedEntityParentApp struct { + app *appv1.Application + appTree *appv1.ApplicationTree + validatedDestination *appv1.ApplicationDestination + revisionsMetadata *utils.AppSyncRevisionsMetadata +} + +type ArgoTrackingMetadata struct { + appInstanceLabelKey *string + trackingMethod *appv1.TrackingMethod +} From 69b3eddc97814d579aae9302c095b35d4706b51e Mon Sep 17 00:00:00 2001 From: oleksandr-codefresh Date: Wed, 6 Nov 2024 12:27:45 +0200 Subject: [PATCH 03/27] event-reporter: removed redundant code comment --- event_reporter/reporter/application_event_reporter.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/event_reporter/reporter/application_event_reporter.go b/event_reporter/reporter/application_event_reporter.go index 441227f0910e2..91a0545ac3325 100644 --- a/event_reporter/reporter/application_event_reporter.go +++ b/event_reporter/reporter/application_event_reporter.go @@ -158,17 +158,15 @@ func (s *applicationEventReporter) StreamApplicationEvents( } rs := utils.GetAppAsResource(a) + utils.SetHealthStatusIfMissing(rs) parentDesiredManifests, manifestGenErr := s.getDesiredManifests(ctx, parentApplicationEntity, nil, logCtx) - // helm app hasnt revision - // TODO: add check if it helm application parentAppSyncRevisionsMetadata, err := s.getApplicationRevisionsMetadata(ctx, logCtx, parentApplicationEntity) if err != nil { logCtx.WithError(err).Warn("failed to get parent application's revision metadata, resuming") } - utils.SetHealthStatusIfMissing(rs) err = s.processResource(ctx, *rs, parentApplicationEntity, logCtx, eventProcessingStartedAt, parentDesiredManifests, appTree, manifestGenErr, a, parentAppSyncRevisionsMetadata, appInstanceLabelKey, trackingMethod, applicationVersions) if err != nil { s.metricsServer.IncErroredEventsCounter(metrics.MetricChildAppEventType, metrics.MetricEventUnknownErrorType, a.Name) @@ -176,8 +174,8 @@ func (s *applicationEventReporter) StreamApplicationEvents( } s.metricsServer.ObserveEventProcessingDurationHistogramDuration(a.Name, metrics.MetricChildAppEventType, metricTimer.Duration()) } else { - logCtx.Info("processing as root application") // will get here only for root applications (not managed as a resource by another application) + logCtx.Info("processing as root application") appEvent, err := s.getApplicationEventPayload(ctx, a, appTree, eventProcessingStartedAt, appInstanceLabelKey, trackingMethod, applicationVersions) if err != nil { s.metricsServer.IncErroredEventsCounter(metrics.MetricParentAppEventType, metrics.MetricEventGetPayloadErrorType, a.Name) From 899313da70b5280cdc72766a5606b9394ca5100e Mon Sep 17 00:00:00 2001 From: oleksandr-codefresh Date: Wed, 6 Nov 2024 14:51:14 +0200 Subject: [PATCH 04/27] event-reporter(refactoring): params grouping, added new type ArgoTrackingMetadata to pass data between methods --- event_reporter/controller/controller.go | 5 ++++- .../reporter/application_event_reporter.go | 19 ++++++++----------- .../application_event_reporter_test.go | 4 +--- event_reporter/reporter/event_payload.go | 14 ++++++-------- event_reporter/reporter/event_payload_test.go | 16 +++++++++++++--- event_reporter/reporter/types.go | 4 ++-- 6 files changed, 34 insertions(+), 28 deletions(-) diff --git a/event_reporter/controller/controller.go b/event_reporter/controller/controller.go index 7ce4f100b4411..85aba07fb7b7f 100644 --- a/event_reporter/controller/controller.go +++ b/event_reporter/controller/controller.go @@ -76,7 +76,10 @@ func (c *eventReporterController) Run(ctx context.Context) { } trackingMethod := argoutil.GetTrackingMethod(c.settingsMgr) - err = c.applicationEventReporter.StreamApplicationEvents(ctx, &a, eventProcessingStartedAt, ignoreResourceCache, appInstanceLabelKey, trackingMethod) + err = c.applicationEventReporter.StreamApplicationEvents(ctx, &a, eventProcessingStartedAt, ignoreResourceCache, &reporter.ArgoTrackingMetadata{ + AppInstanceLabelKey: &appInstanceLabelKey, + TrackingMethod: &trackingMethod, + }) if err != nil { return err } diff --git a/event_reporter/reporter/application_event_reporter.go b/event_reporter/reporter/application_event_reporter.go index 91a0545ac3325..7af6b8b0f6577 100644 --- a/event_reporter/reporter/application_event_reporter.go +++ b/event_reporter/reporter/application_event_reporter.go @@ -48,8 +48,7 @@ type ApplicationEventReporter interface { a *appv1.Application, eventProcessingStartedAt string, ignoreResourceCache bool, - appInstanceLabelKey string, - trackingMethod appv1.TrackingMethod, + argoTrackingMetadata *ArgoTrackingMetadata, ) error ShouldSendApplicationEvent(ae *appv1.ApplicationWatchEvent) (shouldSend bool, syncStatusChanged bool) } @@ -113,8 +112,7 @@ func (s *applicationEventReporter) StreamApplicationEvents( a *appv1.Application, eventProcessingStartedAt string, ignoreResourceCache bool, - appInstanceLabelKey string, - trackingMethod appv1.TrackingMethod, + argoTrackingMetadata *ArgoTrackingMetadata, ) error { metricTimer := metricsUtils.NewMetricTimer() @@ -145,7 +143,7 @@ func (s *applicationEventReporter) StreamApplicationEvents( logCtx.Info("getting parent application name") - parentAppIdentity := utils.GetParentAppIdentity(a, appInstanceLabelKey, trackingMethod) + parentAppIdentity := utils.GetParentAppIdentity(a, *argoTrackingMetadata.AppInstanceLabelKey, *argoTrackingMetadata.TrackingMethod) if utils.IsChildApp(parentAppIdentity) { logCtx.Info("processing as child application") @@ -167,7 +165,7 @@ func (s *applicationEventReporter) StreamApplicationEvents( logCtx.WithError(err).Warn("failed to get parent application's revision metadata, resuming") } - err = s.processResource(ctx, *rs, parentApplicationEntity, logCtx, eventProcessingStartedAt, parentDesiredManifests, appTree, manifestGenErr, a, parentAppSyncRevisionsMetadata, appInstanceLabelKey, trackingMethod, applicationVersions) + err = s.processResource(ctx, *rs, parentApplicationEntity, logCtx, eventProcessingStartedAt, parentDesiredManifests, appTree, manifestGenErr, a, parentAppSyncRevisionsMetadata, applicationVersions, argoTrackingMetadata) if err != nil { s.metricsServer.IncErroredEventsCounter(metrics.MetricChildAppEventType, metrics.MetricEventUnknownErrorType, a.Name) return err @@ -176,7 +174,7 @@ func (s *applicationEventReporter) StreamApplicationEvents( } else { // will get here only for root applications (not managed as a resource by another application) logCtx.Info("processing as root application") - appEvent, err := s.getApplicationEventPayload(ctx, a, appTree, eventProcessingStartedAt, appInstanceLabelKey, trackingMethod, applicationVersions) + appEvent, err := s.getApplicationEventPayload(ctx, a, appTree, eventProcessingStartedAt, applicationVersions, argoTrackingMetadata) if err != nil { s.metricsServer.IncErroredEventsCounter(metrics.MetricParentAppEventType, metrics.MetricEventGetPayloadErrorType, a.Name) return fmt.Errorf("failed to get application event: %w", err) @@ -207,7 +205,7 @@ func (s *applicationEventReporter) StreamApplicationEvents( s.metricsServer.IncCachedIgnoredEventsCounter(metrics.MetricResourceEventType, a.Name) continue } - err := s.processResource(ctx, rs, a, logCtx, eventProcessingStartedAt, desiredManifests, appTree, manifestGenErr, nil, revisionsMetadata, appInstanceLabelKey, trackingMethod, nil) + err := s.processResource(ctx, rs, a, logCtx, eventProcessingStartedAt, desiredManifests, appTree, manifestGenErr, nil, revisionsMetadata, nil, argoTrackingMetadata) if err != nil { s.metricsServer.IncErroredEventsCounter(metrics.MetricResourceEventType, metrics.MetricEventUnknownErrorType, a.Name) return err @@ -264,9 +262,8 @@ func (s *applicationEventReporter) processResource( manifestGenErr bool, originalApplication *appv1.Application, revisionsMetadata *utils.AppSyncRevisionsMetadata, - appInstanceLabelKey string, - trackingMethod appv1.TrackingMethod, applicationVersions *apiclient.ApplicationVersions, + argoTrackingMetadata *ArgoTrackingMetadata, ) error { metricsEventType := metrics.MetricResourceEventType if utils.IsApp(rs) { @@ -297,7 +294,7 @@ func (s *applicationEventReporter) processResource( originalAppRevisionMetadata, _ = s.getApplicationRevisionsMetadata(ctx, logCtx, originalApplication) } - ev, err := getResourceEventPayload(parentApplicationToReport, &rs, actualState, desiredState, appTree, manifestGenErr, appEventProcessingStartedAt, originalApplication, revisionMetadataToReport, originalAppRevisionMetadata, appInstanceLabelKey, trackingMethod, applicationVersions) + ev, err := getResourceEventPayload(parentApplicationToReport, &rs, actualState, desiredState, appTree, manifestGenErr, appEventProcessingStartedAt, originalApplication, revisionMetadataToReport, originalAppRevisionMetadata, applicationVersions, argoTrackingMetadata) if err != nil { s.metricsServer.IncErroredEventsCounter(metricsEventType, metrics.MetricEventGetPayloadErrorType, parentApplication.Name) logCtx.WithError(err).Warn("failed to get event payload, resuming") diff --git a/event_reporter/reporter/application_event_reporter_test.go b/event_reporter/reporter/application_event_reporter_test.go index 621c0ac65adc8..24f57525b9a5d 100644 --- a/event_reporter/reporter/application_event_reporter_test.go +++ b/event_reporter/reporter/application_event_reporter_test.go @@ -38,12 +38,10 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/argoproj/argo-cd/v2/common" "github.com/argoproj/argo-cd/v2/pkg/apiclient/application" "github.com/argoproj/argo-cd/v2/pkg/apiclient/events" "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1" "github.com/argoproj/argo-cd/v2/pkg/codefresh" - "github.com/argoproj/argo-cd/v2/util/argo" ) const ( @@ -226,7 +224,7 @@ func TestStreamApplicationEvent(t *testing.T) { assert.Equal(t, *app, actualApp) return nil } - _ = eventReporter.StreamApplicationEvents(context.Background(), app, "", false, common.LabelKeyAppInstance, argo.TrackingMethodLabel) + _ = eventReporter.StreamApplicationEvents(context.Background(), app, "", false, getMockedArgoTrackingMetadata()) }) } diff --git a/event_reporter/reporter/event_payload.go b/event_reporter/reporter/event_payload.go index 9aeda6fdbc517..dff303671d608 100644 --- a/event_reporter/reporter/event_payload.go +++ b/event_reporter/reporter/event_payload.go @@ -30,9 +30,8 @@ func getResourceEventPayload( originalApplication *appv1.Application, // passed when rs is application revisionsMetadata *utils.AppSyncRevisionsMetadata, originalAppRevisionsMetadata *utils.AppSyncRevisionsMetadata, // passed when rs is application - appInstanceLabelKey string, - trackingMethod appv1.TrackingMethod, applicationVersions *apiclient.ApplicationVersions, + argoTrackingMetadata *ArgoTrackingMetadata, ) (*events.Event, error) { var ( err error @@ -172,8 +171,8 @@ func getResourceEventPayload( SyncStartedAt: syncStarted, SyncFinishedAt: syncFinished, Cluster: parentApplication.Spec.Destination.Server, - AppInstanceLabelKey: appInstanceLabelKey, - TrackingMethod: string(trackingMethod), + AppInstanceLabelKey: *argoTrackingMetadata.AppInstanceLabelKey, + TrackingMethod: string(*argoTrackingMetadata.TrackingMethod), } if revisionsMetadata != nil && revisionsMetadata.SyncRevisions != nil { @@ -216,9 +215,8 @@ func (s *applicationEventReporter) getApplicationEventPayload( a *appv1.Application, appTree *appv1.ApplicationTree, eventProcessingStartedAt string, - appInstanceLabelKey string, - trackingMethod appv1.TrackingMethod, applicationVersions *apiclient.ApplicationVersions, + argoTrackingMetadata *ArgoTrackingMetadata, ) (*events.Event, error) { var ( syncStarted = metav1.Now() @@ -287,8 +285,8 @@ func (s *applicationEventReporter) getApplicationEventPayload( HealthStatus: &hs, HealthMessage: &a.Status.Health.Message, Cluster: a.Spec.Destination.Server, - AppInstanceLabelKey: appInstanceLabelKey, - TrackingMethod: string(trackingMethod), + AppInstanceLabelKey: *argoTrackingMetadata.AppInstanceLabelKey, + TrackingMethod: string(*argoTrackingMetadata.TrackingMethod), } errors = append(errors, parseApplicationSyncResultErrorsFromConditions(a.Status)...) diff --git a/event_reporter/reporter/event_payload_test.go b/event_reporter/reporter/event_payload_test.go index dc305a099c897..376670c5d2f04 100644 --- a/event_reporter/reporter/event_payload_test.go +++ b/event_reporter/reporter/event_payload_test.go @@ -18,6 +18,16 @@ import ( "github.com/argoproj/argo-cd/v2/util/argo" ) +func getMockedArgoTrackingMetadata() *ArgoTrackingMetadata { + appInstanceLabelKey := common.LabelKeyAppInstance + trackingMethod := argo.TrackingMethodLabel + + return &ArgoTrackingMetadata{ + AppInstanceLabelKey: &appInstanceLabelKey, + TrackingMethod: &trackingMethod, + } +} + func TestGetResourceEventPayload(t *testing.T) { t.Run("Deleting timestamp is empty", func(t *testing.T) { app := v1alpha1.Application{ @@ -48,7 +58,7 @@ func TestGetResourceEventPayload(t *testing.T) { }}, } - event, err := getResourceEventPayload(&app, &rs, &actualState, &desiredState, &appTree, true, "", nil, &revisionMetadata, nil, common.LabelKeyAppInstance, argo.TrackingMethodLabel, &repoApiclient.ApplicationVersions{}) + event, err := getResourceEventPayload(&app, &rs, &actualState, &desiredState, &appTree, true, "", nil, &revisionMetadata, nil, &repoApiclient.ApplicationVersions{}, getMockedArgoTrackingMetadata()) require.NoError(t, err) var eventPayload events.EventPayload @@ -80,7 +90,7 @@ func TestGetResourceEventPayload(t *testing.T) { SyncRevisions: []*utils.RevisionWithMetadata{}, } - event, err := getResourceEventPayload(&app, &rs, &actualState, &desiredState, &appTree, true, "", nil, &revisionMetadata, nil, common.LabelKeyAppInstance, argo.TrackingMethodLabel, &repoApiclient.ApplicationVersions{}) + event, err := getResourceEventPayload(&app, &rs, &actualState, &desiredState, &appTree, true, "", nil, &revisionMetadata, nil, &repoApiclient.ApplicationVersions{}, getMockedArgoTrackingMetadata()) require.NoError(t, err) var eventPayload events.EventPayload @@ -107,6 +117,6 @@ func TestGetResourceEventPayloadWithoutRevision(t *testing.T) { } appTree := v1alpha1.ApplicationTree{} - _, err := getResourceEventPayload(&app, &rs, &actualState, &desiredState, &appTree, true, "", nil, nil, nil, common.LabelKeyAppInstance, argo.TrackingMethodLabel, &repoApiclient.ApplicationVersions{}) + _, err := getResourceEventPayload(&app, &rs, &actualState, &desiredState, &appTree, true, "", nil, nil, nil, &repoApiclient.ApplicationVersions{}, getMockedArgoTrackingMetadata()) assert.NoError(t, err) } diff --git a/event_reporter/reporter/types.go b/event_reporter/reporter/types.go index b8d2147e5fb75..dec461e53da74 100644 --- a/event_reporter/reporter/types.go +++ b/event_reporter/reporter/types.go @@ -29,6 +29,6 @@ type ReportedEntityParentApp struct { } type ArgoTrackingMetadata struct { - appInstanceLabelKey *string - trackingMethod *appv1.TrackingMethod + AppInstanceLabelKey *string + TrackingMethod *appv1.TrackingMethod } From bcb573d08a9aed0cda816b9cbdf77ab4f56e4f3e Mon Sep 17 00:00:00 2001 From: oleksandr-codefresh Date: Wed, 6 Nov 2024 15:28:35 +0200 Subject: [PATCH 05/27] event-reporter(refactoring): params grouping, added new type ReportedEntityParentApp to pass data between methods --- .../reporter/application_event_reporter.go | 30 +++++++++----- event_reporter/reporter/event_payload.go | 40 +++++++++---------- event_reporter/reporter/event_payload_test.go | 17 ++++++-- 3 files changed, 53 insertions(+), 34 deletions(-) diff --git a/event_reporter/reporter/application_event_reporter.go b/event_reporter/reporter/application_event_reporter.go index 7af6b8b0f6577..e90a224ba30fc 100644 --- a/event_reporter/reporter/application_event_reporter.go +++ b/event_reporter/reporter/application_event_reporter.go @@ -165,7 +165,11 @@ func (s *applicationEventReporter) StreamApplicationEvents( logCtx.WithError(err).Warn("failed to get parent application's revision metadata, resuming") } - err = s.processResource(ctx, *rs, parentApplicationEntity, logCtx, eventProcessingStartedAt, parentDesiredManifests, appTree, manifestGenErr, a, parentAppSyncRevisionsMetadata, applicationVersions, argoTrackingMetadata) + err = s.processResource(ctx, *rs, logCtx, eventProcessingStartedAt, parentDesiredManifests, manifestGenErr, a, applicationVersions, &ReportedEntityParentApp{ + app: parentApplicationEntity, + appTree: appTree, + revisionsMetadata: parentAppSyncRevisionsMetadata, + }, argoTrackingMetadata) if err != nil { s.metricsServer.IncErroredEventsCounter(metrics.MetricChildAppEventType, metrics.MetricEventUnknownErrorType, a.Name) return err @@ -205,7 +209,11 @@ func (s *applicationEventReporter) StreamApplicationEvents( s.metricsServer.IncCachedIgnoredEventsCounter(metrics.MetricResourceEventType, a.Name) continue } - err := s.processResource(ctx, rs, a, logCtx, eventProcessingStartedAt, desiredManifests, appTree, manifestGenErr, nil, revisionsMetadata, nil, argoTrackingMetadata) + err := s.processResource(ctx, rs, logCtx, eventProcessingStartedAt, desiredManifests, manifestGenErr, nil, nil, &ReportedEntityParentApp{ + app: a, + appTree: appTree, + revisionsMetadata: revisionsMetadata, + }, argoTrackingMetadata) if err != nil { s.metricsServer.IncErroredEventsCounter(metrics.MetricResourceEventType, metrics.MetricEventUnknownErrorType, a.Name) return err @@ -254,15 +262,13 @@ func (s *applicationEventReporter) getAppForResourceReporting( func (s *applicationEventReporter) processResource( ctx context.Context, rs appv1.ResourceStatus, - parentApplication *appv1.Application, logCtx *log.Entry, appEventProcessingStartedAt string, desiredManifests *apiclient.ManifestResponse, - appTree *appv1.ApplicationTree, manifestGenErr bool, originalApplication *appv1.Application, - revisionsMetadata *utils.AppSyncRevisionsMetadata, applicationVersions *apiclient.ApplicationVersions, + reportedEntityParentApp *ReportedEntityParentApp, argoTrackingMetadata *ArgoTrackingMetadata, ) error { metricsEventType := metrics.MetricResourceEventType @@ -278,7 +284,7 @@ func (s *applicationEventReporter) processResource( // get resource desired state desiredState := getResourceDesiredState(&rs, desiredManifests, logCtx) - actualState, err := s.getResourceActualState(ctx, logCtx, metricsEventType, rs, parentApplication, originalApplication) + actualState, err := s.getResourceActualState(ctx, logCtx, metricsEventType, rs, reportedEntityParentApp.app, originalApplication) if err != nil { return err } @@ -286,7 +292,7 @@ func (s *applicationEventReporter) processResource( return nil } - parentApplicationToReport, revisionMetadataToReport := s.getAppForResourceReporting(rs, ctx, logCtx, parentApplication, revisionsMetadata) + parentApplicationToReport, revisionMetadataToReport := s.getAppForResourceReporting(rs, ctx, logCtx, reportedEntityParentApp.app, reportedEntityParentApp.revisionsMetadata) var originalAppRevisionMetadata *utils.AppSyncRevisionsMetadata = nil @@ -294,9 +300,13 @@ func (s *applicationEventReporter) processResource( originalAppRevisionMetadata, _ = s.getApplicationRevisionsMetadata(ctx, logCtx, originalApplication) } - ev, err := getResourceEventPayload(parentApplicationToReport, &rs, actualState, desiredState, appTree, manifestGenErr, appEventProcessingStartedAt, originalApplication, revisionMetadataToReport, originalAppRevisionMetadata, applicationVersions, argoTrackingMetadata) + ev, err := getResourceEventPayload(&rs, actualState, desiredState, manifestGenErr, appEventProcessingStartedAt, originalApplication, originalAppRevisionMetadata, applicationVersions, &ReportedEntityParentApp{ + app: parentApplicationToReport, + appTree: reportedEntityParentApp.appTree, + revisionsMetadata: revisionMetadataToReport, + }, argoTrackingMetadata) if err != nil { - s.metricsServer.IncErroredEventsCounter(metricsEventType, metrics.MetricEventGetPayloadErrorType, parentApplication.Name) + s.metricsServer.IncErroredEventsCounter(metricsEventType, metrics.MetricEventGetPayloadErrorType, reportedEntityParentApp.app.Name) logCtx.WithError(err).Warn("failed to get event payload, resuming") return nil } @@ -308,7 +318,7 @@ func (s *applicationEventReporter) processResource( appName = appRes.Name } else { utils.LogWithResourceStatus(logCtx, rs).Info("streaming resource event") - appName = parentApplication.Name + appName = reportedEntityParentApp.app.Name } if err := s.codefreshClient.SendEvent(ctx, appName, ev); err != nil { diff --git a/event_reporter/reporter/event_payload.go b/event_reporter/reporter/event_payload.go index dff303671d608..8bd37f212fc01 100644 --- a/event_reporter/reporter/event_payload.go +++ b/event_reporter/reporter/event_payload.go @@ -20,17 +20,15 @@ import ( ) func getResourceEventPayload( - parentApplication *appv1.Application, rs *appv1.ResourceStatus, actualState *application.ApplicationResourceResponse, desiredState *apiclient.Manifest, - apptree *appv1.ApplicationTree, manifestGenErr bool, appEventProcessingStartedAt string, originalApplication *appv1.Application, // passed when rs is application - revisionsMetadata *utils.AppSyncRevisionsMetadata, originalAppRevisionsMetadata *utils.AppSyncRevisionsMetadata, // passed when rs is application applicationVersions *apiclient.ApplicationVersions, + reportedEntityParentApp *ReportedEntityParentApp, argoTrackingMetadata *ArgoTrackingMetadata, ) (*events.Event, error) { var ( @@ -110,17 +108,17 @@ func getResourceEventPayload( actualState.Manifest = &manifest } - if (originalApplication != nil && originalApplication.DeletionTimestamp != nil) || parentApplication.ObjectMeta.DeletionTimestamp != nil { + if (originalApplication != nil && originalApplication.DeletionTimestamp != nil) || reportedEntityParentApp.app.ObjectMeta.DeletionTimestamp != nil { // resource should be deleted in case if application in process of deletion desiredState.CompiledManifest = "" manifest := "" actualState.Manifest = &manifest } - if parentApplication.Status.OperationState != nil { - syncStarted = parentApplication.Status.OperationState.StartedAt - syncFinished = parentApplication.Status.OperationState.FinishedAt - errors = append(errors, parseResourceSyncResultErrors(rs, parentApplication.Status.OperationState)...) + if reportedEntityParentApp.app.Status.OperationState != nil { + syncStarted = reportedEntityParentApp.app.Status.OperationState.StartedAt + syncFinished = reportedEntityParentApp.app.Status.OperationState.FinishedAt + errors = append(errors, parseResourceSyncResultErrors(rs, reportedEntityParentApp.app.Status.OperationState)...) } // for primitive resources that are synced right away and don't require progression time (like configmap) @@ -138,7 +136,7 @@ func getResourceEventPayload( } if originalApplication != nil { - errors = append(errors, parseAggregativeHealthErrorsOfApplication(originalApplication, apptree)...) + errors = append(errors, parseAggregativeHealthErrorsOfApplication(originalApplication, reportedEntityParentApp.appTree)...) } if len(desiredState.RawManifest) == 0 && len(desiredState.CompiledManifest) != 0 { @@ -158,25 +156,25 @@ func getResourceEventPayload( DesiredManifest: desiredState.CompiledManifest, ActualManifest: *actualState.Manifest, GitManifest: desiredState.RawManifest, - RepoURL: parentApplication.Status.Sync.ComparedTo.Source.RepoURL, + RepoURL: reportedEntityParentApp.app.Status.Sync.ComparedTo.Source.RepoURL, Path: desiredState.Path, - Revision: utils.GetApplicationLatestRevision(parentApplication), - OperationSyncRevision: utils.GetOperationRevision(parentApplication), - HistoryId: utils.GetLatestAppHistoryId(parentApplication), - AppName: parentApplication.Name, - AppNamespace: parentApplication.Namespace, - AppUID: string(parentApplication.ObjectMeta.UID), - AppLabels: parentApplication.Labels, + Revision: utils.GetApplicationLatestRevision(reportedEntityParentApp.app), + OperationSyncRevision: utils.GetOperationRevision(reportedEntityParentApp.app), + HistoryId: utils.GetLatestAppHistoryId(reportedEntityParentApp.app), + AppName: reportedEntityParentApp.app.Name, + AppNamespace: reportedEntityParentApp.app.Namespace, + AppUID: string(reportedEntityParentApp.app.ObjectMeta.UID), + AppLabels: reportedEntityParentApp.app.Labels, SyncStatus: string(rs.Status), SyncStartedAt: syncStarted, SyncFinishedAt: syncFinished, - Cluster: parentApplication.Spec.Destination.Server, + Cluster: reportedEntityParentApp.app.Spec.Destination.Server, AppInstanceLabelKey: *argoTrackingMetadata.AppInstanceLabelKey, TrackingMethod: string(*argoTrackingMetadata.TrackingMethod), } - if revisionsMetadata != nil && revisionsMetadata.SyncRevisions != nil { - revisionMetadata := getApplicationLegacyRevisionDetails(parentApplication, revisionsMetadata) + if reportedEntityParentApp.revisionsMetadata != nil && reportedEntityParentApp.revisionsMetadata.SyncRevisions != nil { + revisionMetadata := getApplicationLegacyRevisionDetails(reportedEntityParentApp.app, reportedEntityParentApp.revisionsMetadata) if revisionMetadata != nil { source.CommitMessage = revisionMetadata.Message source.CommitAuthor = revisionMetadata.Author @@ -188,7 +186,7 @@ func getResourceEventPayload( source.HealthStatus = (*string)(&rs.Health.Status) source.HealthMessage = &rs.Health.Message if rs.Health.Status != health.HealthStatusHealthy { - errors = append(errors, parseAggregativeHealthErrors(rs, apptree, false)...) + errors = append(errors, parseAggregativeHealthErrors(rs, reportedEntityParentApp.appTree, false)...) } } diff --git a/event_reporter/reporter/event_payload_test.go b/event_reporter/reporter/event_payload_test.go index 376670c5d2f04..210cd16a49f22 100644 --- a/event_reporter/reporter/event_payload_test.go +++ b/event_reporter/reporter/event_payload_test.go @@ -58,7 +58,11 @@ func TestGetResourceEventPayload(t *testing.T) { }}, } - event, err := getResourceEventPayload(&app, &rs, &actualState, &desiredState, &appTree, true, "", nil, &revisionMetadata, nil, &repoApiclient.ApplicationVersions{}, getMockedArgoTrackingMetadata()) + event, err := getResourceEventPayload(&rs, &actualState, &desiredState, true, "", nil, nil, &repoApiclient.ApplicationVersions{}, &ReportedEntityParentApp{ + app: &app, + appTree: &appTree, + revisionsMetadata: &revisionMetadata, + }, getMockedArgoTrackingMetadata()) require.NoError(t, err) var eventPayload events.EventPayload @@ -90,7 +94,11 @@ func TestGetResourceEventPayload(t *testing.T) { SyncRevisions: []*utils.RevisionWithMetadata{}, } - event, err := getResourceEventPayload(&app, &rs, &actualState, &desiredState, &appTree, true, "", nil, &revisionMetadata, nil, &repoApiclient.ApplicationVersions{}, getMockedArgoTrackingMetadata()) + event, err := getResourceEventPayload(&rs, &actualState, &desiredState, true, "", nil, nil, &repoApiclient.ApplicationVersions{}, &ReportedEntityParentApp{ + app: &app, + appTree: &appTree, + revisionsMetadata: &revisionMetadata, + }, getMockedArgoTrackingMetadata()) require.NoError(t, err) var eventPayload events.EventPayload @@ -117,6 +125,9 @@ func TestGetResourceEventPayloadWithoutRevision(t *testing.T) { } appTree := v1alpha1.ApplicationTree{} - _, err := getResourceEventPayload(&app, &rs, &actualState, &desiredState, &appTree, true, "", nil, nil, nil, &repoApiclient.ApplicationVersions{}, getMockedArgoTrackingMetadata()) + _, err := getResourceEventPayload(&rs, &actualState, &desiredState, true, "", nil, nil, &repoApiclient.ApplicationVersions{}, &ReportedEntityParentApp{ + app: &app, + appTree: &appTree, + }, getMockedArgoTrackingMetadata()) assert.NoError(t, err) } From cceaa27ba6b4e6cb300d7499a762e23c4b0ce86e Mon Sep 17 00:00:00 2001 From: oleksandr-codefresh Date: Wed, 6 Nov 2024 17:50:27 +0200 Subject: [PATCH 06/27] event-reporter(refactoring): params grouping, added new type ReportedResource to pass data between methods, created new methods to group logic inside getResourceEventPayload --- .../reporter/application_event_reporter.go | 29 ++- event_reporter/reporter/event_payload.go | 232 ++++++++++-------- event_reporter/reporter/event_payload_test.go | 24 +- event_reporter/reporter/types.go | 2 +- 4 files changed, 177 insertions(+), 110 deletions(-) diff --git a/event_reporter/reporter/application_event_reporter.go b/event_reporter/reporter/application_event_reporter.go index e90a224ba30fc..4b5c72cde7a07 100644 --- a/event_reporter/reporter/application_event_reporter.go +++ b/event_reporter/reporter/application_event_reporter.go @@ -266,8 +266,8 @@ func (s *applicationEventReporter) processResource( appEventProcessingStartedAt string, desiredManifests *apiclient.ManifestResponse, manifestGenErr bool, - originalApplication *appv1.Application, - applicationVersions *apiclient.ApplicationVersions, + originalApplication *appv1.Application, // passed onlu if resource is app + applicationVersions *apiclient.ApplicationVersions, // passed onlu if resource is app reportedEntityParentApp *ReportedEntityParentApp, argoTrackingMetadata *ArgoTrackingMetadata, ) error { @@ -300,11 +300,26 @@ func (s *applicationEventReporter) processResource( originalAppRevisionMetadata, _ = s.getApplicationRevisionsMetadata(ctx, logCtx, originalApplication) } - ev, err := getResourceEventPayload(&rs, actualState, desiredState, manifestGenErr, appEventProcessingStartedAt, originalApplication, originalAppRevisionMetadata, applicationVersions, &ReportedEntityParentApp{ - app: parentApplicationToReport, - appTree: reportedEntityParentApp.appTree, - revisionsMetadata: revisionMetadataToReport, - }, argoTrackingMetadata) + ev, err := getResourceEventPayload( + appEventProcessingStartedAt, + &ReportedResource{ + rs: &rs, + actualState: actualState, + desiredState: desiredState, + manifestGenErr: manifestGenErr, + rsAsAppInfo: &ReportedResourceAsApp{ + app: originalApplication, + revisionsMetadata: originalAppRevisionMetadata, + applicationVersions: applicationVersions, + }, + }, + &ReportedEntityParentApp{ + app: parentApplicationToReport, + appTree: reportedEntityParentApp.appTree, + revisionsMetadata: revisionMetadataToReport, + }, + argoTrackingMetadata, + ) if err != nil { s.metricsServer.IncErroredEventsCounter(metricsEventType, metrics.MetricEventGetPayloadErrorType, reportedEntityParentApp.app.Name) logCtx.WithError(err).Warn("failed to get event payload, resuming") diff --git a/event_reporter/reporter/event_payload.go b/event_reporter/reporter/event_payload.go index 8bd37f212fc01..c8fdd71df6bca 100644 --- a/event_reporter/reporter/event_payload.go +++ b/event_reporter/reporter/event_payload.go @@ -20,14 +20,8 @@ import ( ) func getResourceEventPayload( - rs *appv1.ResourceStatus, - actualState *application.ApplicationResourceResponse, - desiredState *apiclient.Manifest, - manifestGenErr bool, appEventProcessingStartedAt string, - originalApplication *appv1.Application, // passed when rs is application - originalAppRevisionsMetadata *utils.AppSyncRevisionsMetadata, // passed when rs is application - applicationVersions *apiclient.ApplicationVersions, + rr *ReportedResource, reportedEntityParentApp *ReportedEntityParentApp, argoTrackingMetadata *ArgoTrackingMetadata, ) (*events.Event, error) { @@ -35,129 +29,80 @@ func getResourceEventPayload( err error syncStarted = metav1.Now() syncFinished *metav1.Time - errors = []*events.ObjectError{} logCtx *log.Entry ) - if originalApplication != nil { - logCtx = log.WithField("application", originalApplication.Name) + if rr.rsAsAppInfo.app != nil { + logCtx = log.WithField("application", rr.rsAsAppInfo.app.Name) } else { logCtx = log.NewEntry(log.StandardLogger()) } - object := []byte(*actualState.Manifest) + object := []byte(*rr.actualState.Manifest) - if originalAppRevisionsMetadata != nil && len(object) != 0 { - actualObject, err := appv1.UnmarshalToUnstructured(*actualState.Manifest) + if rr.rsAsAppInfo.revisionsMetadata != nil && len(object) != 0 { + actualObject, err := appv1.UnmarshalToUnstructured(*rr.actualState.Manifest) - if err == nil { - actualObject = utils.AddCommitsDetailsToAnnotations(actualObject, originalAppRevisionsMetadata) - if originalApplication != nil { - actualObject = utils.AddCommitDetailsToLabels(actualObject, getApplicationLegacyRevisionDetails(originalApplication, originalAppRevisionsMetadata)) - } + if err != nil { + return nil, fmt.Errorf("failed to unmarshal manifest: %w", err) + } - object, err = actualObject.MarshalJSON() - if err != nil { - return nil, fmt.Errorf("failed to marshal unstructured object: %w", err) - } + object, err = addCommitDetailsToUnstructured(actualObject, rr) + if err != nil { + return nil, err } } if len(object) == 0 { - if len(desiredState.CompiledManifest) == 0 { - // no actual or desired state, don't send event - u := &unstructured.Unstructured{} - apiVersion := rs.Version - if rs.Group != "" { - apiVersion = rs.Group + "/" + rs.Version - } - - u.SetAPIVersion(apiVersion) - u.SetKind(rs.Kind) - u.SetName(rs.Name) - u.SetNamespace(rs.Namespace) - if originalAppRevisionsMetadata != nil { - u = utils.AddCommitsDetailsToAnnotations(u, originalAppRevisionsMetadata) - if originalApplication != nil { - u = utils.AddCommitDetailsToLabels(u, getApplicationLegacyRevisionDetails(originalApplication, originalAppRevisionsMetadata)) - } - } - - object, err = u.MarshalJSON() + if len(rr.desiredState.CompiledManifest) == 0 { + object, err = buildEventObjectAsLiveAndCompiledManifestsEmpty(rr) if err != nil { - return nil, fmt.Errorf("failed to marshal unstructured object: %w", err) + return nil, err } } else { - // no actual state, use desired state as event object - unstructuredWithNamespace, err := utils.AddDestNamespaceToManifest([]byte(desiredState.CompiledManifest), rs) + object, err = useCompiledManifestAsEventObject(rr) if err != nil { - return nil, fmt.Errorf("failed to add destination namespace to manifest: %w", err) + return nil, err } - if originalAppRevisionsMetadata != nil { - unstructuredWithNamespace = utils.AddCommitsDetailsToAnnotations(unstructuredWithNamespace, originalAppRevisionsMetadata) - if originalApplication != nil { - unstructuredWithNamespace = utils.AddCommitDetailsToLabels(unstructuredWithNamespace, getApplicationLegacyRevisionDetails(originalApplication, originalAppRevisionsMetadata)) - } - } - - object, _ = unstructuredWithNamespace.MarshalJSON() } - } else if rs.RequiresPruning && !manifestGenErr { + } else if rr.rs.RequiresPruning && !rr.manifestGenErr { // resource should be deleted - desiredState.CompiledManifest = "" - manifest := "" - actualState.Manifest = &manifest + makeDesiredAndLiveManifestEmpty(rr.actualState, rr.desiredState) } - if (originalApplication != nil && originalApplication.DeletionTimestamp != nil) || reportedEntityParentApp.app.ObjectMeta.DeletionTimestamp != nil { + if (rr.rsAsAppInfo.app != nil && rr.rsAsAppInfo.app.DeletionTimestamp != nil) || reportedEntityParentApp.app.ObjectMeta.DeletionTimestamp != nil { // resource should be deleted in case if application in process of deletion - desiredState.CompiledManifest = "" - manifest := "" - actualState.Manifest = &manifest + makeDesiredAndLiveManifestEmpty(rr.actualState, rr.desiredState) + } + + if len(rr.desiredState.RawManifest) == 0 && len(rr.desiredState.CompiledManifest) != 0 { + // for handling helm defined resources, etc... + y, err := yaml.JSONToYAML([]byte(rr.desiredState.CompiledManifest)) + if err == nil { + rr.desiredState.RawManifest = string(y) + } } if reportedEntityParentApp.app.Status.OperationState != nil { syncStarted = reportedEntityParentApp.app.Status.OperationState.StartedAt syncFinished = reportedEntityParentApp.app.Status.OperationState.FinishedAt - errors = append(errors, parseResourceSyncResultErrors(rs, reportedEntityParentApp.app.Status.OperationState)...) } // for primitive resources that are synced right away and don't require progression time (like configmap) - if rs.Status == appv1.SyncStatusCodeSynced && rs.Health != nil && rs.Health.Status == health.HealthStatusHealthy { + if rr.rs.Status == appv1.SyncStatusCodeSynced && rr.rs.Health != nil && rr.rs.Health.Status == health.HealthStatusHealthy { syncFinished = &syncStarted } - // parent application not include errors in application originally was created with broken state, for example in destination missed namespace - if originalApplication != nil && originalApplication.Status.OperationState != nil { - errors = append(errors, parseApplicationSyncResultErrors(originalApplication.Status.OperationState)...) - } - - if originalApplication != nil && originalApplication.Status.Conditions != nil { - errors = append(errors, parseApplicationSyncResultErrorsFromConditions(originalApplication.Status)...) - } - - if originalApplication != nil { - errors = append(errors, parseAggregativeHealthErrorsOfApplication(originalApplication, reportedEntityParentApp.appTree)...) - } - - if len(desiredState.RawManifest) == 0 && len(desiredState.CompiledManifest) != 0 { - // for handling helm defined resources, etc... - y, err := yaml.JSONToYAML([]byte(desiredState.CompiledManifest)) - if err == nil { - desiredState.RawManifest = string(y) - } - } - - applicationVersionsEvents, err := utils.RepoAppVersionsToEvent(applicationVersions) + applicationVersionsEvents, err := utils.RepoAppVersionsToEvent(rr.rsAsAppInfo.applicationVersions) if err != nil { logCtx.Errorf("failed to convert appVersions: %v", err) } source := events.ObjectSource{ - DesiredManifest: desiredState.CompiledManifest, - ActualManifest: *actualState.Manifest, - GitManifest: desiredState.RawManifest, + DesiredManifest: rr.desiredState.CompiledManifest, + ActualManifest: *rr.actualState.Manifest, + GitManifest: rr.desiredState.RawManifest, RepoURL: reportedEntityParentApp.app.Status.Sync.ComparedTo.Source.RepoURL, - Path: desiredState.Path, + Path: rr.desiredState.Path, Revision: utils.GetApplicationLatestRevision(reportedEntityParentApp.app), OperationSyncRevision: utils.GetOperationRevision(reportedEntityParentApp.app), HistoryId: utils.GetLatestAppHistoryId(reportedEntityParentApp.app), @@ -165,7 +110,7 @@ func getResourceEventPayload( AppNamespace: reportedEntityParentApp.app.Namespace, AppUID: string(reportedEntityParentApp.app.ObjectMeta.UID), AppLabels: reportedEntityParentApp.app.Labels, - SyncStatus: string(rs.Status), + SyncStatus: string(rr.rs.Status), SyncStartedAt: syncStarted, SyncFinishedAt: syncFinished, Cluster: reportedEntityParentApp.app.Spec.Destination.Server, @@ -182,19 +127,16 @@ func getResourceEventPayload( } } - if rs.Health != nil { - source.HealthStatus = (*string)(&rs.Health.Status) - source.HealthMessage = &rs.Health.Message - if rs.Health.Status != health.HealthStatusHealthy { - errors = append(errors, parseAggregativeHealthErrors(rs, reportedEntityParentApp.appTree, false)...) - } + if rr.rs.Health != nil { + source.HealthStatus = (*string)(&rr.rs.Health.Status) + source.HealthMessage = &rr.rs.Health.Message } payload := events.EventPayload{ Timestamp: appEventProcessingStartedAt, Object: object, Source: &source, - Errors: errors, + Errors: getResourceEventPayloadErrors(rr, reportedEntityParentApp), AppVersions: applicationVersionsEvents, } @@ -202,12 +144,104 @@ func getResourceEventPayload( payloadBytes, err := json.Marshal(&payload) if err != nil { - return nil, fmt.Errorf("failed to marshal payload for resource %s/%s: %w", rs.Namespace, rs.Name, err) + return nil, fmt.Errorf("failed to marshal payload for resource %s/%s: %w", rr.rs.Namespace, rr.rs.Name, err) } return &events.Event{Payload: payloadBytes}, nil } +func getResourceEventPayloadErrors( + rr *ReportedResource, + reportedEntityParentApp *ReportedEntityParentApp, +) []*events.ObjectError { + var errors = []*events.ObjectError{} + + if reportedEntityParentApp.app.Status.OperationState != nil { + errors = append(errors, parseResourceSyncResultErrors(rr.rs, reportedEntityParentApp.app.Status.OperationState)...) + } + + // parent application not include errors in application originally was created with broken state, for example in destination missed namespace + if rr.rsAsAppInfo.app != nil && rr.rsAsAppInfo.app.Status.OperationState != nil { + errors = append(errors, parseApplicationSyncResultErrors(rr.rsAsAppInfo.app.Status.OperationState)...) + } + + if rr.rsAsAppInfo.app != nil && rr.rsAsAppInfo.app.Status.Conditions != nil { + errors = append(errors, parseApplicationSyncResultErrorsFromConditions(rr.rsAsAppInfo.app.Status)...) + } + + if rr.rsAsAppInfo.app != nil { + errors = append(errors, parseAggregativeHealthErrorsOfApplication(rr.rsAsAppInfo.app, reportedEntityParentApp.appTree)...) + } + + if rr.rs.Health != nil { + if rr.rs.Health.Status != health.HealthStatusHealthy { + errors = append(errors, parseAggregativeHealthErrors(rr.rs, reportedEntityParentApp.appTree, false)...) + } + } + + return errors +} + +func useCompiledManifestAsEventObject( + rr *ReportedResource, +) ([]byte, error) { + // no actual state, use desired state as event object + unstructuredWithNamespace, err := utils.AddDestNamespaceToManifest([]byte(rr.desiredState.CompiledManifest), rr.rs) + if err != nil { + return nil, fmt.Errorf("failed to add destination namespace to manifest: %w", err) + } + + return addCommitDetailsToUnstructured(unstructuredWithNamespace, rr) +} + +func buildEventObjectAsLiveAndCompiledManifestsEmpty( + rr *ReportedResource, +) ([]byte, error) { + // no actual or desired state, don't send event + u := &unstructured.Unstructured{} + apiVersion := rr.rs.Version + if rr.rs.Group != "" { + apiVersion = rr.rs.Group + "/" + rr.rs.Version + } + + u.SetAPIVersion(apiVersion) + u.SetKind(rr.rs.Kind) + u.SetName(rr.rs.Name) + u.SetNamespace(rr.rs.Namespace) + + return addCommitDetailsToUnstructured(u, rr) +} + +// when empty minifests reported to codefresh they will get deleted +func makeDesiredAndLiveManifestEmpty( + actualState *application.ApplicationResourceResponse, + desiredState *apiclient.Manifest, +) { + // resource should be deleted + desiredState.CompiledManifest = "" + manifest := "" + actualState.Manifest = &manifest +} + +func addCommitDetailsToUnstructured( + u *unstructured.Unstructured, + rr *ReportedResource, +) ([]byte, error) { + if rr.rsAsAppInfo.revisionsMetadata != nil { + u = utils.AddCommitsDetailsToAnnotations(u, rr.rsAsAppInfo.revisionsMetadata) + if rr.rsAsAppInfo.app != nil { + u = utils.AddCommitDetailsToLabels(u, getApplicationLegacyRevisionDetails(rr.rsAsAppInfo.app, rr.rsAsAppInfo.revisionsMetadata)) + } + } + + object, err := u.MarshalJSON() + if err != nil { + return nil, fmt.Errorf("failed to marshal unstructured object: %w", err) + } + + return object, err +} + func (s *applicationEventReporter) getApplicationEventPayload( ctx context.Context, a *appv1.Application, diff --git a/event_reporter/reporter/event_payload_test.go b/event_reporter/reporter/event_payload_test.go index 210cd16a49f22..b0cf4c9afe916 100644 --- a/event_reporter/reporter/event_payload_test.go +++ b/event_reporter/reporter/event_payload_test.go @@ -58,7 +58,13 @@ func TestGetResourceEventPayload(t *testing.T) { }}, } - event, err := getResourceEventPayload(&rs, &actualState, &desiredState, true, "", nil, nil, &repoApiclient.ApplicationVersions{}, &ReportedEntityParentApp{ + event, err := getResourceEventPayload("", &ReportedResource{ + rs: &rs, + actualState: &actualState, + desiredState: &desiredState, + manifestGenErr: true, + rsAsAppInfo: nil, + }, &ReportedEntityParentApp{ app: &app, appTree: &appTree, revisionsMetadata: &revisionMetadata, @@ -94,7 +100,13 @@ func TestGetResourceEventPayload(t *testing.T) { SyncRevisions: []*utils.RevisionWithMetadata{}, } - event, err := getResourceEventPayload(&rs, &actualState, &desiredState, true, "", nil, nil, &repoApiclient.ApplicationVersions{}, &ReportedEntityParentApp{ + event, err := getResourceEventPayload("", &ReportedResource{ + rs: &rs, + actualState: &actualState, + desiredState: &desiredState, + manifestGenErr: true, + rsAsAppInfo: nil, + }, &ReportedEntityParentApp{ app: &app, appTree: &appTree, revisionsMetadata: &revisionMetadata, @@ -125,7 +137,13 @@ func TestGetResourceEventPayloadWithoutRevision(t *testing.T) { } appTree := v1alpha1.ApplicationTree{} - _, err := getResourceEventPayload(&rs, &actualState, &desiredState, true, "", nil, nil, &repoApiclient.ApplicationVersions{}, &ReportedEntityParentApp{ + _, err := getResourceEventPayload("", &ReportedResource{ + rs: &rs, + actualState: &actualState, + desiredState: &desiredState, + manifestGenErr: true, + rsAsAppInfo: nil, + }, &ReportedEntityParentApp{ app: &app, appTree: &appTree, }, getMockedArgoTrackingMetadata()) diff --git a/event_reporter/reporter/types.go b/event_reporter/reporter/types.go index dec461e53da74..ef85526f60b6e 100644 --- a/event_reporter/reporter/types.go +++ b/event_reporter/reporter/types.go @@ -12,7 +12,7 @@ type ReportedResource struct { rsAsAppInfo *ReportedResourceAsApp // passed if resource is application actualState *application.ApplicationResourceResponse desiredState *apiclient.Manifest - manifestGenErr *bool + manifestGenErr bool } type ReportedResourceAsApp struct { From c5c0f08749f569c9c97fdc8bc245546a7420137e Mon Sep 17 00:00:00 2001 From: oleksandr-codefresh Date: Thu, 7 Nov 2024 11:14:20 +0200 Subject: [PATCH 07/27] event-reporter(refactoring): fixed nil pointer issues after refactoring --- event_reporter/reporter/event_payload.go | 41 +++++++++++++----------- event_reporter/reporter/types.go | 7 ++-- 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/event_reporter/reporter/event_payload.go b/event_reporter/reporter/event_payload.go index c8fdd71df6bca..e8fcf8f5e6f27 100644 --- a/event_reporter/reporter/event_payload.go +++ b/event_reporter/reporter/event_payload.go @@ -32,7 +32,7 @@ func getResourceEventPayload( logCtx *log.Entry ) - if rr.rsAsAppInfo.app != nil { + if rr.rsAsAppInfo != nil && rr.rsAsAppInfo.app != nil { logCtx = log.WithField("application", rr.rsAsAppInfo.app.Name) } else { logCtx = log.NewEntry(log.StandardLogger()) @@ -40,7 +40,7 @@ func getResourceEventPayload( object := []byte(*rr.actualState.Manifest) - if rr.rsAsAppInfo.revisionsMetadata != nil && len(object) != 0 { + if rr.rsAsAppInfo != nil && rr.rsAsAppInfo.revisionsMetadata != nil && len(object) != 0 { actualObject, err := appv1.UnmarshalToUnstructured(*rr.actualState.Manifest) if err != nil { @@ -69,7 +69,7 @@ func getResourceEventPayload( makeDesiredAndLiveManifestEmpty(rr.actualState, rr.desiredState) } - if (rr.rsAsAppInfo.app != nil && rr.rsAsAppInfo.app.DeletionTimestamp != nil) || reportedEntityParentApp.app.ObjectMeta.DeletionTimestamp != nil { + if (rr.rsAsAppInfo != nil && rr.rsAsAppInfo.app != nil && rr.rsAsAppInfo.app.DeletionTimestamp != nil) || reportedEntityParentApp.app.ObjectMeta.DeletionTimestamp != nil { // resource should be deleted in case if application in process of deletion makeDesiredAndLiveManifestEmpty(rr.actualState, rr.desiredState) } @@ -92,9 +92,12 @@ func getResourceEventPayload( syncFinished = &syncStarted } - applicationVersionsEvents, err := utils.RepoAppVersionsToEvent(rr.rsAsAppInfo.applicationVersions) - if err != nil { - logCtx.Errorf("failed to convert appVersions: %v", err) + var applicationVersionsEvents *events.ApplicationVersions + if rr.rsAsAppInfo != nil { + applicationVersionsEvents, err = utils.RepoAppVersionsToEvent(rr.rsAsAppInfo.applicationVersions) + if err != nil { + logCtx.Errorf("failed to convert appVersions: %v", err) + } } source := events.ObjectSource{ @@ -140,7 +143,9 @@ func getResourceEventPayload( AppVersions: applicationVersionsEvents, } - logCtx.Infof("AppVersion before encoding: %v", utils.SafeString(payload.AppVersions.AppVersion)) + if payload.AppVersions != nil { + logCtx.Infof("AppVersion before encoding: %v", utils.SafeString(payload.AppVersions.AppVersion)) + } payloadBytes, err := json.Marshal(&payload) if err != nil { @@ -161,22 +166,20 @@ func getResourceEventPayloadErrors( } // parent application not include errors in application originally was created with broken state, for example in destination missed namespace - if rr.rsAsAppInfo.app != nil && rr.rsAsAppInfo.app.Status.OperationState != nil { - errors = append(errors, parseApplicationSyncResultErrors(rr.rsAsAppInfo.app.Status.OperationState)...) - } + if rr.rsAsAppInfo != nil && rr.rsAsAppInfo.app != nil { + if rr.rsAsAppInfo.app.Status.OperationState != nil { + errors = append(errors, parseApplicationSyncResultErrors(rr.rsAsAppInfo.app.Status.OperationState)...) + } - if rr.rsAsAppInfo.app != nil && rr.rsAsAppInfo.app.Status.Conditions != nil { - errors = append(errors, parseApplicationSyncResultErrorsFromConditions(rr.rsAsAppInfo.app.Status)...) - } + if rr.rsAsAppInfo.app.Status.Conditions != nil { + errors = append(errors, parseApplicationSyncResultErrorsFromConditions(rr.rsAsAppInfo.app.Status)...) + } - if rr.rsAsAppInfo.app != nil { errors = append(errors, parseAggregativeHealthErrorsOfApplication(rr.rsAsAppInfo.app, reportedEntityParentApp.appTree)...) } - if rr.rs.Health != nil { - if rr.rs.Health.Status != health.HealthStatusHealthy { - errors = append(errors, parseAggregativeHealthErrors(rr.rs, reportedEntityParentApp.appTree, false)...) - } + if rr.rs.Health != nil && rr.rs.Health.Status != health.HealthStatusHealthy { + errors = append(errors, parseAggregativeHealthErrors(rr.rs, reportedEntityParentApp.appTree, false)...) } return errors @@ -227,7 +230,7 @@ func addCommitDetailsToUnstructured( u *unstructured.Unstructured, rr *ReportedResource, ) ([]byte, error) { - if rr.rsAsAppInfo.revisionsMetadata != nil { + if rr.rsAsAppInfo != nil && rr.rsAsAppInfo.revisionsMetadata != nil { u = utils.AddCommitsDetailsToAnnotations(u, rr.rsAsAppInfo.revisionsMetadata) if rr.rsAsAppInfo.app != nil { u = utils.AddCommitDetailsToLabels(u, getApplicationLegacyRevisionDetails(rr.rsAsAppInfo.app, rr.rsAsAppInfo.revisionsMetadata)) diff --git a/event_reporter/reporter/types.go b/event_reporter/reporter/types.go index ef85526f60b6e..ff7f1948377d2 100644 --- a/event_reporter/reporter/types.go +++ b/event_reporter/reporter/types.go @@ -22,10 +22,9 @@ type ReportedResourceAsApp struct { } type ReportedEntityParentApp struct { - app *appv1.Application - appTree *appv1.ApplicationTree - validatedDestination *appv1.ApplicationDestination - revisionsMetadata *utils.AppSyncRevisionsMetadata + app *appv1.Application + appTree *appv1.ApplicationTree + revisionsMetadata *utils.AppSyncRevisionsMetadata } type ArgoTrackingMetadata struct { From d27ef80d391649bd544560aeb0f3e45960744b61 Mon Sep 17 00:00:00 2001 From: oleksandr-codefresh Date: Thu, 7 Nov 2024 11:29:14 +0200 Subject: [PATCH 08/27] event-reporter(refactoring): fixed lint issue --- event_reporter/reporter/event_payload.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/event_reporter/reporter/event_payload.go b/event_reporter/reporter/event_payload.go index e8fcf8f5e6f27..051d267302991 100644 --- a/event_reporter/reporter/event_payload.go +++ b/event_reporter/reporter/event_payload.go @@ -159,7 +159,7 @@ func getResourceEventPayloadErrors( rr *ReportedResource, reportedEntityParentApp *ReportedEntityParentApp, ) []*events.ObjectError { - var errors = []*events.ObjectError{} + var errors []*events.ObjectError if reportedEntityParentApp.app.Status.OperationState != nil { errors = append(errors, parseResourceSyncResultErrors(rr.rs, reportedEntityParentApp.app.Status.OperationState)...) From c9651456b21528dee9e49b15e1793344c91ed9b7 Mon Sep 17 00:00:00 2001 From: oleksandr-codefresh Date: Thu, 7 Nov 2024 11:53:58 +0200 Subject: [PATCH 09/27] event-reporter(refactoring): fixed lint issue --- event_reporter/reporter/event_payload.go | 1 - 1 file changed, 1 deletion(-) diff --git a/event_reporter/reporter/event_payload.go b/event_reporter/reporter/event_payload.go index 051d267302991..4016fb8be8080 100644 --- a/event_reporter/reporter/event_payload.go +++ b/event_reporter/reporter/event_payload.go @@ -42,7 +42,6 @@ func getResourceEventPayload( if rr.rsAsAppInfo != nil && rr.rsAsAppInfo.revisionsMetadata != nil && len(object) != 0 { actualObject, err := appv1.UnmarshalToUnstructured(*rr.actualState.Manifest) - if err != nil { return nil, fmt.Errorf("failed to unmarshal manifest: %w", err) } From 194ce2e5c990a60e8905c9716133db28f4746ff0 Mon Sep 17 00:00:00 2001 From: oleksandr-codefresh Date: Thu, 24 Oct 2024 14:02:18 +0300 Subject: [PATCH 10/27] event-reporter: added agroDb to ApplicationEventReporter --- event_reporter/controller/controller.go | 5 +++-- event_reporter/reporter/application_event_reporter.go | 6 +++++- event_reporter/server.go | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/event_reporter/controller/controller.go b/event_reporter/controller/controller.go index 85aba07fb7b7f..597f8220c429b 100644 --- a/event_reporter/controller/controller.go +++ b/event_reporter/controller/controller.go @@ -2,6 +2,7 @@ package controller import ( "context" + "github.com/argoproj/argo-cd/v2/util/db" "math" "strings" "time" @@ -43,7 +44,7 @@ type eventReporterController struct { metricsServer *metrics.MetricsServer } -func NewEventReporterController(appInformer cache.SharedIndexInformer, cache *servercache.Cache, settingsMgr *settings.SettingsManager, applicationServiceClient appclient.ApplicationClient, appLister applisters.ApplicationLister, codefreshConfig *codefresh.CodefreshConfig, metricsServer *metrics.MetricsServer, featureManager *reporter.FeatureManager, rateLimiterOpts *reporter.RateLimiterOpts) EventReporterController { +func NewEventReporterController(appInformer cache.SharedIndexInformer, cache *servercache.Cache, settingsMgr *settings.SettingsManager, applicationServiceClient appclient.ApplicationClient, appLister applisters.ApplicationLister, codefreshConfig *codefresh.CodefreshConfig, metricsServer *metrics.MetricsServer, featureManager *reporter.FeatureManager, rateLimiterOpts *reporter.RateLimiterOpts, db db.ArgoDB) EventReporterController { appBroadcaster := reporter.NewBroadcaster(featureManager, metricsServer, rateLimiterOpts) _, err := appInformer.AddEventHandler(appBroadcaster) if err != nil { @@ -51,7 +52,7 @@ func NewEventReporterController(appInformer cache.SharedIndexInformer, cache *se } return &eventReporterController{ appBroadcaster: appBroadcaster, - applicationEventReporter: reporter.NewApplicationEventReporter(cache, applicationServiceClient, appLister, codefreshConfig, metricsServer), + applicationEventReporter: reporter.NewApplicationEventReporter(cache, applicationServiceClient, appLister, codefreshConfig, metricsServer, db), cache: cache, settingsMgr: settingsMgr, applicationServiceClient: applicationServiceClient, diff --git a/event_reporter/reporter/application_event_reporter.go b/event_reporter/reporter/application_event_reporter.go index 4b5c72cde7a07..73e1481857965 100644 --- a/event_reporter/reporter/application_event_reporter.go +++ b/event_reporter/reporter/application_event_reporter.go @@ -9,6 +9,8 @@ import ( "strings" "time" + "github.com/argoproj/argo-cd/v2/util/db" + "github.com/argoproj/argo-cd/v2/event_reporter/utils" "github.com/argoproj/argo-cd/v2/reposerver/apiclient" @@ -40,6 +42,7 @@ type applicationEventReporter struct { appLister applisters.ApplicationLister applicationServiceClient appclient.ApplicationClient metricsServer *metrics.MetricsServer + db db.ArgoDB } type ApplicationEventReporter interface { @@ -53,13 +56,14 @@ type ApplicationEventReporter interface { ShouldSendApplicationEvent(ae *appv1.ApplicationWatchEvent) (shouldSend bool, syncStatusChanged bool) } -func NewApplicationEventReporter(cache *servercache.Cache, applicationServiceClient appclient.ApplicationClient, appLister applisters.ApplicationLister, codefreshConfig *codefresh.CodefreshConfig, metricsServer *metrics.MetricsServer) ApplicationEventReporter { +func NewApplicationEventReporter(cache *servercache.Cache, applicationServiceClient appclient.ApplicationClient, appLister applisters.ApplicationLister, codefreshConfig *codefresh.CodefreshConfig, metricsServer *metrics.MetricsServer, db db.ArgoDB) ApplicationEventReporter { return &applicationEventReporter{ cache: cache, applicationServiceClient: applicationServiceClient, codefreshClient: codefresh.NewCodefreshClient(codefreshConfig), appLister: appLister, metricsServer: metricsServer, + db: db, } } diff --git a/event_reporter/server.go b/event_reporter/server.go index aaad53fde3ddf..6c23dcf099d44 100644 --- a/event_reporter/server.go +++ b/event_reporter/server.go @@ -153,7 +153,7 @@ func (a *EventReporterServer) Init(ctx context.Context) { } func (a *EventReporterServer) RunController(ctx context.Context) { - controller := event_reporter.NewEventReporterController(a.appInformer, a.Cache, a.settingsMgr, a.ApplicationServiceClient, a.appLister, a.CodefreshConfig, a.serviceSet.MetricsServer, a.featureManager, a.RateLimiterOpts) + controller := event_reporter.NewEventReporterController(a.appInformer, a.Cache, a.settingsMgr, a.ApplicationServiceClient, a.appLister, a.CodefreshConfig, a.serviceSet.MetricsServer, a.featureManager, a.RateLimiterOpts, a.db) go controller.Run(ctx) } From 31c0224a322fe9c7dc7183cad7cf02b4370db059 Mon Sep 17 00:00:00 2001 From: oleksandr-codefresh Date: Thu, 24 Oct 2024 19:08:02 +0300 Subject: [PATCH 11/27] event-reporter: ObjectSource message proto extended to report operationSyncRevisions, destServer, destName, appMultiSourced --- pkg/apiclient/events/events.pb.go | 396 +++++++++++++++++++++++------- server/application/events.proto | 8 +- 2 files changed, 310 insertions(+), 94 deletions(-) diff --git a/pkg/apiclient/events/events.pb.go b/pkg/apiclient/events/events.pb.go index d484348341781..fac639fa5b4c9 100644 --- a/pkg/apiclient/events/events.pb.go +++ b/pkg/apiclient/events/events.pb.go @@ -238,32 +238,36 @@ func (m *EventPayload) GetAppVersions() *ApplicationVersions { // * // Holds information about the object source type ObjectSource struct { - DesiredManifest string `protobuf:"bytes,1,opt,name=desiredManifest" json:"desiredManifest"` - ActualManifest string `protobuf:"bytes,2,opt,name=actualManifest" json:"actualManifest"` - GitManifest string `protobuf:"bytes,3,opt,name=gitManifest" json:"gitManifest"` - RepoURL string `protobuf:"bytes,4,opt,name=repoURL" json:"repoURL"` - Path string `protobuf:"bytes,5,opt,name=path" json:"path"` - Revision string `protobuf:"bytes,6,opt,name=revision" json:"revision"` - CommitMessage string `protobuf:"bytes,7,opt,name=commitMessage" json:"commitMessage"` - CommitAuthor string `protobuf:"bytes,8,opt,name=commitAuthor" json:"commitAuthor"` - CommitDate *v1.Time `protobuf:"bytes,9,opt,name=commitDate" json:"commitDate,omitempty"` - AppName string `protobuf:"bytes,10,opt,name=appName" json:"appName"` - AppLabels map[string]string `protobuf:"bytes,11,rep,name=appLabels" json:"appLabels" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - SyncStatus string `protobuf:"bytes,12,opt,name=syncStatus" json:"syncStatus"` - SyncStartedAt v1.Time `protobuf:"bytes,13,opt,name=syncStartedAt" json:"syncStartedAt"` - SyncFinishedAt *v1.Time `protobuf:"bytes,14,opt,name=syncFinishedAt" json:"syncFinishedAt,omitempty"` - HealthStatus *string `protobuf:"bytes,15,opt,name=healthStatus" json:"healthStatus,omitempty"` - HealthMessage *string `protobuf:"bytes,16,opt,name=healthMessage" json:"healthMessage,omitempty"` - Cluster string `protobuf:"bytes,17,opt,name=cluster" json:"cluster"` - HistoryId int64 `protobuf:"varint,18,opt,name=historyId" json:"historyId"` - OperationSyncRevision string `protobuf:"bytes,19,opt,name=operationSyncRevision" json:"operationSyncRevision"` - AppUID string `protobuf:"bytes,20,opt,name=appUID" json:"appUID"` - AppNamespace string `protobuf:"bytes,21,opt,name=appNamespace" json:"appNamespace"` - AppInstanceLabelKey string `protobuf:"bytes,22,opt,name=appInstanceLabelKey" json:"appInstanceLabelKey"` - TrackingMethod string `protobuf:"bytes,23,opt,name=trackingMethod" json:"trackingMethod"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + DesiredManifest string `protobuf:"bytes,1,opt,name=desiredManifest" json:"desiredManifest"` + ActualManifest string `protobuf:"bytes,2,opt,name=actualManifest" json:"actualManifest"` + GitManifest string `protobuf:"bytes,3,opt,name=gitManifest" json:"gitManifest"` + RepoURL string `protobuf:"bytes,4,opt,name=repoURL" json:"repoURL"` + Path string `protobuf:"bytes,5,opt,name=path" json:"path"` + Revision string `protobuf:"bytes,6,opt,name=revision" json:"revision"` + CommitMessage string `protobuf:"bytes,7,opt,name=commitMessage" json:"commitMessage"` + CommitAuthor string `protobuf:"bytes,8,opt,name=commitAuthor" json:"commitAuthor"` + CommitDate *v1.Time `protobuf:"bytes,9,opt,name=commitDate" json:"commitDate,omitempty"` + AppName string `protobuf:"bytes,10,opt,name=appName" json:"appName"` + AppLabels map[string]string `protobuf:"bytes,11,rep,name=appLabels" json:"appLabels" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + SyncStatus string `protobuf:"bytes,12,opt,name=syncStatus" json:"syncStatus"` + SyncStartedAt v1.Time `protobuf:"bytes,13,opt,name=syncStartedAt" json:"syncStartedAt"` + SyncFinishedAt *v1.Time `protobuf:"bytes,14,opt,name=syncFinishedAt" json:"syncFinishedAt,omitempty"` + HealthStatus *string `protobuf:"bytes,15,opt,name=healthStatus" json:"healthStatus,omitempty"` + HealthMessage *string `protobuf:"bytes,16,opt,name=healthMessage" json:"healthMessage,omitempty"` + Cluster string `protobuf:"bytes,17,opt,name=cluster" json:"cluster"` + HistoryId int64 `protobuf:"varint,18,opt,name=historyId" json:"historyId"` + OperationSyncRevision string `protobuf:"bytes,19,opt,name=operationSyncRevision" json:"operationSyncRevision"` + AppUID string `protobuf:"bytes,20,opt,name=appUID" json:"appUID"` + AppNamespace string `protobuf:"bytes,21,opt,name=appNamespace" json:"appNamespace"` + AppInstanceLabelKey string `protobuf:"bytes,22,opt,name=appInstanceLabelKey" json:"appInstanceLabelKey"` + TrackingMethod string `protobuf:"bytes,23,opt,name=trackingMethod" json:"trackingMethod"` + OperationSyncRevisions []string `protobuf:"bytes,24,rep,name=operationSyncRevisions" json:"operationSyncRevisions,omitempty"` + DestServer string `protobuf:"bytes,25,req,name=destServer" json:"destServer"` + DestName *string `protobuf:"bytes,26,opt,name=destName" json:"destName,omitempty"` + AppMultiSourced bool `protobuf:"varint,27,req,name=appMultiSourced" json:"appMultiSourced"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *ObjectSource) Reset() { *m = ObjectSource{} } @@ -460,6 +464,34 @@ func (m *ObjectSource) GetTrackingMethod() string { return "" } +func (m *ObjectSource) GetOperationSyncRevisions() []string { + if m != nil { + return m.OperationSyncRevisions + } + return nil +} + +func (m *ObjectSource) GetDestServer() string { + if m != nil { + return m.DestServer + } + return "" +} + +func (m *ObjectSource) GetDestName() string { + if m != nil && m.DestName != nil { + return *m.DestName + } + return "" +} + +func (m *ObjectSource) GetAppMultiSourced() bool { + if m != nil { + return m.AppMultiSourced + } + return false +} + // * // Holds error information; present only when error sent with application but not resource itself type ObjectError struct { @@ -760,72 +792,76 @@ func init() { func init() { proto.RegisterFile("server/application/events.proto", fileDescriptor_3ad9267ec62b112f) } var fileDescriptor_3ad9267ec62b112f = []byte{ - // 1038 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcd, 0x6e, 0x1b, 0x37, - 0x10, 0xee, 0xca, 0xb2, 0x1d, 0x8d, 0x64, 0x27, 0xa5, 0xed, 0x94, 0x30, 0x5c, 0x47, 0x10, 0x8c, - 0x42, 0x08, 0x92, 0x15, 0xec, 0xfe, 0x20, 0x09, 0x8a, 0x02, 0x0e, 0xec, 0xb6, 0x6e, 0xed, 0xb6, - 0x58, 0x37, 0x39, 0xe4, 0x46, 0xef, 0x8e, 0x57, 0x8c, 0x56, 0x24, 0x4b, 0x52, 0x02, 0x74, 0xef, - 0xd3, 0xf4, 0x49, 0x72, 0xec, 0x13, 0x14, 0x85, 0x2f, 0x7d, 0x87, 0x9e, 0x0a, 0x72, 0x57, 0x32, - 0xd7, 0xd5, 0xa1, 0xe9, 0x8d, 0xfc, 0xe6, 0x9b, 0x21, 0xe7, 0x97, 0x84, 0x47, 0x06, 0xf5, 0x14, - 0xf5, 0x80, 0x29, 0x55, 0xf0, 0x94, 0x59, 0x2e, 0xc5, 0x00, 0xa7, 0x28, 0xac, 0x89, 0x95, 0x96, - 0x56, 0x92, 0xf5, 0x1c, 0x05, 0x6a, 0x9e, 0xee, 0x9e, 0xe7, 0xdc, 0x0e, 0x27, 0x57, 0x71, 0x2a, - 0xc7, 0x03, 0xa6, 0x73, 0xa9, 0xb4, 0x7c, 0xeb, 0x17, 0x4f, 0xd3, 0x6c, 0x30, 0x3d, 0x1a, 0xa8, - 0x51, 0x3e, 0x60, 0x8a, 0x9b, 0x9a, 0xa9, 0xe9, 0x21, 0x2b, 0xd4, 0x90, 0x1d, 0x0e, 0xbc, 0x15, - 0x66, 0x31, 0x2b, 0xcd, 0xee, 0x7e, 0x36, 0x7a, 0x66, 0x62, 0x2e, 0x9d, 0xc6, 0x98, 0xa5, 0x43, - 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x58, 0x99, 0xa1, 0x84, 0x7c, 0x01, 0x5b, 0x4c, 0xa9, 0x33, 0x61, 0x2c, 0x13, 0x29, - 0xfa, 0xc4, 0x7f, 0x8f, 0x33, 0xfa, 0x30, 0x50, 0x58, 0x46, 0x70, 0x9d, 0x6d, 0x35, 0x4b, 0x47, - 0x5c, 0xe4, 0x17, 0x68, 0x87, 0x32, 0xa3, 0x1f, 0x85, 0x9d, 0x5d, 0x97, 0xed, 0x7e, 0x09, 0x9b, - 0xf5, 0x62, 0x23, 0x0f, 0x60, 0x65, 0x84, 0xb3, 0x72, 0x7a, 0x24, 0x6e, 0x49, 0xb6, 0x61, 0x75, - 0xca, 0x8a, 0x09, 0x96, 0x23, 0x22, 0x29, 0x37, 0x2f, 0x1a, 0xcf, 0xa2, 0xde, 0xdf, 0x11, 0xb4, - 0x83, 0xf1, 0xe6, 0xfa, 0xdb, 0xce, 0x14, 0xd6, 0x46, 0x8f, 0x47, 0xc8, 0x2e, 0xac, 0x16, 0x38, - 0xc5, 0xa2, 0x36, 0x66, 0x4a, 0xc8, 0x65, 0x6c, 0x5c, 0x65, 0x34, 0x9c, 0x2c, 0x73, 0x90, 0x9c, - 0xc3, 0xbd, 0x82, 0x19, 0x7b, 0x89, 0x28, 0xfc, 0x58, 0xf9, 0x3f, 0x25, 0xbc, 0xb0, 0x40, 0xbe, - 0x81, 0xfb, 0xe5, 0xc8, 0x4e, 0xf0, 0x1a, 0x35, 0x8a, 0x14, 0xab, 0xf1, 0xfb, 0xf1, 0xa2, 0x17, - 0xbd, 0x33, 0x97, 0x75, 0x52, 0x72, 0x57, 0xab, 0xf7, 0x5b, 0x04, 0xdb, 0xcb, 0x98, 0xce, 0xd7, - 0x5c, 0xcb, 0x89, 0xaa, 0x85, 0xa1, 0x84, 0x9c, 0xaf, 0xd3, 0x72, 0x88, 0xd7, 0x22, 0x31, 0x07, - 0x5d, 0x04, 0x47, 0x5c, 0x64, 0xfe, 0xcd, 0x59, 0x44, 0xd0, 0x21, 0x4e, 0xe2, 0x9f, 0xc2, 0x66, - 0x28, 0xf1, 0x0f, 0x62, 0x0f, 0x5a, 0x62, 0x51, 0x50, 0xe1, 0x68, 0xbd, 0x85, 0x7b, 0x6f, 0xa0, - 0x73, 0x82, 0x0a, 0x45, 0x86, 0x22, 0xe5, 0x68, 0xdc, 0xc3, 0x5a, 0xc8, 0x74, 0x54, 0xa5, 0xd9, - 0xaf, 0x1d, 0x96, 0xa1, 0x32, 0x55, 0x9a, 0xfd, 0xda, 0xf5, 0xa5, 0xc6, 0x5f, 0x26, 0x5c, 0xe3, - 0xd8, 0xfd, 0x4d, 0xca, 0x04, 0x25, 0x35, 0xac, 0xa7, 0x60, 0x6b, 0xc9, 0x83, 0x45, 0xf6, 0x01, - 0x6e, 0x9f, 0xac, 0xea, 0xa0, 0x00, 0x21, 0xcf, 0xa1, 0x93, 0x05, 0x57, 0xf2, 0xc7, 0x86, 0xcf, - 0x6c, 0x78, 0xdf, 0xa4, 0x46, 0x7d, 0x79, 0xfc, 0xee, 0x66, 0x3f, 0xfa, 0xfd, 0x66, 0x3f, 0xfa, - 0xf3, 0x66, 0x3f, 0x7a, 0xf3, 0xe9, 0x7f, 0xfb, 0x20, 0xa5, 0x05, 0x47, 0x61, 0xab, 0x4f, 0xd6, - 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xd4, 0x18, 0x11, 0xf8, 0x80, 0x09, 0x00, 0x00, + // 1098 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x5f, 0x8f, 0x1b, 0x35, + 0x10, 0x67, 0x73, 0xff, 0x27, 0xb9, 0x6b, 0x71, 0xaf, 0xc5, 0x84, 0x72, 0x8d, 0xa2, 0x0a, 0x45, + 0x55, 0xbb, 0x51, 0x0f, 0xa8, 0xda, 0x0a, 0x21, 0x5d, 0xd5, 0x02, 0x85, 0x3b, 0x40, 0x7b, 0xb4, +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 0x41, 0x77, 0x83, 0x53, 0x2e, + 0x32, 0x3f, 0x1d, 0x9b, 0x1b, 0x74, 0x88, 0xd3, 0xf8, 0xa1, 0xbd, 0x19, 0x6a, 0xfc, 0xe8, 0x1e, + 0xc2, 0x9e, 0x68, 0x4a, 0x3f, 0x1c, 0x02, 0x17, 0xf0, 0xf0, 0x05, 0xf4, 0x1e, 0xa3, 0x42, 0x91, + 0xa1, 0x48, 0x39, 0x1a, 0xf7, 0x05, 0x28, 0x64, 0x3a, 0xad, 0xd2, 0xec, 0xd7, 0x0e, 0xcb, 0x50, + 0x99, 0x2a, 0xcd, 0x7e, 0xed, 0x3a, 0x88, 0xc6, 0x9f, 0xe7, 0x5c, 0xe3, 0xcc, 0xfd, 0xa2, 0xca, + 0x04, 0x25, 0x2d, 0x6c, 0xa8, 0xe0, 0xca, 0x9a, 0xd1, 0x4a, 0x8e, 0x00, 0x2e, 0x86, 0x6b, 0xb5, + 0x51, 0x80, 0x90, 0x07, 0xd0, 0xcb, 0x82, 0x23, 0xf9, 0x6d, 0xc3, 0x0f, 0x41, 0x78, 0xde, 0xa4, + 0x45, 0x7d, 0x74, 0xf2, 0xe6, 0xed, 0x51, 0xf4, 0xdb, 0xdb, 0xa3, 0xe8, 0x8f, 0xb7, 0x47, 0xd1, + 0x8b, 0x4f, 0xff, 0xdb, 0x57, 0x2e, 0x2d, 0x38, 0x0a, 0x5b, 0x7d, 0x07, 0xff, 0x0e, 0x00, 0x00, + 0xff, 0xff, 0x18, 0xfd, 0x2a, 0xbe, 0x2a, 0x0a, 0x00, 0x00, } func (m *EventSource) Marshal() (dAtA []byte, err error) { @@ -1021,6 +1057,43 @@ func (m *ObjectSource) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + i-- + if m.AppMultiSourced { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xd8 + if m.DestName != nil { + i -= len(*m.DestName) + copy(dAtA[i:], *m.DestName) + i = encodeVarintEvents(dAtA, i, uint64(len(*m.DestName))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xd2 + } + i -= len(m.DestServer) + copy(dAtA[i:], m.DestServer) + i = encodeVarintEvents(dAtA, i, uint64(len(m.DestServer))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xca + if len(m.OperationSyncRevisions) > 0 { + for iNdEx := len(m.OperationSyncRevisions) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.OperationSyncRevisions[iNdEx]) + copy(dAtA[i:], m.OperationSyncRevisions[iNdEx]) + i = encodeVarintEvents(dAtA, i, uint64(len(m.OperationSyncRevisions[iNdEx]))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xc2 + } + } i -= len(m.TrackingMethod) copy(dAtA[i:], m.TrackingMethod) i = encodeVarintEvents(dAtA, i, uint64(len(m.TrackingMethod))) @@ -1548,6 +1621,19 @@ func (m *ObjectSource) Size() (n int) { n += 2 + l + sovEvents(uint64(l)) l = len(m.TrackingMethod) n += 2 + l + sovEvents(uint64(l)) + if len(m.OperationSyncRevisions) > 0 { + for _, s := range m.OperationSyncRevisions { + l = len(s) + n += 2 + l + sovEvents(uint64(l)) + } + } + l = len(m.DestServer) + n += 2 + l + sovEvents(uint64(l)) + if m.DestName != nil { + l = len(*m.DestName) + n += 2 + l + sovEvents(uint64(l)) + } + n += 3 if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -2137,6 +2223,7 @@ func (m *EventPayload) Unmarshal(dAtA []byte) error { return nil } func (m *ObjectSource) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2994,6 +3081,125 @@ func (m *ObjectSource) Unmarshal(dAtA []byte) error { } m.TrackingMethod = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 24: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OperationSyncRevisions", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OperationSyncRevisions = append(m.OperationSyncRevisions, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 25: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestServer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestServer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 26: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.DestName = &s + iNdEx = postIndex + case 27: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AppMultiSourced", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.AppMultiSourced = bool(v != 0) + hasFields[0] |= uint64(0x00000002) default: iNdEx = preIndex skippy, err := skipEvents(dAtA[iNdEx:]) @@ -3010,6 +3216,12 @@ func (m *ObjectSource) Unmarshal(dAtA []byte) error { iNdEx += skippy } } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("destServer") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("appMultiSourced") + } if iNdEx > l { return io.ErrUnexpectedEOF diff --git a/server/application/events.proto b/server/application/events.proto index f70d522e17a78..70095fbadf685 100644 --- a/server/application/events.proto +++ b/server/application/events.proto @@ -66,13 +66,17 @@ message ObjectSource { optional k8s.io.apimachinery.pkg.apis.meta.v1.Time syncFinishedAt = 14; optional string healthStatus = 15; optional string healthMessage = 16; - optional string cluster = 17 [(gogoproto.nullable) = false]; - optional int64 historyId = 18 [(gogoproto.nullable) = false]; + optional string cluster = 17 [(gogoproto.nullable) = false]; // legacy, returns only server, empty if destinatin.name used + optional int64 historyId = 18 [(gogoproto.nullable) = false]; // legacy optional string operationSyncRevision = 19 [(gogoproto.nullable) = false]; optional string appUID = 20 [(gogoproto.nullable) = false]; optional string appNamespace = 21 [(gogoproto.nullable) = false]; optional string appInstanceLabelKey = 22 [(gogoproto.nullable) = false]; optional string trackingMethod = 23 [(gogoproto.nullable) = false]; + repeated string operationSyncRevisions = 24; + required string destServer = 25 [(gogoproto.nullable) = false]; + optional string destName = 26; + required bool appMultiSourced = 27 [(gogoproto.nullable) = false]; } /** From 3408db6841ae25e6c783ec643a8c6061f56f8bba Mon Sep 17 00:00:00 2001 From: oleksandr-codefresh Date: Thu, 24 Oct 2024 19:10:20 +0300 Subject: [PATCH 12/27] event-reporter / utils: added func GetOperationRevisions --- event_reporter/utils/app_revision.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/event_reporter/utils/app_revision.go b/event_reporter/utils/app_revision.go index f4bb1bcb232ae..1af805b7e25bc 100644 --- a/event_reporter/utils/app_revision.go +++ b/event_reporter/utils/app_revision.go @@ -65,6 +65,22 @@ func GetOperationRevision(a *appv1.Application) string { return revision } +func GetOperationRevisions(a *appv1.Application) []string { + if a == nil { + return nil + } + + // this value will be used in case if application hasn't resources , like gitsource + revisions := a.Status.Sync.Revisions + if a.Status.OperationState != nil && a.Status.OperationState.Operation.Sync != nil && a.Status.OperationState.Operation.Sync.Revisions != nil && len(a.Status.OperationState.Operation.Sync.Revisions) > 0 { + revisions = a.Status.OperationState.Operation.Sync.Revisions + } else if a.Operation != nil && a.Operation.Sync != nil && a.Operation.Sync.Revisions != nil && len(a.Operation.Sync.Revisions) > 0 { + revisions = a.Operation.Sync.Revisions + } + + return revisions +} + func GetOperationStateRevision(a *appv1.Application) *string { if a == nil || a.Status.OperationState == nil || a.Status.OperationState.SyncResult == nil { return nil From 673460c5d3fe7903f3feabf262d9c42e2c092eb0 Mon Sep 17 00:00:00 2001 From: oleksandr-codefresh Date: Thu, 7 Nov 2024 16:49:54 +0200 Subject: [PATCH 13/27] event-reporter(non-grpc app client): added support of new query params SourcePositions, Revisions for GetManifests request --- event_reporter/application/client.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/event_reporter/application/client.go b/event_reporter/application/client.go index 3c4fd356c092c..e87131cd9f9c6 100644 --- a/event_reporter/application/client.go +++ b/event_reporter/application/client.go @@ -126,6 +126,16 @@ func (c *httpApplicationClient) GetManifests(ctx context.Context, in *appclient. if in.Revision != nil { params = fmt.Sprintf("%s&revision=%s", params, *in.Revision) } + if in.SourcePositions != nil && len(in.SourcePositions) > 0 { + for _, sourcePosition := range in.SourcePositions { + params = fmt.Sprintf("%s&sourcePositions=%s", params, sourcePosition) + } + } + if in.Revisions != nil && len(in.Revisions) > 0 { + for _, revision := range in.Revisions { + params = fmt.Sprintf("%s&revisions=%s", params, revision) + } + } url := fmt.Sprintf("%s/api/v1/applications/%s/manifests%s", c.baseUrl, *in.Name, params) manifest := &repoapiclient.ManifestResponse{} From a8ff5c09e7c1472f08d07e17751e4a0d2bf9bf67 Mon Sep 17 00:00:00 2001 From: oleksandr-codefresh Date: Thu, 7 Nov 2024 16:50:58 +0200 Subject: [PATCH 14/27] event-reporter(getDesiredManifests): updated logic to retrieve appVersion for multi-sourced applications based on sync result revisions --- .../reporter/application_event_reporter.go | 51 +++++++++++++++---- event_reporter/utils/app_revision.go | 10 +++- 2 files changed, 49 insertions(+), 12 deletions(-) diff --git a/event_reporter/reporter/application_event_reporter.go b/event_reporter/reporter/application_event_reporter.go index 73e1481857965..6d62a5f351805 100644 --- a/event_reporter/reporter/application_event_reporter.go +++ b/event_reporter/reporter/application_event_reporter.go @@ -91,15 +91,28 @@ func (s *applicationEventReporter) shouldSendResourceEvent(a *appv1.Application, return true } -func (r *applicationEventReporter) getDesiredManifests(ctx context.Context, a *appv1.Application, revision *string, logCtx *log.Entry) (*apiclient.ManifestResponse, bool) { +func (r *applicationEventReporter) getDesiredManifests( + ctx context.Context, + logCtx *log.Entry, + a *appv1.Application, + revision *string, + sourcePositions *[]int64, + revisions *[]string, +) (*apiclient.ManifestResponse, bool) { // get the desired state manifests of the application project := a.Spec.GetProject() - desiredManifests, err := r.applicationServiceClient.GetManifests(ctx, &application.ApplicationManifestQuery{ + query := application.ApplicationManifestQuery{ Name: &a.Name, AppNamespace: &a.Namespace, Revision: revision, Project: &project, - }) + } + if sourcePositions != nil && query.Revisions != nil { + query.SourcePositions = *sourcePositions + query.Revisions = *revisions + } + + desiredManifests, err := r.applicationServiceClient.GetManifests(ctx, &query) if err != nil { // if it's manifest generation error we need to still report the actual state // of the resources, but since we can't get the desired state, we will report @@ -141,7 +154,7 @@ func (s *applicationEventReporter) StreamApplicationEvents( logCtx.Info("getting desired manifests") - desiredManifests, manifestGenErr := s.getDesiredManifests(ctx, a, nil, logCtx) + desiredManifests, manifestGenErr := s.getDesiredManifests(ctx, logCtx, a, nil, nil, nil) applicationVersions := s.resolveApplicationVersions(ctx, a, logCtx) @@ -162,7 +175,7 @@ func (s *applicationEventReporter) StreamApplicationEvents( rs := utils.GetAppAsResource(a) utils.SetHealthStatusIfMissing(rs) - parentDesiredManifests, manifestGenErr := s.getDesiredManifests(ctx, parentApplicationEntity, nil, logCtx) + parentDesiredManifests, manifestGenErr := s.getDesiredManifests(ctx, logCtx, parentApplicationEntity, nil, nil, nil) parentAppSyncRevisionsMetadata, err := s.getApplicationRevisionsMetadata(ctx, logCtx, parentApplicationEntity) if err != nil { @@ -226,14 +239,30 @@ func (s *applicationEventReporter) StreamApplicationEvents( return nil } +// returns appVersion from first non-ref source for multisourced apps func (s *applicationEventReporter) resolveApplicationVersions(ctx context.Context, a *appv1.Application, logCtx *log.Entry) *apiclient.ApplicationVersions { - syncRevision := utils.GetOperationStateRevision(a) var applicationVersions *apiclient.ApplicationVersions - if syncRevision != nil { - syncManifests, _ := s.getDesiredManifests(ctx, a, syncRevision, logCtx) - applicationVersions = syncManifests.GetApplicationVersions() - } else { - applicationVersions = nil + + if a.Spec.HasMultipleSources() { + syncResultRevisions := utils.GetOperationSyncResultRevisions(a) + if syncResultRevisions == nil { + return applicationVersions + } + + var sourcePositions []int64 + for i := 0; i < len(*syncResultRevisions); i++ { + sourcePositions = append(sourcePositions, int64(i+1)) + } + + syncManifests, _ := s.getDesiredManifests(ctx, logCtx, a, nil, &sourcePositions, syncResultRevisions) + return syncManifests.GetApplicationVersions() + } + + syncResultRevision := utils.GetOperationSyncResultRevision(a) + + if syncResultRevision != nil { + syncManifests, _ := s.getDesiredManifests(ctx, logCtx, a, syncResultRevision, nil, nil) + return syncManifests.GetApplicationVersions() } return applicationVersions diff --git a/event_reporter/utils/app_revision.go b/event_reporter/utils/app_revision.go index 1af805b7e25bc..0ff0eb8429ac4 100644 --- a/event_reporter/utils/app_revision.go +++ b/event_reporter/utils/app_revision.go @@ -81,7 +81,7 @@ func GetOperationRevisions(a *appv1.Application) []string { return revisions } -func GetOperationStateRevision(a *appv1.Application) *string { +func GetOperationSyncResultRevision(a *appv1.Application) *string { if a == nil || a.Status.OperationState == nil || a.Status.OperationState.SyncResult == nil { return nil } @@ -89,6 +89,14 @@ func GetOperationStateRevision(a *appv1.Application) *string { return &a.Status.OperationState.SyncResult.Revision } +func GetOperationSyncResultRevisions(a *appv1.Application) *[]string { + if a == nil || a.Status.OperationState == nil || a.Status.OperationState.SyncResult == nil { + return nil + } + + return &a.Status.OperationState.SyncResult.Revisions +} + func GetOperationSyncRevisions(a *appv1.Application) []string { if a == nil { return []string{} From fb8e25f72190abd936723b9b7a3a1c74a3e96a64 Mon Sep 17 00:00:00 2001 From: oleksandr-codefresh Date: Thu, 7 Nov 2024 16:58:03 +0200 Subject: [PATCH 15/27] event-reporter(resource source payload): added new field OperationSyncRevisions --- event_reporter/reporter/event_payload.go | 37 ++++++++++++------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/event_reporter/reporter/event_payload.go b/event_reporter/reporter/event_payload.go index 4016fb8be8080..881f25fdae097 100644 --- a/event_reporter/reporter/event_payload.go +++ b/event_reporter/reporter/event_payload.go @@ -100,24 +100,25 @@ func getResourceEventPayload( } source := events.ObjectSource{ - DesiredManifest: rr.desiredState.CompiledManifest, - ActualManifest: *rr.actualState.Manifest, - GitManifest: rr.desiredState.RawManifest, - RepoURL: reportedEntityParentApp.app.Status.Sync.ComparedTo.Source.RepoURL, - Path: rr.desiredState.Path, - Revision: utils.GetApplicationLatestRevision(reportedEntityParentApp.app), - OperationSyncRevision: utils.GetOperationRevision(reportedEntityParentApp.app), - HistoryId: utils.GetLatestAppHistoryId(reportedEntityParentApp.app), - AppName: reportedEntityParentApp.app.Name, - AppNamespace: reportedEntityParentApp.app.Namespace, - AppUID: string(reportedEntityParentApp.app.ObjectMeta.UID), - AppLabels: reportedEntityParentApp.app.Labels, - SyncStatus: string(rr.rs.Status), - SyncStartedAt: syncStarted, - SyncFinishedAt: syncFinished, - Cluster: reportedEntityParentApp.app.Spec.Destination.Server, - AppInstanceLabelKey: *argoTrackingMetadata.AppInstanceLabelKey, - TrackingMethod: string(*argoTrackingMetadata.TrackingMethod), + DesiredManifest: rr.desiredState.CompiledManifest, + ActualManifest: *rr.actualState.Manifest, + GitManifest: rr.desiredState.RawManifest, + RepoURL: reportedEntityParentApp.app.Status.Sync.ComparedTo.Source.RepoURL, + Path: rr.desiredState.Path, + Revision: utils.GetApplicationLatestRevision(reportedEntityParentApp.app), + OperationSyncRevision: utils.GetOperationRevision(reportedEntityParentApp.app), + OperationSyncRevisions: utils.GetOperationRevisions(reportedEntityParentApp.app), + HistoryId: utils.GetLatestAppHistoryId(reportedEntityParentApp.app), + AppName: reportedEntityParentApp.app.Name, + AppNamespace: reportedEntityParentApp.app.Namespace, + AppUID: string(reportedEntityParentApp.app.ObjectMeta.UID), + AppLabels: reportedEntityParentApp.app.Labels, + SyncStatus: string(rr.rs.Status), + SyncStartedAt: syncStarted, + SyncFinishedAt: syncFinished, + Cluster: reportedEntityParentApp.app.Spec.Destination.Server, + AppInstanceLabelKey: *argoTrackingMetadata.AppInstanceLabelKey, + TrackingMethod: string(*argoTrackingMetadata.TrackingMethod), } if reportedEntityParentApp.revisionsMetadata != nil && reportedEntityParentApp.revisionsMetadata.SyncRevisions != nil { From 23233d355d906b407e311e57f813d55a95b16125 Mon Sep 17 00:00:00 2001 From: oleksandr-codefresh Date: Thu, 7 Nov 2024 17:16:21 +0200 Subject: [PATCH 16/27] event-reporter(resource source payload): added new fields DestName, DestServer --- .../reporter/application_event_reporter.go | 22 ++++++++++++++----- event_reporter/reporter/event_payload.go | 5 +++++ event_reporter/reporter/types.go | 7 +++--- 3 files changed, 25 insertions(+), 9 deletions(-) diff --git a/event_reporter/reporter/application_event_reporter.go b/event_reporter/reporter/application_event_reporter.go index 6d62a5f351805..c8322d2346b3a 100644 --- a/event_reporter/reporter/application_event_reporter.go +++ b/event_reporter/reporter/application_event_reporter.go @@ -13,6 +13,8 @@ import ( "github.com/argoproj/argo-cd/v2/event_reporter/utils" + argoutils "github.com/argoproj/argo-cd/v2/util/argo" + "github.com/argoproj/argo-cd/v2/reposerver/apiclient" argocommon "github.com/argoproj/argo-cd/v2/common" @@ -182,10 +184,14 @@ func (s *applicationEventReporter) StreamApplicationEvents( logCtx.WithError(err).Warn("failed to get parent application's revision metadata, resuming") } + validatedDestination := parentApplicationEntity.Spec.Destination.DeepCopy() + _ = argoutils.ValidateDestination(ctx, validatedDestination, s.db) // resolves server field if missing + err = s.processResource(ctx, *rs, logCtx, eventProcessingStartedAt, parentDesiredManifests, manifestGenErr, a, applicationVersions, &ReportedEntityParentApp{ - app: parentApplicationEntity, - appTree: appTree, - revisionsMetadata: parentAppSyncRevisionsMetadata, + app: parentApplicationEntity, + appTree: appTree, + revisionsMetadata: parentAppSyncRevisionsMetadata, + validatedDestination: validatedDestination, }, argoTrackingMetadata) if err != nil { s.metricsServer.IncErroredEventsCounter(metrics.MetricChildAppEventType, metrics.MetricEventUnknownErrorType, a.Name) @@ -214,6 +220,9 @@ func (s *applicationEventReporter) StreamApplicationEvents( s.metricsServer.ObserveEventProcessingDurationHistogramDuration(a.Name, metrics.MetricParentAppEventType, metricTimer.Duration()) } + validatedDestination := a.Spec.Destination.DeepCopy() + _ = argoutils.ValidateDestination(ctx, validatedDestination, s.db) // resolves server field if missing + revisionsMetadata, _ := s.getApplicationRevisionsMetadata(ctx, logCtx, a) // for each resource in the application get desired and actual state, // then stream the event @@ -227,9 +236,10 @@ func (s *applicationEventReporter) StreamApplicationEvents( continue } err := s.processResource(ctx, rs, logCtx, eventProcessingStartedAt, desiredManifests, manifestGenErr, nil, nil, &ReportedEntityParentApp{ - app: a, - appTree: appTree, - revisionsMetadata: revisionsMetadata, + app: a, + appTree: appTree, + revisionsMetadata: revisionsMetadata, + validatedDestination: validatedDestination, }, argoTrackingMetadata) if err != nil { s.metricsServer.IncErroredEventsCounter(metrics.MetricResourceEventType, metrics.MetricEventUnknownErrorType, a.Name) diff --git a/event_reporter/reporter/event_payload.go b/event_reporter/reporter/event_payload.go index 881f25fdae097..f452d8de978e4 100644 --- a/event_reporter/reporter/event_payload.go +++ b/event_reporter/reporter/event_payload.go @@ -121,6 +121,11 @@ func getResourceEventPayload( TrackingMethod: string(*argoTrackingMetadata.TrackingMethod), } + if reportedEntityParentApp.validatedDestination != nil { + source.DestName = &reportedEntityParentApp.validatedDestination.Name + source.DestServer = reportedEntityParentApp.validatedDestination.Server + } + if reportedEntityParentApp.revisionsMetadata != nil && reportedEntityParentApp.revisionsMetadata.SyncRevisions != nil { revisionMetadata := getApplicationLegacyRevisionDetails(reportedEntityParentApp.app, reportedEntityParentApp.revisionsMetadata) if revisionMetadata != nil { diff --git a/event_reporter/reporter/types.go b/event_reporter/reporter/types.go index ff7f1948377d2..1f03daeb07d34 100644 --- a/event_reporter/reporter/types.go +++ b/event_reporter/reporter/types.go @@ -22,9 +22,10 @@ type ReportedResourceAsApp struct { } type ReportedEntityParentApp struct { - app *appv1.Application - appTree *appv1.ApplicationTree - revisionsMetadata *utils.AppSyncRevisionsMetadata + app *appv1.Application + appTree *appv1.ApplicationTree + revisionsMetadata *utils.AppSyncRevisionsMetadata + validatedDestination *appv1.ApplicationDestination // with resolved Server url field if server Name used } type ArgoTrackingMetadata struct { From 86c7b0e654cc033fbda26eb3c50ad3000e60c04a Mon Sep 17 00:00:00 2001 From: oleksandr-codefresh Date: Thu, 7 Nov 2024 17:17:29 +0200 Subject: [PATCH 17/27] event-reporter(resource source payload): added new field AppMultiSourced --- event_reporter/reporter/event_payload.go | 1 + 1 file changed, 1 insertion(+) diff --git a/event_reporter/reporter/event_payload.go b/event_reporter/reporter/event_payload.go index f452d8de978e4..1e761b874d8b2 100644 --- a/event_reporter/reporter/event_payload.go +++ b/event_reporter/reporter/event_payload.go @@ -119,6 +119,7 @@ func getResourceEventPayload( Cluster: reportedEntityParentApp.app.Spec.Destination.Server, AppInstanceLabelKey: *argoTrackingMetadata.AppInstanceLabelKey, TrackingMethod: string(*argoTrackingMetadata.TrackingMethod), + AppMultiSourced: reportedEntityParentApp.app.Spec.HasMultipleSources(), } if reportedEntityParentApp.validatedDestination != nil { From 3539bc7d617eb5bc537feee1ca5c9bf14530c140 Mon Sep 17 00:00:00 2001 From: oleksandr-codefresh Date: Fri, 8 Nov 2024 11:58:23 +0200 Subject: [PATCH 18/27] event-reporter(resource source payload): added AppSourceIdx with source index to which this resource belongs. Also updated logic of retrieving correct git commit info based on AppSourceIdx --- assets/swagger.json | 8 + event_reporter/reporter/app_revision_test.go | 3 + .../reporter/application_event_reporter.go | 37 +- .../application_event_reporter_test.go | 29 +- event_reporter/reporter/event_payload.go | 51 +- event_reporter/reporter/types.go | 2 + event_reporter/utils/app_revision.go | 7 + pkg/apiclient/events/events.pb.go | 178 ++++--- reposerver/apiclient/repository.pb.go | 451 +++++++++++------- reposerver/repository/repository.proto | 2 + server/application/application.go | 1 + server/application/events.proto | 1 + 12 files changed, 511 insertions(+), 259 deletions(-) diff --git a/assets/swagger.json b/assets/swagger.json index ecdbf6062defd..9241eef9942f5 100644 --- a/assets/swagger.json +++ b/assets/swagger.json @@ -5294,6 +5294,14 @@ "sourceType": { "type": "string" }, + "sourcesManifestsStartingIdx": { + "type": "array", + "title": "for multisourced apps will be [0,12,20], so this means that 0-11 - from first app source, 12-19 from second one, 20-x - third one", + "items": { + "type": "integer", + "format": "int32" + } + }, "verifyResult": { "type": "string", "title": "Raw response of git verify-commit operation (always the empty string for Helm)" diff --git a/event_reporter/reporter/app_revision_test.go b/event_reporter/reporter/app_revision_test.go index 4b9611738432f..3dfc78127813b 100644 --- a/event_reporter/reporter/app_revision_test.go +++ b/event_reporter/reporter/app_revision_test.go @@ -54,6 +54,7 @@ func TestGetRevisionsDetails(t *testing.T) { newAppLister(), appServiceClient, &metrics.MetricsServer{}, + fakeArgoDb(), } result, _ := reporter.getRevisionsDetails(context.Background(), &app, []string{expectedRevision}) @@ -118,6 +119,7 @@ func TestGetRevisionsDetails(t *testing.T) { newAppLister(), appServiceClient, &metrics.MetricsServer{}, + fakeArgoDb(), } result, _ := reporter.getRevisionsDetails(context.Background(), &app, []string{expectedRevision1, expectedRevision2}) @@ -159,6 +161,7 @@ func TestGetRevisionsDetails(t *testing.T) { newAppLister(), appServiceClient, &metrics.MetricsServer{}, + fakeArgoDb(), } result, _ := reporter.getRevisionsDetails(context.Background(), &app, []string{expectedRevision}) diff --git a/event_reporter/reporter/application_event_reporter.go b/event_reporter/reporter/application_event_reporter.go index a3b534ef2308f..8edfe3013aabf 100644 --- a/event_reporter/reporter/application_event_reporter.go +++ b/event_reporter/reporter/application_event_reporter.go @@ -323,7 +323,7 @@ func (s *applicationEventReporter) processResource( }) // get resource desired state - desiredState := getResourceDesiredState(&rs, desiredManifests, logCtx) + desiredState, appSourceIdx := getResourceDesiredState(&rs, desiredManifests, logCtx) actualState, err := s.getResourceActualState(ctx, logCtx, metricsEventType, rs, reportedEntityParentApp.app, originalApplication) if err != nil { @@ -348,6 +348,7 @@ func (s *applicationEventReporter) processResource( actualState: actualState, desiredState: desiredState, manifestGenErr: manifestGenErr, + appSourceIdx: appSourceIdx, rsAsAppInfo: &ReportedResourceAsApp{ app: originalApplication, revisionsMetadata: originalAppRevisionMetadata, @@ -355,9 +356,11 @@ func (s *applicationEventReporter) processResource( }, }, &ReportedEntityParentApp{ - app: parentApplicationToReport, - appTree: reportedEntityParentApp.appTree, - revisionsMetadata: revisionMetadataToReport, + app: parentApplicationToReport, + appTree: reportedEntityParentApp.appTree, + revisionsMetadata: revisionMetadataToReport, + validatedDestination: reportedEntityParentApp.validatedDestination, + desiredManifests: reportedEntityParentApp.desiredManifests, }, argoTrackingMetadata, ) @@ -518,11 +521,11 @@ func applicationMetadataChanged(ae *appv1.ApplicationWatchEvent, cachedApp *appv return !reflect.DeepEqual(newEventAppMeta, cachedAppMeta) } -func getResourceDesiredState(rs *appv1.ResourceStatus, ds *apiclient.ManifestResponse, logger *log.Entry) *apiclient.Manifest { +func getResourceDesiredState(rs *appv1.ResourceStatus, ds *apiclient.ManifestResponse, logger *log.Entry) (manifest *apiclient.Manifest, sourceIdx int32) { if ds == nil { - return &apiclient.Manifest{} + return &apiclient.Manifest{}, 0 } - for _, m := range ds.Manifests { + for idx, m := range ds.Manifests { u, err := appv1.UnmarshalToUnstructured(m.CompiledManifest) if err != nil { logger.WithError(err).Warnf("failed to unmarshal compiled manifest") @@ -542,11 +545,27 @@ func getResourceDesiredState(rs *appv1.ResourceStatus, ds *apiclient.ManifestRes m.RawManifest = m.CompiledManifest } - return m + return m, getResourceSourceIdxFromManifestResponse(idx, ds) } } // no desired state for resource // it's probably deleted from git - return &apiclient.Manifest{} + return &apiclient.Manifest{}, 0 +} + +func getResourceSourceIdxFromManifestResponse(rsIdx int, ds *apiclient.ManifestResponse) int32 { + if ds.SourcesManifestsStartingIdx == nil { + return -1 + } + + sourceIdx := int32(-1) + + for currentSourceIdx, sourceStartingIdx := range ds.SourcesManifestsStartingIdx { + if int32(rsIdx) >= sourceStartingIdx { + sourceIdx = int32(currentSourceIdx) + } + } + + return sourceIdx } diff --git a/event_reporter/reporter/application_event_reporter_test.go b/event_reporter/reporter/application_event_reporter_test.go index 24f57525b9a5d..c9c0d710b4623 100644 --- a/event_reporter/reporter/application_event_reporter_test.go +++ b/event_reporter/reporter/application_event_reporter_test.go @@ -4,6 +4,9 @@ import ( "context" "encoding/json" "fmt" + "github.com/argoproj/argo-cd/v2/util/db" + "github.com/argoproj/argo-cd/v2/util/settings" + "k8s.io/client-go/kubernetes/fake" "net/http" "testing" "time" @@ -19,8 +22,8 @@ import ( "github.com/argoproj/argo-cd/v2/pkg/apiclient" apiclientapppkg "github.com/argoproj/argo-cd/v2/pkg/apiclient/application" appv1reg "github.com/argoproj/argo-cd/v2/pkg/apis/application" + repoapiclient "github.com/argoproj/argo-cd/v2/reposerver/apiclient" "github.com/argoproj/argo-cd/v2/util/io" - "google.golang.org/grpc" "k8s.io/apimachinery/pkg/runtime" @@ -93,6 +96,12 @@ func fakeAppServiceClient() apiclientapppkg.ApplicationServiceClient { return applicationServiceClient } +func fakeArgoDb() db.ArgoDB { + clientset := fake.NewSimpleClientset() + + return db.NewDB("", settings.NewSettingsManager(context.Background(), clientset, testNamespace), clientset) +} + func fakeReporter(customAppServiceClient appclient.ApplicationClient) *applicationEventReporter { guestbookApp := &appsv1.Application{ TypeMeta: metav1.TypeMeta{ @@ -159,6 +168,7 @@ func fakeReporter(customAppServiceClient appclient.ApplicationClient) *applicati appLister, customAppServiceClient, metricsServ, + fakeArgoDb(), } } @@ -459,3 +469,20 @@ func TestGetResourceActualState(t *testing.T) { assert.Equal(t, "", ptr.ToString(res.Manifest)) }) } + +func TestGetResourceSourceIdxFromManifestResponse(t *testing.T) { + t.Run("should return correct sourceIdx", func(t *testing.T) { + sourcesManifestsStartingIdx := []int32{0, 5, 15} + desiredManifests := &repoapiclient.ManifestResponse{ + SourcesManifestsStartingIdx: sourcesManifestsStartingIdx, + } + + assert.Equal(t, int32(0), getResourceSourceIdxFromManifestResponse(0, desiredManifests)) + assert.Equal(t, int32(0), getResourceSourceIdxFromManifestResponse(1, desiredManifests)) + assert.Equal(t, int32(1), getResourceSourceIdxFromManifestResponse(5, desiredManifests)) + assert.Equal(t, int32(1), getResourceSourceIdxFromManifestResponse(6, desiredManifests)) + assert.Equal(t, int32(2), getResourceSourceIdxFromManifestResponse(15, desiredManifests)) + assert.Equal(t, int32(2), getResourceSourceIdxFromManifestResponse(16, desiredManifests)) + assert.Equal(t, int32(-1), getResourceSourceIdxFromManifestResponse(2, &repoapiclient.ManifestResponse{})) + }) +} diff --git a/event_reporter/reporter/event_payload.go b/event_reporter/reporter/event_payload.go index c24bf3cec8ef8..81c140e7ac179 100644 --- a/event_reporter/reporter/event_payload.go +++ b/event_reporter/reporter/event_payload.go @@ -103,7 +103,6 @@ func getResourceEventPayload( DesiredManifest: rr.desiredState.CompiledManifest, ActualManifest: *rr.actualState.Manifest, GitManifest: rr.desiredState.RawManifest, - RepoURL: reportedEntityParentApp.app.Status.Sync.ComparedTo.Source.RepoURL, Path: rr.desiredState.Path, Revision: utils.GetApplicationLatestRevision(reportedEntityParentApp.app), OperationSyncRevision: utils.GetOperationRevision(reportedEntityParentApp.app), @@ -120,22 +119,17 @@ func getResourceEventPayload( AppInstanceLabelKey: *argoTrackingMetadata.AppInstanceLabelKey, TrackingMethod: string(*argoTrackingMetadata.TrackingMethod), AppMultiSourced: reportedEntityParentApp.app.Spec.HasMultipleSources(), + AppSourceIdx: rr.appSourceIdx, } + source.RepoURL = getResourceSourceRepoUrl(rr, reportedEntityParentApp) + addResourceEventPayloadGitCommitDetails(&source, rr, reportedEntityParentApp) + if reportedEntityParentApp.validatedDestination != nil { source.DestName = &reportedEntityParentApp.validatedDestination.Name source.DestServer = reportedEntityParentApp.validatedDestination.Server } - if reportedEntityParentApp.revisionsMetadata != nil && reportedEntityParentApp.revisionsMetadata.SyncRevisions != nil { - revisionMetadata := getApplicationLegacyRevisionDetails(reportedEntityParentApp.app, reportedEntityParentApp.revisionsMetadata) - if revisionMetadata != nil { - source.CommitMessage = revisionMetadata.Message - source.CommitAuthor = revisionMetadata.Author - source.CommitDate = &revisionMetadata.Date - } - } - if rr.rs.Health != nil { source.HealthStatus = (*string)(&rr.rs.Health.Status) source.HealthMessage = &rr.rs.Health.Message @@ -161,6 +155,43 @@ func getResourceEventPayload( return &events.Event{Payload: payloadBytes}, nil } +func getResourceSourceRepoUrl( + rr *ReportedResource, + reportedEntityParentApp *ReportedEntityParentApp, +) string { + specCopy := reportedEntityParentApp.app.Spec.DeepCopy() + + specCopy.Sources = reportedEntityParentApp.app.Status.Sync.ComparedTo.Sources + specCopy.Source = reportedEntityParentApp.app.Status.Sync.ComparedTo.Source.DeepCopy() + + if specCopy.HasMultipleSources() { + if rr.appSourceIdx == -1 { + return "" + } + return specCopy.GetSourcePtrByIndex(int(rr.appSourceIdx)).RepoURL + } + + return specCopy.Source.RepoURL +} + +func addResourceEventPayloadGitCommitDetails( + source *events.ObjectSource, + rr *ReportedResource, + reportedEntityParentApp *ReportedEntityParentApp, +) { + if reportedEntityParentApp.revisionsMetadata == nil || reportedEntityParentApp.revisionsMetadata.SyncRevisions == nil || rr.appSourceIdx == -1 { + return + } + + syncRevisionWithMetadata := reportedEntityParentApp.revisionsMetadata.GetSyncRevisionAt(int(rr.appSourceIdx)) + + if syncRevisionWithMetadata != nil && syncRevisionWithMetadata.Metadata != nil { + source.CommitMessage = syncRevisionWithMetadata.Metadata.Message + source.CommitAuthor = syncRevisionWithMetadata.Metadata.Author + source.CommitDate = &syncRevisionWithMetadata.Metadata.Date + } +} + func getResourceEventPayloadErrors( rr *ReportedResource, reportedEntityParentApp *ReportedEntityParentApp, diff --git a/event_reporter/reporter/types.go b/event_reporter/reporter/types.go index 0657ad7a27d23..dddfba5ebd03c 100644 --- a/event_reporter/reporter/types.go +++ b/event_reporter/reporter/types.go @@ -10,6 +10,7 @@ import ( type ReportedResource struct { rs *appv1.ResourceStatus rsAsAppInfo *ReportedResourceAsApp // passed if resource is application + appSourceIdx int32 actualState *application.ApplicationResourceResponse desiredState *apiclient.Manifest manifestGenErr bool @@ -26,6 +27,7 @@ type ReportedEntityParentApp struct { appTree *appv1.ApplicationTree revisionsMetadata *utils.AppSyncRevisionsMetadata validatedDestination *appv1.ApplicationDestination // with resolved Server url field if server Name used + desiredManifests *apiclient.ManifestResponse } type ArgoTrackingMetadata struct { diff --git a/event_reporter/utils/app_revision.go b/event_reporter/utils/app_revision.go index 0ff0eb8429ac4..29ea5f789e716 100644 --- a/event_reporter/utils/app_revision.go +++ b/event_reporter/utils/app_revision.go @@ -25,6 +25,13 @@ type RevisionsData struct { const annotationRevisionKey = "app.meta.revisions-metadata" +func (asrm *AppSyncRevisionsMetadata) GetSyncRevisionAt(idx int) *RevisionWithMetadata { + if asrm == nil || asrm.SyncRevisions == nil { + return nil + } + return asrm.SyncRevisions[idx] +} + func GetLatestAppHistoryId(a *appv1.Application) int64 { if lastHistory := getLatestAppHistoryItem(a); lastHistory != nil { return lastHistory.ID diff --git a/pkg/apiclient/events/events.pb.go b/pkg/apiclient/events/events.pb.go index fac639fa5b4c9..cbea9b89ffab3 100644 --- a/pkg/apiclient/events/events.pb.go +++ b/pkg/apiclient/events/events.pb.go @@ -265,6 +265,7 @@ type ObjectSource struct { DestServer string `protobuf:"bytes,25,req,name=destServer" json:"destServer"` DestName *string `protobuf:"bytes,26,opt,name=destName" json:"destName,omitempty"` AppMultiSourced bool `protobuf:"varint,27,req,name=appMultiSourced" json:"appMultiSourced"` + AppSourceIdx int32 `protobuf:"varint,28,req,name=appSourceIdx" json:"appSourceIdx"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -492,6 +493,13 @@ func (m *ObjectSource) GetAppMultiSourced() bool { return false } +func (m *ObjectSource) GetAppSourceIdx() int32 { + if m != nil { + return m.AppSourceIdx + } + return 0 +} + // * // Holds error information; present only when error sent with application but not resource itself type ObjectError struct { @@ -792,76 +800,77 @@ func init() { func init() { proto.RegisterFile("server/application/events.proto", fileDescriptor_3ad9267ec62b112f) } var fileDescriptor_3ad9267ec62b112f = []byte{ - // 1098 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x5f, 0x8f, 0x1b, 0x35, - 0x10, 0x67, 0x73, 0xff, 0x27, 0xb9, 0x6b, 0x71, 0xaf, 0xc5, 0x84, 0x72, 0x8d, 0xa2, 0x0a, 0x45, - 0x55, 0xbb, 0x51, 0x0f, 0xa8, 0xda,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b, 0x28, 0x21, 0x17, 0xeb, 0xa2, 0x1c, 0x37, 0xad, 0x9b, 0xa8, 0x41, 0x77, 0x83, 0x53, 0x2e, - 0x32, 0x3f, 0x1d, 0x9b, 0x1b, 0x74, 0x88, 0xd3, 0xf8, 0xa1, 0xbd, 0x19, 0x6a, 0xfc, 0xe8, 0x1e, - 0xc2, 0x9e, 0x68, 0x4a, 0x3f, 0x1c, 0x02, 0x17, 0xf0, 0xf0, 0x05, 0xf4, 0x1e, 0xa3, 0x42, 0x91, - 0xa1, 0x48, 0x39, 0x1a, 0xf7, 0x05, 0x28, 0x64, 0x3a, 0xad, 0xd2, 0xec, 0xd7, 0x0e, 0xcb, 0x50, - 0x99, 0x2a, 0xcd, 0x7e, 0xed, 0x3a, 0x88, 0xc6, 0x9f, 0xe7, 0x5c, 0xe3, 0xcc, 0xfd, 0xa2, 0xca, - 0x04, 0x25, 0x2d, 0x6c, 0xa8, 0xe0, 0xca, 0x9a, 0xd1, 0x4a, 0x8e, 0x00, 0x2e, 0x86, 0x6b, 0xb5, - 0x51, 0x80, 0x90, 0x07, 0xd0, 0xcb, 0x82, 0x23, 0xf9, 0x6d, 0xc3, 0x0f, 0x41, 0x78, 0xde, 0xa4, - 0x45, 0x7d, 0x74, 0xf2, 0xe6, 0xed, 0x51, 0xf4, 0xdb, 0xdb, 0xa3, 0xe8, 0x8f, 0xb7, 0x47, 0xd1, - 0x8b, 0x4f, 0xff, 0xdb, 0x57, 0x2e, 0x2d, 0x38, 0x0a, 0x5b, 0x7d, 0x07, 0xff, 0x0e, 0x00, 0x00, - 0xff, 0xff, 0x18, 0xfd, 0x2a, 0xbe, 0x2a, 0x0a, 0x00, 0x00, + // 1115 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x4d, 0x8f, 0x1c, 0x35, + 0x13, 0x7e, 0x7b, 0xf6, 0xbb, 0x66, 0x76, 0x93, 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0x0a, 0x00, 0x00, } func (m *EventSource) Marshal() (dAtA []byte, err error) { @@ -1057,6 +1066,11 @@ func (m *ObjectSource) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + i = encodeVarintEvents(dAtA, i, uint64(m.AppSourceIdx)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xe0 i-- if m.AppMultiSourced { dAtA[i] = 1 @@ -1634,6 +1648,7 @@ func (m *ObjectSource) Size() (n int) { n += 2 + l + sovEvents(uint64(l)) } n += 3 + n += 2 + sovEvents(uint64(m.AppSourceIdx)) if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -3200,6 +3215,26 @@ func (m *ObjectSource) Unmarshal(dAtA []byte) error { } m.AppMultiSourced = bool(v != 0) hasFields[0] |= uint64(0x00000002) + case 28: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AppSourceIdx", wireType) + } + m.AppSourceIdx = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AppSourceIdx |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000004) default: iNdEx = preIndex skippy, err := skipEvents(dAtA[iNdEx:]) @@ -3222,6 +3257,9 @@ func (m *ObjectSource) Unmarshal(dAtA []byte) error { if hasFields[0]&uint64(0x00000002) == 0 { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("appMultiSourced") } + if hasFields[0]&uint64(0x00000004) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("appSourceIdx") + } if iNdEx > l { return io.ErrUnexpectedEOF diff --git a/reposerver/apiclient/repository.pb.go b/reposerver/apiclient/repository.pb.go index bd29211801e06..1b79360fa657b 100644 --- a/reposerver/apiclient/repository.pb.go +++ b/reposerver/apiclient/repository.pb.go @@ -903,10 +903,12 @@ type ManifestResponse struct { CommitAuthor string `protobuf:"bytes,9,opt,name=commitAuthor,proto3" json:"commitAuthor,omitempty"` CommitDate *v1.Time `protobuf:"bytes,10,opt,name=commitDate,proto3" json:"commitDate,omitempty"` // A version of the application and its dependencies - ApplicationVersions *ApplicationVersions `protobuf:"bytes,11,opt,name=applicationVersions,proto3" json:"applicationVersions,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ApplicationVersions *ApplicationVersions `protobuf:"bytes,11,opt,name=applicationVersions,proto3" json:"applicationVersions,omitempty"` + // for multisourced apps will be [0,12,20], so this means that 0-11 - from first app source, 12-19 from second one, 20-x - third one + SourcesManifestsStartingIdx []int32 `protobuf:"varint,12,rep,packed,name=sourcesManifestsStartingIdx,proto3" json:"sourcesManifestsStartingIdx,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *ManifestResponse) Reset() { *m = ManifestResponse{} } @@ -1012,6 +1014,13 @@ func (m *ManifestResponse) GetApplicationVersions() *ApplicationVersions { return nil } +func (m *ManifestResponse) GetSourcesManifestsStartingIdx() []int32 { + if m != nil { + return m.SourcesManifestsStartingIdx + } + return nil +} + type ListRefsRequest struct { Repo *v1alpha1.Repository `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -2819,174 +2828,176 @@ func init() { } var fileDescriptor_dd8723cfcc820480 = []byte{ - // 2664 bytes of a gzipped FileDescriptorProto + // 2690 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x1a, 0x4d, 0x6f, 0x1c, 0x49, 0xd5, 0xf3, 0xe9, 0x99, 0x37, 0xfe, 0xac, 0xd8, 0x4e, 0x67, 0x76, 0x63, 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4c, 0x18, 0x02, 0xfb, 0xe3, 0x2a, 0x94, 0x29, 0xf6, 0x43, 0xfd, 0x3a, + 0x2c, 0xe4, 0x6d, 0xc1, 0xee, 0x52, 0xb3, 0x4f, 0xcc, 0x41, 0x30, 0x74, 0xa4, 0x98, 0xe3, 0x39, + 0x42, 0x50, 0x0e, 0xac, 0xa7, 0x42, 0xd4, 0x25, 0x83, 0x8f, 0xf5, 0xd7, 0x61, 0x7e, 0x64, 0x37, + 0xa6, 0x54, 0xc1, 0x1b, 0xa3, 0x30, 0x25, 0xb7, 0xd6, 0x87, 0xb0, 0x78, 0x9f, 0xcb, 0x22, 0xbe, + 0x50, 0xce, 0x22, 0x3b, 0xd0, 0x77, 0x60, 0x29, 0xbb, 0x6d, 0x40, 0x3d, 0x37, 0x20, 0xcc, 0xf4, + 0x79, 0x04, 0xb6, 0x48, 0x37, 0xf9, 0xca, 0xb9, 0xa8, 0x19, 0x39, 0x5f, 0xf4, 0xdf, 0x16, 0x61, + 0xc9, 0x20, 0x81, 0x67, 0x1f, 0x90, 0x28, 0x3c, 0x9e, 0x4d, 0x82, 0xf3, 0x3d, 0x28, 0x61, 0x4a, + 0xa5, 0x99, 0xdc, 0x78, 0x6e, 0x29, 0x84, 0xc1, 0xa8, 0xa2, 0x37, 0x61, 0x1e, 0x3b, 0x1d, 0xab, + 0x37, 0xf4, 0x86, 0x41, 0x74, 0x2c, 0x6e, 0x54, 0x75, 0x63, 0xf4, 0x03, 0x73, 0xff, 0x80, 0x7b, + 0xe4, 0x0d, 0xb7, 0x4b, 0xbe, 0xe0, 0x59, 0x53, 0xc9, 0x50, 0x41, 0xba, 0x09, 0xe7, 0x47, 0x84, + 0x24, 0x05, 0xae, 0x26, 0x6a, 0x85, 0x4c, 0xa2, 0x96, 0xcb, 0x46, 0xf1, 0x08, 0x36, 0xf4, 0x1f, + 0x17, 0xa0, 0x16, 0xd9, 0x1d, 0x5a, 0x83, 0x39, 0xd3, 0x73, 0xa8, 0x65, 0x93, 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0xe4, 0x88, 0x4e, 0x45, 0xf3, 0xce, 0x69, 0xbd, 0x2d, 0x4d, 0x56, 0x9f, 0x40, + 0xbf, 0x2e, 0xc0, 0x79, 0x85, 0x31, 0xb5, 0xa5, 0x80, 0xd6, 0xc7, 0x33, 0x97, 0xd3, 0x7e, 0x68, + 0xde, 0x3c, 0xe5, 0x4f, 0xa9, 0x14, 0x92, 0xfa, 0x04, 0xda, 0xe3, 0x3a, 0x49, 0x2a, 0x08, 0x74, + 0x31, 0xb7, 0x54, 0x88, 0x77, 0x5f, 0x3e, 0xea, 0x73, 0xac, 0x87, 0x9b, 0xd0, 0xd8, 0x26, 0x61, + 0x94, 0xca, 0xa6, 0x2d, 0x2d, 0x53, 0x65, 0xa4, 0x5d, 0x35, 0x9b, 0xfd, 0x72, 0x8b, 0x99, 0x17, + 0xb4, 0x94, 0x74, 0x2d, 0xed, 0xab, 0xb9, 0x79, 0x6d, 0xda, 0x62, 0xf2, 0xb3, 0x3d, 0x7d, 0x02, + 0x3d, 0x86, 0xa5, 0xfc, 0xcb, 0x07, 0xbd, 0x7e, 0xe2, 0xf4, 0xa2, 0xb9, 0x76, 0x12, 0xd4, 0xcc, + 0x81, 0xd2, 0xe1, 0x37, 0x7d, 0xa0, 0xdc, 0x5b, 0x2b, 0x7d, 0xa0, 0xfc, 0xe8, 0xad, 0x4f, 0x7c, + 0xbc, 0xf9, 0xe7, 0x67, 0xcb, 0x85, 0xbf, 0x3e, 0x5b, 0x2e, 0xfc, 0xeb, 0xd9, 0x72, 0xe1, 0xf3, + 0xb7, 0x8f, 0xf9, 0x41, 0xa7, 0xf2, 0xeb, 0x53, 0x4c, 0x2d, 0xd3, 0xb6, 0x88, 0x1b, 0x76, 0xaa, + 0xdc, 0x9b, 0xdf, 0xfe, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x2a, 0xb4, 0x26, 0x19, 0x9c, 0x2a, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -4465,6 +4476,25 @@ func (m *ManifestResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if len(m.SourcesManifestsStartingIdx) > 0 { + dAtA15 := make([]byte, len(m.SourcesManifestsStartingIdx)*10) + var j14 int + for _, num1 := range m.SourcesManifestsStartingIdx { + num := uint64(num1) + for num >= 1<<7 { + dAtA15[j14] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j14++ + } + dAtA15[j14] = uint8(num) + j14++ + } + i -= j14 + copy(dAtA[i:], dAtA15[:j14]) + i = encodeVarintRepository(dAtA, i, uint64(j14)) + i-- + dAtA[i] = 0x62 + } if m.ApplicationVersions != nil { { size, err := m.ApplicationVersions.MarshalToSizedBuffer(dAtA[:i]) @@ -6590,6 +6620,13 @@ func (m *ManifestResponse) Size() (n int) { l = m.ApplicationVersions.Size() n += 1 + l + sovRepository(uint64(l)) } + if len(m.SourcesManifestsStartingIdx) > 0 { + l = 0 + for _, e := range m.SourcesManifestsStartingIdx { + l += sovRepository(uint64(e)) + } + n += 1 + sovRepository(uint64(l)) + l + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -9852,6 +9889,82 @@ func (m *ManifestResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 12: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRepository + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.SourcesManifestsStartingIdx = append(m.SourcesManifestsStartingIdx, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRepository + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthRepository + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthRepository + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.SourcesManifestsStartingIdx) == 0 { + m.SourcesManifestsStartingIdx = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRepository + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.SourcesManifestsStartingIdx = append(m.SourcesManifestsStartingIdx, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field SourcesManifestsStartingIdx", wireType) + } default: iNdEx = preIndex skippy, err := skipRepository(dAtA[iNdEx:]) diff --git a/reposerver/repository/repository.proto b/reposerver/repository/repository.proto index ad295e95712a1..90de0e1a7c4b7 100644 --- a/reposerver/repository/repository.proto +++ b/reposerver/repository/repository.proto @@ -128,6 +128,8 @@ message ManifestResponse { k8s.io.apimachinery.pkg.apis.meta.v1.Time commitDate = 10; // A version of the application and its dependencies ApplicationVersions applicationVersions = 11; + // for multisourced apps will be [0,12,20], so this means that 0-11 - from first app source, 12-19 from second one, 20-x - third one + repeated int32 sourcesManifestsStartingIdx = 12; } message ListRefsRequest { diff --git a/server/application/application.go b/server/application/application.go index edf5fbe754427..8e9d765cfb04f 100644 --- a/server/application/application.go +++ b/server/application/application.go @@ -574,6 +574,7 @@ func (s *Server) GetManifests(ctx context.Context, q *application.ApplicationMan manifestInfo.Manifests[i].CompiledManifest = string(data) } } + manifests.SourcesManifestsStartingIdx = append(manifests.SourcesManifestsStartingIdx, int32(len(manifests.Manifests))) manifests.Manifests = append(manifests.Manifests, manifestInfo.Manifests...) } if manifestInfosAppVersionsIdx >= 0 && manifestInfos[manifestInfosAppVersionsIdx] != nil { diff --git a/server/application/events.proto b/server/application/events.proto index 70095fbadf685..7e29da7a62cd1 100644 --- a/server/application/events.proto +++ b/server/application/events.proto @@ -77,6 +77,7 @@ message ObjectSource { required string destServer = 25 [(gogoproto.nullable) = false]; optional string destName = 26; required bool appMultiSourced = 27 [(gogoproto.nullable) = false]; + required int32 appSourceIdx = 28 [(gogoproto.nullable) = false]; } /** From ba5c91c631c43603a0b4676688fb025bb847eb56 Mon Sep 17 00:00:00 2001 From: oleksandr-codefresh Date: Fri, 8 Nov 2024 12:01:50 +0200 Subject: [PATCH 19/27] event-reporter: updated changelog --- changelog/CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/changelog/CHANGELOG.md b/changelog/CHANGELOG.md index ac73e1b0295b1..f26d54ef9a0d6 100644 --- a/changelog/CHANGELOG.md +++ b/changelog/CHANGELOG.md @@ -1,2 +1,2 @@ -### Fixed -- fix: failures in update revision for path should not affect sync \ No newline at end of file +### Features +- feat(event-reporter): multisourced apps support improvements: reporting syncOperationRevisions, detecting correct resource sourceIdx, reporting correct git commit info \ No newline at end of file From 5bf421c61bc21946cd091e3ab3788263244f03da Mon Sep 17 00:00:00 2001 From: oleksandr-codefresh Date: Wed, 13 Nov 2024 13:27:43 +0200 Subject: [PATCH 20/27] event-reporter: fixed lint issues --- event_reporter/application/client.go | 2 +- event_reporter/controller/controller.go | 3 ++- event_reporter/reporter/application_event_reporter_test.go | 7 ++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/event_reporter/application/client.go b/event_reporter/application/client.go index e87131cd9f9c6..86b0b53cb952c 100644 --- a/event_reporter/application/client.go +++ b/event_reporter/application/client.go @@ -128,7 +128,7 @@ func (c *httpApplicationClient) GetManifests(ctx context.Context, in *appclient. } if in.SourcePositions != nil && len(in.SourcePositions) > 0 { for _, sourcePosition := range in.SourcePositions { - params = fmt.Sprintf("%s&sourcePositions=%s", params, sourcePosition) + params = fmt.Sprintf("%s&sourcePositions=%d", params, sourcePosition) } } if in.Revisions != nil && len(in.Revisions) > 0 { diff --git a/event_reporter/controller/controller.go b/event_reporter/controller/controller.go index 597f8220c429b..262f55a7a7c34 100644 --- a/event_reporter/controller/controller.go +++ b/event_reporter/controller/controller.go @@ -2,11 +2,12 @@ package controller import ( "context" - "github.com/argoproj/argo-cd/v2/util/db" "math" "strings" "time" + "github.com/argoproj/argo-cd/v2/util/db" + appclient "github.com/argoproj/argo-cd/v2/event_reporter/application" log "github.com/sirupsen/logrus" diff --git a/event_reporter/reporter/application_event_reporter_test.go b/event_reporter/reporter/application_event_reporter_test.go index c9c0d710b4623..acda38922bc65 100644 --- a/event_reporter/reporter/application_event_reporter_test.go +++ b/event_reporter/reporter/application_event_reporter_test.go @@ -4,13 +4,14 @@ import ( "context" "encoding/json" "fmt" - "github.com/argoproj/argo-cd/v2/util/db" - "github.com/argoproj/argo-cd/v2/util/settings" - "k8s.io/client-go/kubernetes/fake" "net/http" "testing" "time" + "github.com/argoproj/argo-cd/v2/util/db" + "github.com/argoproj/argo-cd/v2/util/settings" + "k8s.io/client-go/kubernetes/fake" + "github.com/aws/smithy-go/ptr" "github.com/sirupsen/logrus" "github.com/stretchr/testify/mock" From 18f33aaf85d7bc879fdd6f0758185b88f389e0d0 Mon Sep 17 00:00:00 2001 From: oleksandr-codefresh Date: Wed, 13 Nov 2024 17:19:04 +0200 Subject: [PATCH 21/27] event-reporter: changes after pr review --- .../application_event_reporter_test.go | 1 + event_reporter/reporter/event_payload.go | 8 +- event_reporter/reporter/types.go | 4 + event_reporter/utils/app.go | 63 +++++ event_reporter/utils/app_revision.go | 37 +-- event_reporter/utils/app_revision_test.go | 221 ++++++++++++++++++ 6 files changed, 316 insertions(+), 18 deletions(-) create mode 100644 event_reporter/utils/app.go diff --git a/event_reporter/reporter/application_event_reporter_test.go b/event_reporter/reporter/application_event_reporter_test.go index acda38922bc65..b2414628c4cdd 100644 --- a/event_reporter/reporter/application_event_reporter_test.go +++ b/event_reporter/reporter/application_event_reporter_test.go @@ -10,6 +10,7 @@ import ( "github.com/argoproj/argo-cd/v2/util/db" "github.com/argoproj/argo-cd/v2/util/settings" + "k8s.io/client-go/kubernetes/fake" "github.com/aws/smithy-go/ptr" diff --git a/event_reporter/reporter/event_payload.go b/event_reporter/reporter/event_payload.go index 81c140e7ac179..22bb9efdc067b 100644 --- a/event_reporter/reporter/event_payload.go +++ b/event_reporter/reporter/event_payload.go @@ -165,10 +165,14 @@ func getResourceSourceRepoUrl( specCopy.Source = reportedEntityParentApp.app.Status.Sync.ComparedTo.Source.DeepCopy() if specCopy.HasMultipleSources() { - if rr.appSourceIdx == -1 { + if !rr.appSourceIdxDetected() { return "" } - return specCopy.GetSourcePtrByIndex(int(rr.appSourceIdx)).RepoURL + source := specCopy.GetSourcePtrByIndex(int(rr.appSourceIdx)) + if source == nil { + return "" + } + return source.RepoURL } return specCopy.Source.RepoURL diff --git a/event_reporter/reporter/types.go b/event_reporter/reporter/types.go index dddfba5ebd03c..810f26253ec1a 100644 --- a/event_reporter/reporter/types.go +++ b/event_reporter/reporter/types.go @@ -43,3 +43,7 @@ func (rr *ReportedResource) GetApiVersion() string { return apiVersion } + +func (rr *ReportedResource) appSourceIdxDetected() bool { + return rr.appSourceIdx >= 0 +} diff --git a/event_reporter/utils/app.go b/event_reporter/utils/app.go new file mode 100644 index 0000000000000..84dbe01d15b27 --- /dev/null +++ b/event_reporter/utils/app.go @@ -0,0 +1,63 @@ +package utils + +import appv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1" + +type AppRevisionsFieldNames string + +var AppRevisionFieldName AppRevisionsFieldNames = "Revision" +var AppRevisionsFieldName AppRevisionsFieldNames = "Revisions" + +type AppUtils struct { + App *appv1.Application +} + +func (au *AppUtils) operationStateSyncExists(fieldToCheck *AppRevisionsFieldNames) bool { + result := au.App != nil && au.App.Status.OperationState != nil && au.App.Status.OperationState.Operation.Sync != nil + if !result { + return false + } + + return revisionsToCheck(RevisionsData{ + Revision: au.App.Status.OperationState.Operation.Sync.Revision, + Revisions: au.App.Status.OperationState.Operation.Sync.Revisions, + }, fieldToCheck) +} + +func (au *AppUtils) operationSyncExists(fieldToCheck *AppRevisionsFieldNames) bool { + result := au.App != nil && au.App.Operation != nil && au.App.Operation.Sync != nil + if !result { + return false + } + + return revisionsToCheck(RevisionsData{ + Revision: au.App.Operation.Sync.Revision, + Revisions: au.App.Operation.Sync.Revisions, + }, fieldToCheck) +} + +func (au *AppUtils) operationSyncResultExists(fieldToCheck *AppRevisionsFieldNames) bool { + result := au.App != nil && au.App.Status.OperationState != nil && au.App.Status.OperationState.SyncResult != nil + if !result { + return false + } + + return revisionsToCheck(RevisionsData{ + Revision: au.App.Status.OperationState.SyncResult.Revision, + Revisions: au.App.Status.OperationState.SyncResult.Revisions, + }, fieldToCheck) +} + +// expected to return true if fieldToCheck == nil +func revisionsToCheck(obj RevisionsData, fieldToCheck *AppRevisionsFieldNames) bool { + if fieldToCheck == nil { + return true + } + if *fieldToCheck == AppRevisionFieldName { + return obj.Revision != "" + } + + if *fieldToCheck == AppRevisionsFieldName { + return obj.Revisions != nil && len(obj.Revisions) > 0 + } + return true +} diff --git a/event_reporter/utils/app_revision.go b/event_reporter/utils/app_revision.go index 29ea5f789e716..10ab89e0f8dd6 100644 --- a/event_reporter/utils/app_revision.go +++ b/event_reporter/utils/app_revision.go @@ -26,7 +26,7 @@ type RevisionsData struct { const annotationRevisionKey = "app.meta.revisions-metadata" func (asrm *AppSyncRevisionsMetadata) GetSyncRevisionAt(idx int) *RevisionWithMetadata { - if asrm == nil || asrm.SyncRevisions == nil { + if asrm == nil || asrm.SyncRevisions == nil || idx < 0 || idx >= len(asrm.SyncRevisions) { return nil } return asrm.SyncRevisions[idx] @@ -60,12 +60,12 @@ func GetOperationRevision(a *appv1.Application) string { if a == nil { return "" } - + au := &AppUtils{App: a} // this value will be used in case if application hasn't resources , like gitsource revision := a.Status.Sync.Revision - if a.Status.OperationState != nil && a.Status.OperationState.Operation.Sync != nil && a.Status.OperationState.Operation.Sync.Revision != "" { + if au.operationStateSyncExists(&AppRevisionFieldName) { revision = a.Status.OperationState.Operation.Sync.Revision - } else if a.Operation != nil && a.Operation.Sync != nil && a.Operation.Sync.Revision != "" { + } else if au.operationSyncExists(&AppRevisionFieldName) { revision = a.Operation.Sync.Revision } @@ -76,12 +76,13 @@ func GetOperationRevisions(a *appv1.Application) []string { if a == nil { return nil } + au := &AppUtils{App: a} // this value will be used in case if application hasn't resources , like gitsource revisions := a.Status.Sync.Revisions - if a.Status.OperationState != nil && a.Status.OperationState.Operation.Sync != nil && a.Status.OperationState.Operation.Sync.Revisions != nil && len(a.Status.OperationState.Operation.Sync.Revisions) > 0 { + if au.operationStateSyncExists(&AppRevisionsFieldName) { revisions = a.Status.OperationState.Operation.Sync.Revisions - } else if a.Operation != nil && a.Operation.Sync != nil && a.Operation.Sync.Revisions != nil && len(a.Operation.Sync.Revisions) > 0 { + } else if au.operationSyncExists(&AppRevisionsFieldName) { revisions = a.Operation.Sync.Revisions } @@ -89,25 +90,28 @@ func GetOperationRevisions(a *appv1.Application) []string { } func GetOperationSyncResultRevision(a *appv1.Application) *string { - if a == nil || a.Status.OperationState == nil || a.Status.OperationState.SyncResult == nil { - return nil + au := &AppUtils{App: a} + if au.operationSyncResultExists(nil) { + return &a.Status.OperationState.SyncResult.Revision } - return &a.Status.OperationState.SyncResult.Revision + return nil } func GetOperationSyncResultRevisions(a *appv1.Application) *[]string { - if a == nil || a.Status.OperationState == nil || a.Status.OperationState.SyncResult == nil { - return nil + au := &AppUtils{App: a} + if au.operationSyncResultExists(nil) { + return &a.Status.OperationState.SyncResult.Revisions } - return &a.Status.OperationState.SyncResult.Revisions + return nil } func GetOperationSyncRevisions(a *appv1.Application) []string { if a == nil { return []string{} } + au := &AppUtils{App: a} // this value will be used in case if application hasn't resources, like empty gitsource revisions := getRevisions(RevisionsData{ @@ -115,12 +119,12 @@ func GetOperationSyncRevisions(a *appv1.Application) []string { Revisions: a.Status.Sync.Revisions, }) - if a.Status.OperationState != nil && a.Status.OperationState.Operation.Sync != nil { + if au.operationStateSyncExists(nil) { revisions = getRevisions(RevisionsData{ Revision: a.Status.OperationState.Operation.Sync.Revision, Revisions: a.Status.OperationState.Operation.Sync.Revisions, }) - } else if a.Operation != nil && a.Operation.Sync != nil { + } else if au.operationSyncExists(nil) { revisions = getRevisions(RevisionsData{ Revision: a.Operation.Sync.Revision, Revisions: a.Operation.Sync.Revisions, @@ -137,16 +141,17 @@ func GetOperationChangeRevisions(a *appv1.Application) []string { if a == nil { return revisions } + au := &AppUtils{App: a} // this value will be used in case if application hasn't resources, like empty gitsource - if a.Status.OperationState != nil && a.Status.OperationState.Operation.Sync != nil { + if au.operationStateSyncExists(nil) { if a.Status.OperationState.Operation.Sync.ChangeRevision != "" || a.Status.OperationState.Operation.Sync.ChangeRevisions != nil { revisions = getRevisions(RevisionsData{ Revision: a.Status.OperationState.Operation.Sync.ChangeRevision, Revisions: a.Status.OperationState.Operation.Sync.ChangeRevisions, }) } - } else if a.Operation != nil && a.Operation.Sync != nil { + } else if au.operationSyncExists(nil) { if a.Operation.Sync.ChangeRevision != "" || a.Operation.Sync.ChangeRevisions != nil { revisions = getRevisions(RevisionsData{ Revision: a.Operation.Sync.ChangeRevision, diff --git a/event_reporter/utils/app_revision_test.go b/event_reporter/utils/app_revision_test.go index 370edecdb2d5a..f3e5ab35d93ca 100644 --- a/event_reporter/utils/app_revision_test.go +++ b/event_reporter/utils/app_revision_test.go @@ -441,3 +441,224 @@ func TestAddCommitDetailsToLabels(t *testing.T) { assert.Equal(t, "http://my-grafana.com/pre-generated-link", result.GetLabels()["link"]) }) } + +func TestGetSyncRevisionAt(t *testing.T) { + t.Run("should return nil once idx out of range", func(t *testing.T) { + revisionMetadata := AppSyncRevisionsMetadata{ + SyncRevisions: []*RevisionWithMetadata{{ + Metadata: &v1alpha1.RevisionMetadata{ + Author: "demo usert", + Date: metav1.Time{}, + Message: "some message", + }, + }}, + } + + assert.Nil(t, revisionMetadata.GetSyncRevisionAt(-1)) + assert.Nil(t, revisionMetadata.GetSyncRevisionAt(1)) + }) + t.Run("should return nil if data missing", func(t *testing.T) { + revisionMetadata := AppSyncRevisionsMetadata{} + + assert.Nil(t, revisionMetadata.GetSyncRevisionAt(1)) + }) + t.Run("should return correct idx", func(t *testing.T) { + revisionMetadata := AppSyncRevisionsMetadata{ + SyncRevisions: []*RevisionWithMetadata{ + { + Metadata: &v1alpha1.RevisionMetadata{ + Author: "demo usert", + Date: metav1.Time{}, + Message: "some message", + }, + }, + { + Metadata: &v1alpha1.RevisionMetadata{ + Author: "demo user2", + Date: metav1.Time{}, + Message: "some message 2", + }, + }, + }, + } + + syncRev := revisionMetadata.GetSyncRevisionAt(1) + assert.NotNil(t, syncRev) + assert.Equal(t, "demo user2", syncRev.Metadata.Author) + assert.Equal(t, "some message 2", syncRev.Metadata.Message) + }) +} + +func TestGetOperationRevision(t *testing.T) { + t.Run("should return empty strint once app in nil", func(t *testing.T) { + assert.Equal(t, "", GetOperationRevision(nil)) + }) + t.Run("should return Status.Sync.Revision as fallback", func(t *testing.T) { + assert.Equal(t, "Status.Sync.Revision", GetOperationRevision(&v1alpha1.Application{ + Status: v1alpha1.ApplicationStatus{ + Sync: v1alpha1.SyncStatus{ + Revision: "Status.Sync.Revision", + }, + }, + })) + }) + t.Run("should return Status.OperationState.Operation.Sync.Revision", func(t *testing.T) { + assert.Equal(t, "Status.OperationState.Operation.Sync.Revision", GetOperationRevision(&v1alpha1.Application{ + Status: v1alpha1.ApplicationStatus{ + Sync: v1alpha1.SyncStatus{ + Revision: "Status.Sync.Revision", + }, + OperationState: &v1alpha1.OperationState{ + Operation: v1alpha1.Operation{ + Sync: &v1alpha1.SyncOperation{ + Revision: "Status.OperationState.Operation.Sync.Revision", + }, + }, + }, + }, + Operation: &v1alpha1.Operation{ + Sync: &v1alpha1.SyncOperation{ + Revision: "Operation.Sync.Revision", + }, + }, + })) + }) + t.Run("should return Status-Sync-Revision", func(t *testing.T) { + assert.Equal(t, "Operation.Sync.Revision", GetOperationRevision(&v1alpha1.Application{ + Status: v1alpha1.ApplicationStatus{ + Sync: v1alpha1.SyncStatus{ + Revision: "Status-Sync-Revision", + }, + }, + Operation: &v1alpha1.Operation{ + Sync: &v1alpha1.SyncOperation{ + Revision: "Operation.Sync.Revision", + }, + }, + })) + }) +} + +func TestGetOperationRevisions(t *testing.T) { + t.Run("should return empty strint once app in nil", func(t *testing.T) { + assert.Nil(t, GetOperationRevisions(nil)) + }) + t.Run("should return Status.Sync.Revisions as fallback", func(t *testing.T) { + res := GetOperationRevisions(&v1alpha1.Application{ + Status: v1alpha1.ApplicationStatus{ + Sync: v1alpha1.SyncStatus{ + Revision: "Status.Sync.Revision", + Revisions: []string{"Status.Sync.Revisions"}, + }, + }, + }) + assert.Len(t, res, 1) + assert.Equal(t, res[0], "Status.Sync.Revisions") + }) + t.Run("should return Status.OperationState.Operation.Sync.Revisions", func(t *testing.T) { + res := GetOperationRevisions(&v1alpha1.Application{ + Status: v1alpha1.ApplicationStatus{ + Sync: v1alpha1.SyncStatus{ + Revision: "Status.Sync.Revision", + Revisions: []string{"Status.Sync.Revisions"}, + }, + OperationState: &v1alpha1.OperationState{ + Operation: v1alpha1.Operation{ + Sync: &v1alpha1.SyncOperation{ + Revision: "Status.OperationState.Operation.Sync.Revision", + Revisions: []string{"Status.OperationState.Operation.Sync.Revisions"}, + }, + }, + }, + }, + Operation: &v1alpha1.Operation{ + Sync: &v1alpha1.SyncOperation{ + Revision: "Operation.Sync.Revision", + Revisions: []string{"Operation.Sync.Revisions"}, + }, + }, + }) + assert.Len(t, res, 1) + assert.Equal(t, "Status.OperationState.Operation.Sync.Revisions", res[0]) + }) + t.Run("should return Status-Sync-Revisions", func(t *testing.T) { + res := GetOperationRevisions(&v1alpha1.Application{ + Status: v1alpha1.ApplicationStatus{ + Sync: v1alpha1.SyncStatus{ + Revision: "Status-Sync-Revision", + }, + }, + Operation: &v1alpha1.Operation{ + Sync: &v1alpha1.SyncOperation{ + Revision: "Operation.Sync.Revision", + Revisions: []string{"Operation.Sync.Revisions"}, + }, + }, + }) + assert.Len(t, res, 1) + assert.Equal(t, res[0], "Operation.Sync.Revisions") + }) +} + +func TestGetOperationSyncResultRevision(t *testing.T) { + t.Run("should return nil", func(t *testing.T) { + assert.Nil(t, GetOperationSyncResultRevision(nil)) + assert.Nil(t, GetOperationSyncResultRevision(&v1alpha1.Application{ + Status: v1alpha1.ApplicationStatus{ + OperationState: &v1alpha1.OperationState{ + Operation: v1alpha1.Operation{ + Sync: &v1alpha1.SyncOperation{ + Revision: "Status.OperationState.Operation.Sync.Revision", + Revisions: []string{"Status.OperationState.Operation.Sync.Revisions"}, + }, + }, + }, + }, + })) + }) + t.Run("should return revision", func(t *testing.T) { + res := GetOperationSyncResultRevision(&v1alpha1.Application{ + Status: v1alpha1.ApplicationStatus{ + OperationState: &v1alpha1.OperationState{ + SyncResult: &v1alpha1.SyncOperationResult{ + Revision: "Status.OperationState.SyncResult.Revision", + Revisions: []string{"Status.OperationState.SyncResult.Revisions"}, + }, + }, + }, + }) + assert.Equal(t, "Status.OperationState.SyncResult.Revision", *res) + }) +} + +func TestGetOperationSyncResultRevisions(t *testing.T) { + t.Run("should return nil", func(t *testing.T) { + assert.Nil(t, GetOperationSyncResultRevisions(nil)) + assert.Nil(t, GetOperationSyncResultRevisions(&v1alpha1.Application{ + Status: v1alpha1.ApplicationStatus{ + OperationState: &v1alpha1.OperationState{ + Operation: v1alpha1.Operation{ + Sync: &v1alpha1.SyncOperation{ + Revision: "Status.OperationState.Operation.Sync.Revision", + Revisions: []string{"Status.OperationState.Operation.Sync.Revisions"}, + }, + }, + }, + }, + })) + }) + t.Run("should return revisions", func(t *testing.T) { + res := GetOperationSyncResultRevisions(&v1alpha1.Application{ + Status: v1alpha1.ApplicationStatus{ + OperationState: &v1alpha1.OperationState{ + SyncResult: &v1alpha1.SyncOperationResult{ + Revision: "Status.OperationState.SyncResult.Revision", + Revisions: []string{"Status.OperationState.SyncResult.Revisions"}, + }, + }, + }, + }) + assert.NotNil(t, res) + assert.Len(t, *res, 1) + }) +} From 4e729b9854aa6a97dd0945d7052a029df2829eab Mon Sep 17 00:00:00 2001 From: oleksandr-codefresh Date: Wed, 13 Nov 2024 17:48:18 +0200 Subject: [PATCH 22/27] fix lint issue --- event_reporter/utils/app_revision_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/event_reporter/utils/app_revision_test.go b/event_reporter/utils/app_revision_test.go index f3e5ab35d93ca..88cb9bccd8c82 100644 --- a/event_reporter/utils/app_revision_test.go +++ b/event_reporter/utils/app_revision_test.go @@ -553,7 +553,7 @@ func TestGetOperationRevisions(t *testing.T) { }, }) assert.Len(t, res, 1) - assert.Equal(t, res[0], "Status.Sync.Revisions") + assert.Equal(t, "Status.Sync.Revisions", res[0]) }) t.Run("should return Status.OperationState.Operation.Sync.Revisions", func(t *testing.T) { res := GetOperationRevisions(&v1alpha1.Application{ @@ -596,7 +596,7 @@ func TestGetOperationRevisions(t *testing.T) { }, }) assert.Len(t, res, 1) - assert.Equal(t, res[0], "Operation.Sync.Revisions") + assert.Equal(t, "Operation.Sync.Revisions", res[0]) }) } From 6f17e8b92dbf9ea3da4b49a89ac1e65d9b5e0c60 Mon Sep 17 00:00:00 2001 From: oleksandr-codefresh Date: Wed, 13 Nov 2024 18:18:34 +0200 Subject: [PATCH 23/27] reporter: fix lint issue --- event_reporter/utils/app.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/event_reporter/utils/app.go b/event_reporter/utils/app.go index 84dbe01d15b27..cbb1756b20770 100644 --- a/event_reporter/utils/app.go +++ b/event_reporter/utils/app.go @@ -4,8 +4,10 @@ import appv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1" type AppRevisionsFieldNames string -var AppRevisionFieldName AppRevisionsFieldNames = "Revision" -var AppRevisionsFieldName AppRevisionsFieldNames = "Revisions" +var ( + AppRevisionFieldName AppRevisionsFieldNames = "Revision" + AppRevisionsFieldName AppRevisionsFieldNames = "Revisions" +) type AppUtils struct { App *appv1.Application From d780165d166f29261e2b0e0e9e25f0f72b15f09c Mon Sep 17 00:00:00 2001 From: oleksandr-codefresh Date: Wed, 13 Nov 2024 19:10:02 +0200 Subject: [PATCH 24/27] reporter: fix lint issue --- event_reporter/reporter/application_event_reporter_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/event_reporter/reporter/application_event_reporter_test.go b/event_reporter/reporter/application_event_reporter_test.go index b2414628c4cdd..650b455094492 100644 --- a/event_reporter/reporter/application_event_reporter_test.go +++ b/event_reporter/reporter/application_event_reporter_test.go @@ -19,6 +19,9 @@ import ( "github.com/stretchr/testify/require" "k8s.io/apimachinery/pkg/watch" + "google.golang.org/grpc" + "k8s.io/apimachinery/pkg/runtime" + appclient "github.com/argoproj/argo-cd/v2/event_reporter/application" appMocks "github.com/argoproj/argo-cd/v2/event_reporter/application/mocks" "github.com/argoproj/argo-cd/v2/pkg/apiclient" @@ -26,8 +29,6 @@ import ( appv1reg "github.com/argoproj/argo-cd/v2/pkg/apis/application" repoapiclient "github.com/argoproj/argo-cd/v2/reposerver/apiclient" "github.com/argoproj/argo-cd/v2/util/io" - "google.golang.org/grpc" - "k8s.io/apimachinery/pkg/runtime" "github.com/argoproj/argo-cd/v2/event_reporter/metrics" From ac2eafd0dd793df27013c78947f53868b90796c2 Mon Sep 17 00:00:00 2001 From: oleksandr-codefresh Date: Thu, 14 Nov 2024 14:33:46 +0200 Subject: [PATCH 25/27] updated changelog record --- changelog/CHANGELOG-2.12.3-2024.11.14-d7a4c4e7e.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog/CHANGELOG-2.12.3-2024.11.14-d7a4c4e7e.md b/changelog/CHANGELOG-2.12.3-2024.11.14-d7a4c4e7e.md index b865f7475ea3d..c1666e82a2cba 100644 --- a/changelog/CHANGELOG-2.12.3-2024.11.14-d7a4c4e7e.md +++ b/changelog/CHANGELOG-2.12.3-2024.11.14-d7a4c4e7e.md @@ -1,2 +1,3 @@ ### Changes -- fix(event-reporter): fixed issue when if managed resource in degraded state and all of it child nodes in non-degraded state no error reported \ No newline at end of file +- fix(event-reporter): fixed issue when if managed resource in degraded state and all of it child nodes in non-degraded state no error reported +- fix(repo-server): fixed repeated resources generation for ApplicationSourceTypeDirectory \ No newline at end of file From 06395afb6811a575b084928624d3b28ab75be3c3 Mon Sep 17 00:00:00 2001 From: oleksandr-codefresh Date: Mon, 18 Nov 2024 13:22:03 +0200 Subject: [PATCH 26/27] event-reporter: refactored fields inside ObjectSource --- event_reporter/reporter/event_payload.go | 4 +- event_reporter/utils/app_revision.go | 8 + pkg/apiclient/events/events.pb.go | 224 ++++++++++++----------- server/application/events.proto | 10 +- 4 files changed, 129 insertions(+), 117 deletions(-) diff --git a/event_reporter/reporter/event_payload.go b/event_reporter/reporter/event_payload.go index 22bb9efdc067b..57037f38f4c61 100644 --- a/event_reporter/reporter/event_payload.go +++ b/event_reporter/reporter/event_payload.go @@ -105,6 +105,7 @@ func getResourceEventPayload( GitManifest: rr.desiredState.RawManifest, Path: rr.desiredState.Path, Revision: utils.GetApplicationLatestRevision(reportedEntityParentApp.app), + Revisions: utils.GetApplicationLatestRevisions(reportedEntityParentApp.app), OperationSyncRevision: utils.GetOperationRevision(reportedEntityParentApp.app), OperationSyncRevisions: utils.GetOperationRevisions(reportedEntityParentApp.app), HistoryId: utils.GetLatestAppHistoryId(reportedEntityParentApp.app), @@ -126,8 +127,7 @@ func getResourceEventPayload( addResourceEventPayloadGitCommitDetails(&source, rr, reportedEntityParentApp) if reportedEntityParentApp.validatedDestination != nil { - source.DestName = &reportedEntityParentApp.validatedDestination.Name - source.DestServer = reportedEntityParentApp.validatedDestination.Server + source.ClusterName = &reportedEntityParentApp.validatedDestination.Name } if rr.rs.Health != nil { diff --git a/event_reporter/utils/app_revision.go b/event_reporter/utils/app_revision.go index 10ab89e0f8dd6..2ed0840bde153 100644 --- a/event_reporter/utils/app_revision.go +++ b/event_reporter/utils/app_revision.go @@ -56,6 +56,14 @@ func GetApplicationLatestRevision(a *appv1.Application) string { return a.Status.Sync.Revision } +func GetApplicationLatestRevisions(a *appv1.Application) []string { + if lastHistory := getLatestAppHistoryItem(a); lastHistory != nil { + return lastHistory.Revisions + } + + return a.Status.Sync.Revisions +} + func GetOperationRevision(a *appv1.Application) string { if a == nil { return "" diff --git a/pkg/apiclient/events/events.pb.go b/pkg/apiclient/events/events.pb.go index cbea9b89ffab3..9a9df5b3cd5fb 100644 --- a/pkg/apiclient/events/events.pb.go +++ b/pkg/apiclient/events/events.pb.go @@ -261,9 +261,9 @@ type ObjectSource struct { AppNamespace string `protobuf:"bytes,21,opt,name=appNamespace" json:"appNamespace"` AppInstanceLabelKey string `protobuf:"bytes,22,opt,name=appInstanceLabelKey" json:"appInstanceLabelKey"` TrackingMethod string `protobuf:"bytes,23,opt,name=trackingMethod" json:"trackingMethod"` - OperationSyncRevisions []string `protobuf:"bytes,24,rep,name=operationSyncRevisions" json:"operationSyncRevisions,omitempty"` - DestServer string `protobuf:"bytes,25,req,name=destServer" json:"destServer"` - DestName *string `protobuf:"bytes,26,opt,name=destName" json:"destName,omitempty"` + Revisions []string `protobuf:"bytes,24,rep,name=revisions" json:"revisions,omitempty"` + OperationSyncRevisions []string `protobuf:"bytes,25,rep,name=operationSyncRevisions" json:"operationSyncRevisions,omitempty"` + ClusterName *string `protobuf:"bytes,26,opt,name=clusterName" json:"clusterName,omitempty"` AppMultiSourced bool `protobuf:"varint,27,req,name=appMultiSourced" json:"appMultiSourced"` AppSourceIdx int32 `protobuf:"varint,28,req,name=appSourceIdx" json:"appSourceIdx"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -465,23 +465,23 @@ func (m *ObjectSource) GetTrackingMethod() string { return "" } -func (m *ObjectSource) GetOperationSyncRevisions() []string { +func (m *ObjectSource) GetRevisions() []string { if m != nil { - return m.OperationSyncRevisions + return m.Revisions } return nil } -func (m *ObjectSource) GetDestServer() string { +func (m *ObjectSource) GetOperationSyncRevisions() []string { if m != nil { - return m.DestServer + return m.OperationSyncRevisions } - return "" + return nil } -func (m *ObjectSource) GetDestName() string { - if m != nil && m.DestName != nil { - return *m.DestName +func (m *ObjectSource) GetClusterName() string { + if m != nil && m.ClusterName != nil { + return *m.ClusterName } return "" } @@ -800,77 +800,77 @@ func init() { func init() { proto.RegisterFile("server/application/events.proto", fileDescriptor_3ad9267ec62b112f) } var fileDescriptor_3ad9267ec62b112f = []byte{ - // 1115 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x4d, 0x8f, 0x1c, 0x35, - 0x13, 0x7e, 0x7b, 0xf6, 0xbb, 0x66, 0x76, 0x93, 0xd7, 0xd9, 0x04, 0xb3, 0x2c, 0x9b, 0xd1, 0x28, - 0x42, 0xa3, 0x28, 0xe9, 0x51, 0x16, 0x88, 0x92, 0x08, 0x21, 0x6d, 0x94, 0x00, 0x0b, 0xbb, 0x80, - 0x7a, 0x49, 0x0e, 0xb9, 0x39, 0xdd, 0x95, 0x1e, 0x67, 0x7a, 0x6c, 0x63, 0x7b, 0x46, 0xcc, 0x5f, - 0xe2, 0x97, 0xe4, 0xc8, 0x91, 0x13, 0x42, 0xb9, 0xf0, 0x1f, 0x38, 0x21, 0xbb, 0x3f, 0xd6, 0x3d, - 0x0c, 0x12, 0xe1, 0xe6, 0x7a, 0xea, 0xa9, 0xea, 0xae, 0x0f, 0x57, 0x19, 0x6e, 0x1a, 0xd4, 0x73, - 0xd4, 0x23, 0xa6, 0x54, 0xc1, 0x53, 0x66, 0xb9, 0x14, 0x23, 0x9c, 0xa3, 0xb0, 0x26, 0x56, 0x5a, - 0x5a, 0x49, 0xb6, 0x72, 0x14, 0xa8, 0x79, 0x7a, 0x70, 0x96, 0x73, 0x3b, 0x9e, 0xbd, 0x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f1, 0xc7, 0x19, 0xd7, 0x38, 0x75, 0xef, 0xad, - 0xb2, 0x40, 0x49, 0x0b, 0x1b, 0x28, 0xb8, 0xb6, 0x62, 0x09, 0x93, 0x23, 0x80, 0xcb, 0x35, 0x5c, - 0x7d, 0x28, 0x40, 0xc8, 0x43, 0xe8, 0x65, 0xc1, 0x2f, 0xf9, 0xcf, 0x86, 0x4f, 0x87, 0xf0, 0x7f, - 0x93, 0x16, 0xf5, 0xf1, 0xc9, 0x9b, 0xb7, 0x47, 0xd1, 0x2f, 0x6f, 0x8f, 0xa2, 0xdf, 0xdf, 0x1e, - 0x45, 0x2f, 0x3e, 0xfe, 0x77, 0x8f, 0xbe, 0xb4, 0xe0, 0x28, 0x6c, 0xf5, 0x70, 0xfc, 0x2b, 0x00, - 0x00, 0xff, 0xff, 0x7a, 0x3b, 0xe0, 0x5a, 0x54, 0x0a, 0x00, 0x00, + // 1113 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x5d, 0x6f, 0x1c, 0x35, + 0x17, 0x7e, 0x67, 0xf3, 0xb9, 0x67, 0x37, 0x69, 0x5f, 0x37, 0x2d, 0x26, 0x84, 0x74, 0xb4, 0xaa, + 0xd0, 0xaa, 0x6a, 0x77, 0xd5, 0x00, 0x55, 0x5b, 0x21, 0xa4, 0x54, 0x2d, 0x10, 0x48, 0x00, 0x4d, + 0x68, 0x2f, 0x7a, 0xe7, 0xce, 0x9c, 0xce, 0xba, 0x3b, 0x6b, 0x1b, 0xdb, 0xbb, 0x62, 0xff, 0x12, + 0xbf, 0xa4, 0x97, 0x5c, 0x71, 0x89, 0x50, 0x6f, 0xf8, 0x0f, 0x5c, 0x21, 0x7b, 0x3e, 0xe2, 0x09, + 0x8b, 0x44, 0xb9, 0xb3, 0x9f, 0xf3, 0x9c, 0x63, 0x9f, 0x4f, 0x1b, 0x6e, 0x1a, 0xd4, 0x0b,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xab, 0xb8, 0x95, 0xbb, 0x93, 0xec, 0x27, 0x7a, 0x10, 0x77, + 0x86, 0x1b, 0x41, 0xdc, 0x1a, 0xc9, 0xfe, 0x67, 0xb0, 0xdb, 0x6e, 0x1f, 0x72, 0x15, 0xd6, 0xa6, + 0xb8, 0x2c, 0xe7, 0x61, 0xe2, 0x96, 0x64, 0x0f, 0x36, 0x16, 0xac, 0x98, 0x63, 0x39, 0xf4, 0x92, + 0x72, 0xf3, 0xa8, 0xf3, 0x20, 0x1a, 0xfc, 0x19, 0x41, 0x2f, 0x18, 0xd8, 0x6e, 0x62, 0xd9, 0xa5, + 0xc2, 0xd6, 0x30, 0xf5, 0x08, 0xd9, 0x87, 0x8d, 0x02, 0x17, 0x58, 0xb4, 0x06, 0x67, 0x09, 0xb9, + 0x1a, 0x9c, 0x55, 0x35, 0x1a, 0xce, 0xca, 0x1a, 0x24, 0xa7, 0xb0, 0x5d, 0x30, 0x63, 0xcf, 0x11, + 0x85, 0x1f, 0x94, 0xff, 0xa5, 0x29, 0x1b, 0x0b, 0xe4, 0x4b, 0xb8, 0x52, 0x3e, 0x42, 0x09, 0xbe, + 0x42, 0x8d, 0x22, 0xc5, 0xea, 0x41, 0xf9, 0xb0, 0x99, 0x2e, 0xde, 0x99, 0xf3, 0x36, 0x29, 0xb9, + 0xac, 0x35, 0xf8, 0x39, 0x82, 0xbd, 0x55, 0x4c, 0xe7, 0x6b, 0xae, 0xe5, 0x5c, 0xb5, 0xc2, 0x50, + 0x42, 0xce, 0xd7, 0x45, 0xf9, 0x2c, 0xb5, 0x22, 0x51, 0x83, 0x2e, 0x82, 0x53, 0x2e, 0x32, 0xff, + 0x8a, 0x36, 0x11, 0x74, 0x88, 0x93, 0xf8, 0xc7, 0x7d, 0x3d, 0x94, 0xf8, 0x27, 0x7e, 0x00, 0x5d, + 0xd1, 0xb4, 0x48, 0xf8, 0x58, 0x5c, 0xc0, 0x83, 0x17, 0xd0, 0x7f, 0x82, 0x0a, 0x45, 0x86, 0x22, + 0xe5, 0x68, 0xdc, 0x57, 0xa1, 0x90, 0xe9, 0xb4, 0x4a, 0xb3, 0x5f, 0x3b, 0x2c, 0x43, 0x65, 0xaa, + 0x34, 0xfb, 0xb5, 0x9b, 0x34, 0x1a, 0x7f, 0x9c, 0x73, 0x8d, 0x33, 0xf7, 0xdb, 0x2a, 0x13, 0x94, + 0xb4, 0xb0, 0x81, 0x82, 0x6b, 0x2b, 0x9e, 0x60, 0x72, 0x08, 0x70, 0xf1, 0x08, 0x57, 0x07, 0x05, + 0x08, 0x79, 0x08, 0xfd, 0x2c, 0xb8, 0x92, 0x3f, 0x36, 0xfc, 0x38, 0x84, 0xf7, 0x4d, 0x5a, 0xd4, + 0xc7, 0xc7, 0x6f, 0xde, 0x1e, 0x46, 0xbf, 0xbc, 0x3d, 0x8c, 0x7e, 0x7f, 0x7b, 0x18, 0xbd, 0xf8, + 0xf8, 0xdf, 0x7d, 0xf9, 0xd2, 0x82, 0xa3, 0xb0, 0xd5, 0xb7, 0xf1, 0xaf, 0x00, 0x00, 0x00, 0xff, + 0xff, 0xd1, 0x51, 0x14, 0xfd, 0x52, 0x0a, 0x00, 0x00, } func (m *EventSource) Marshal() (dAtA []byte, err error) { @@ -1081,22 +1081,15 @@ func (m *ObjectSource) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x1 i-- dAtA[i] = 0xd8 - if m.DestName != nil { - i -= len(*m.DestName) - copy(dAtA[i:], *m.DestName) - i = encodeVarintEvents(dAtA, i, uint64(len(*m.DestName))) + if m.ClusterName != nil { + i -= len(*m.ClusterName) + copy(dAtA[i:], *m.ClusterName) + i = encodeVarintEvents(dAtA, i, uint64(len(*m.ClusterName))) i-- dAtA[i] = 0x1 i-- dAtA[i] = 0xd2 } - i -= len(m.DestServer) - copy(dAtA[i:], m.DestServer) - i = encodeVarintEvents(dAtA, i, uint64(len(m.DestServer))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xca if len(m.OperationSyncRevisions) > 0 { for iNdEx := len(m.OperationSyncRevisions) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.OperationSyncRevisions[iNdEx]) @@ -1105,6 +1098,17 @@ func (m *ObjectSource) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1 i-- + dAtA[i] = 0xca + } + } + if len(m.Revisions) > 0 { + for iNdEx := len(m.Revisions) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Revisions[iNdEx]) + copy(dAtA[i:], m.Revisions[iNdEx]) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Revisions[iNdEx]))) + i-- + dAtA[i] = 0x1 + i-- dAtA[i] = 0xc2 } } @@ -1635,16 +1639,20 @@ func (m *ObjectSource) Size() (n int) { n += 2 + l + sovEvents(uint64(l)) l = len(m.TrackingMethod) n += 2 + l + sovEvents(uint64(l)) + if len(m.Revisions) > 0 { + for _, s := range m.Revisions { + l = len(s) + n += 2 + l + sovEvents(uint64(l)) + } + } if len(m.OperationSyncRevisions) > 0 { for _, s := range m.OperationSyncRevisions { l = len(s) n += 2 + l + sovEvents(uint64(l)) } } - l = len(m.DestServer) - n += 2 + l + sovEvents(uint64(l)) - if m.DestName != nil { - l = len(*m.DestName) + if m.ClusterName != nil { + l = len(*m.ClusterName) n += 2 + l + sovEvents(uint64(l)) } n += 3 @@ -3098,7 +3106,7 @@ func (m *ObjectSource) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 24: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OperationSyncRevisions", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Revisions", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3126,11 +3134,11 @@ func (m *ObjectSource) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.OperationSyncRevisions = append(m.OperationSyncRevisions, string(dAtA[iNdEx:postIndex])) + m.Revisions = append(m.Revisions, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 25: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DestServer", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OperationSyncRevisions", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3158,12 +3166,11 @@ func (m *ObjectSource) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.DestServer = string(dAtA[iNdEx:postIndex]) + m.OperationSyncRevisions = append(m.OperationSyncRevisions, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - hasFields[0] |= uint64(0x00000001) case 26: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DestName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ClusterName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3192,7 +3199,7 @@ func (m *ObjectSource) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) - m.DestName = &s + m.ClusterName = &s iNdEx = postIndex case 27: if wireType != 0 { @@ -3214,7 +3221,7 @@ func (m *ObjectSource) Unmarshal(dAtA []byte) error { } } m.AppMultiSourced = bool(v != 0) - hasFields[0] |= uint64(0x00000002) + hasFields[0] |= uint64(0x00000001) case 28: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field AppSourceIdx", wireType) @@ -3234,7 +3241,7 @@ func (m *ObjectSource) Unmarshal(dAtA []byte) error { break } } - hasFields[0] |= uint64(0x00000004) + hasFields[0] |= uint64(0x00000002) default: iNdEx = preIndex skippy, err := skipEvents(dAtA[iNdEx:]) @@ -3252,12 +3259,9 @@ func (m *ObjectSource) Unmarshal(dAtA []byte) error { } } if hasFields[0]&uint64(0x00000001) == 0 { - return github_com_gogo_protobuf_proto.NewRequiredNotSetError("destServer") - } - if hasFields[0]&uint64(0x00000002) == 0 { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("appMultiSourced") } - if hasFields[0]&uint64(0x00000004) == 0 { + if hasFields[0]&uint64(0x00000002) == 0 { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("appSourceIdx") } diff --git a/server/application/events.proto b/server/application/events.proto index 7e29da7a62cd1..4caf1dedfa7f8 100644 --- a/server/application/events.proto +++ b/server/application/events.proto @@ -55,7 +55,7 @@ message ObjectSource { optional string gitManifest = 3 [(gogoproto.nullable) = false]; optional string repoURL = 4 [(gogoproto.nullable) = false]; optional string path = 5 [(gogoproto.nullable) = false]; - optional string revision = 6 [(gogoproto.nullable) = false]; + optional string revision = 6 [(gogoproto.nullable) = false]; // sync.revision optional string commitMessage = 7 [(gogoproto.nullable) = false]; optional string commitAuthor = 8 [(gogoproto.nullable) = false]; optional k8s.io.apimachinery.pkg.apis.meta.v1.Time commitDate = 9; @@ -66,16 +66,16 @@ message ObjectSource { optional k8s.io.apimachinery.pkg.apis.meta.v1.Time syncFinishedAt = 14; optional string healthStatus = 15; optional string healthMessage = 16; - optional string cluster = 17 [(gogoproto.nullable) = false]; // legacy, returns only server, empty if destinatin.name used + optional string cluster = 17 [(gogoproto.nullable) = false]; // destination.server optional int64 historyId = 18 [(gogoproto.nullable) = false]; // legacy optional string operationSyncRevision = 19 [(gogoproto.nullable) = false]; optional string appUID = 20 [(gogoproto.nullable) = false]; optional string appNamespace = 21 [(gogoproto.nullable) = false]; optional string appInstanceLabelKey = 22 [(gogoproto.nullable) = false]; optional string trackingMethod = 23 [(gogoproto.nullable) = false]; - repeated string operationSyncRevisions = 24; - required string destServer = 25 [(gogoproto.nullable) = false]; - optional string destName = 26; + repeated string revisions = 24; // sync.revisions + repeated string operationSyncRevisions = 25; // syncResult.revisions + optional string clusterName = 26; // destination.name required bool appMultiSourced = 27 [(gogoproto.nullable) = false]; required int32 appSourceIdx = 28 [(gogoproto.nullable) = false]; } From 5d9da4f437be16b28ef05fade350aeb33d73ab71 Mon Sep 17 00:00:00 2001 From: oleksandr-codefresh Date: Wed, 20 Nov 2024 17:54:03 +0200 Subject: [PATCH 27/27] event-reporter: added runtime version reporting with each event --- .../commands/event_reporter_server.go | 11 +- .../reporter/application_event_reporter.go | 5 +- event_reporter/reporter/event_payload.go | 24 ++- pkg/apiclient/events/events.pb.go | 203 +++++++++++------- pkg/codefresh/client.go | 9 +- server/application/events.proto | 2 + 6 files changed, 160 insertions(+), 94 deletions(-) diff --git a/cmd/event-reporter-server/commands/event_reporter_server.go b/cmd/event-reporter-server/commands/event_reporter_server.go index 5d39d70171d45..43b41695f3d44 100644 --- a/cmd/event-reporter-server/commands/event_reporter_server.go +++ b/cmd/event-reporter-server/commands/event_reporter_server.go @@ -96,6 +96,7 @@ func NewCommand() *cobra.Command { codefreshUrl string codefreshToken string shardingAlgorithm string + runtimeVersion string rootpath string useGrpc bool @@ -179,10 +180,11 @@ func NewCommand() *cobra.Command { ApplicationNamespaces: applicationNamespaces, ApplicationServiceClient: getApplicationClient(useGrpc, applicationServerAddress, argocdToken, rootpath), CodefreshConfig: &codefresh.CodefreshConfig{ - BaseURL: codefreshUrl, - AuthToken: codefreshToken, - TlsInsecure: codefreshTlsInsecure, - CaCertPath: codefreshTlsCertPath, + BaseURL: codefreshUrl, + AuthToken: codefreshToken, + TlsInsecure: codefreshTlsInsecure, + CaCertPath: codefreshTlsCertPath, + RuntimeVersion: runtimeVersion, }, RateLimiterOpts: &reporter.RateLimiterOpts{ Enabled: rateLimiterEnabled, @@ -236,6 +238,7 @@ func NewCommand() *cobra.Command { command.Flags().StringVar(&codefreshUrl, "codefresh-url", env.StringFromEnv("CODEFRESH_URL", "https://g.codefresh.io"), "Codefresh API url") command.Flags().StringVar(&codefreshToken, "codefresh-token", env.StringFromEnv("CODEFRESH_TOKEN", ""), "Codefresh token") command.Flags().StringVar(&shardingAlgorithm, "sharding-method", env.StringFromEnv(common.EnvEventReporterShardingAlgorithm, common.DefaultEventReporterShardingAlgorithm), "Enables choice of sharding method. Supported sharding methods are : [legacy] ") + command.Flags().StringVar(&runtimeVersion, "codefresh-runtime-version", env.StringFromEnv("CODEFRESH_RUNTIME_VERSION", ""), "Codefresh runtime version to be reported with each event to platform") command.Flags().StringSliceVar(&applicationNamespaces, "application-namespaces", env.StringsFromEnv("ARGOCD_APPLICATION_NAMESPACES", []string{}, ","), "List of additional namespaces where application resources can be managed in") command.Flags().BoolVar(&useGrpc, "grpc", env.ParseBoolFromEnv("USE_GRPC", false), "Use grpc for interact with argocd server") command.Flags().BoolVar(&rateLimiterEnabled, "rate-limiter-enabled", env.ParseBoolFromEnv("RATE_LIMITER_ENABLED", false), "Use rate limiter for prevent queue to be overflowed") diff --git a/event_reporter/reporter/application_event_reporter.go b/event_reporter/reporter/application_event_reporter.go index 8edfe3013aabf..359f694f7af5a 100644 --- a/event_reporter/reporter/application_event_reporter.go +++ b/event_reporter/reporter/application_event_reporter.go @@ -45,6 +45,7 @@ type applicationEventReporter struct { applicationServiceClient appclient.ApplicationClient metricsServer *metrics.MetricsServer db db.ArgoDB + runtimeVersion string } type ApplicationEventReporter interface { @@ -66,6 +67,7 @@ func NewApplicationEventReporter(cache *servercache.Cache, applicationServiceCli appLister: appLister, metricsServer: metricsServer, db: db, + runtimeVersion: codefreshConfig.RuntimeVersion, } } @@ -201,7 +203,7 @@ func (s *applicationEventReporter) StreamApplicationEvents( } else { // will get here only for root applications (not managed as a resource by another application) logCtx.Info("processing as root application") - appEvent, err := s.getApplicationEventPayload(ctx, a, appTree, eventProcessingStartedAt, applicationVersions, argoTrackingMetadata) + appEvent, err := s.getApplicationEventPayload(ctx, a, appTree, eventProcessingStartedAt, applicationVersions, argoTrackingMetadata, s.runtimeVersion) if err != nil { s.metricsServer.IncErroredEventsCounter(metrics.MetricParentAppEventType, metrics.MetricEventGetPayloadErrorType, a.Name) return fmt.Errorf("failed to get application event: %w", err) @@ -363,6 +365,7 @@ func (s *applicationEventReporter) processResource( desiredManifests: reportedEntityParentApp.desiredManifests, }, argoTrackingMetadata, + s.runtimeVersion, ) if err != nil { s.metricsServer.IncErroredEventsCounter(metricsEventType, metrics.MetricEventGetPayloadErrorType, reportedEntityParentApp.app.Name) diff --git a/event_reporter/reporter/event_payload.go b/event_reporter/reporter/event_payload.go index 57037f38f4c61..24d7cbd465011 100644 --- a/event_reporter/reporter/event_payload.go +++ b/event_reporter/reporter/event_payload.go @@ -24,6 +24,7 @@ func getResourceEventPayload( rr *ReportedResource, reportedEntityParentApp *ReportedEntityParentApp, argoTrackingMetadata *ArgoTrackingMetadata, + runtimeVersion string, ) (*events.Event, error) { var ( err error @@ -136,11 +137,12 @@ func getResourceEventPayload( } payload := events.EventPayload{ - Timestamp: appEventProcessingStartedAt, - Object: object, - Source: &source, - Errors: getResourceEventPayloadErrors(rr, reportedEntityParentApp), - AppVersions: applicationVersionsEvents, + Timestamp: appEventProcessingStartedAt, + Object: object, + Source: &source, + Errors: getResourceEventPayloadErrors(rr, reportedEntityParentApp), + AppVersions: applicationVersionsEvents, + RuntimeVersion: runtimeVersion, } if payload.AppVersions != nil { @@ -289,6 +291,7 @@ func (s *applicationEventReporter) getApplicationEventPayload( eventProcessingStartedAt string, applicationVersions *apiclient.ApplicationVersions, argoTrackingMetadata *ArgoTrackingMetadata, + runtimeVersion string, ) (*events.Event, error) { var ( syncStarted = metav1.Now() @@ -365,11 +368,12 @@ func (s *applicationEventReporter) getApplicationEventPayload( errors = append(errors, parseAggregativeHealthErrorsOfApplication(a, appTree)...) payload := events.EventPayload{ - Timestamp: eventProcessingStartedAt, - Object: object, - Source: source, - Errors: errors, - AppVersions: applicationVersionsEvents, + Timestamp: eventProcessingStartedAt, + Object: object, + Source: source, + Errors: errors, + AppVersions: applicationVersionsEvents, + RuntimeVersion: runtimeVersion, } logCtx.Infof("AppVersion before encoding: %v", utils.SafeString(payload.AppVersions.AppVersion)) diff --git a/pkg/apiclient/events/events.pb.go b/pkg/apiclient/events/events.pb.go index 9a9df5b3cd5fb..9abdc40a779b8 100644 --- a/pkg/apiclient/events/events.pb.go +++ b/pkg/apiclient/events/events.pb.go @@ -161,10 +161,12 @@ type EventPayload struct { // The errors of this object Errors []*ObjectError `protobuf:"bytes,4,rep,name=errors" json:"errors,omitempty"` // A version of the application and its dependencies - AppVersions *ApplicationVersions `protobuf:"bytes,5,opt,name=appVersions" json:"appVersions,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + AppVersions *ApplicationVersions `protobuf:"bytes,5,opt,name=appVersions" json:"appVersions,omitempty"` + // A version of codefresh runtime + RuntimeVersion string `protobuf:"bytes,6,req,name=runtimeVersion" json:"runtimeVersion"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *EventPayload) Reset() { *m = EventPayload{} } @@ -235,6 +237,13 @@ func (m *EventPayload) GetAppVersions() *ApplicationVersions { return nil } +func (m *EventPayload) GetRuntimeVersion() string { + if m != nil { + return m.RuntimeVersion + } + return "" +} + // * // Holds information about the object source type ObjectSource struct { @@ -800,77 +809,78 @@ func init() { func init() { proto.RegisterFile("server/application/events.proto", fileDescriptor_3ad9267ec62b112f) } var fileDescriptor_3ad9267ec62b112f = []byte{ - // 1113 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x5d, 0x6f, 0x1c, 0x35, - 0x17, 0x7e, 0x67, 0xf3, 0xb9, 0x67, 0x37, 0x69, 0x5f, 0x37, 0x2d, 0x26, 0x84, 0x74, 0xb4, 0xaa, - 0xd0, 0xaa, 0x6a, 0x77, 0xd5, 0x00, 0x55, 0x5b, 0x21, 0xa4, 0x54, 0x2d, 0x10, 0x48, 0x00, 0x4d, - 0x68, 0x2f, 0x7a, 0xe7, 0xce, 0x9c, 0xce, 0xba, 0x3b, 0x6b, 0x1b, 0xdb, 0xbb, 0x62, 0xff, 0x12, - 0xbf, 0xa4, 0x97, 0x5c, 0x71, 0x89, 0x50, 0x6f, 0xf8, 0x0f, 0x5c, 0x21, 0x7b, 0x3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x27, 0x7e, 0x00, 0x5d, - 0xd1, 0xb4, 0x48, 0xf8, 0x58, 0x5c, 0xc0, 0x83, 0x17, 0xd0, 0x7f, 0x82, 0x0a, 0x45, 0x86, 0x22, - 0xe5, 0x68, 0xdc, 0x57, 0xa1, 0x90, 0xe9, 0xb4, 0x4a, 0xb3, 0x5f, 0x3b, 0x2c, 0x43, 0x65, 0xaa, - 0x34, 0xfb, 0xb5, 0x9b, 0x34, 0x1a, 0x7f, 0x9c, 0x73, 0x8d, 0x33, 0xf7, 0xdb, 0x2a, 0x13, 0x94, - 0xb4, 0xb0, 0x81, 0x82, 0x6b, 0x2b, 0x9e, 0x60, 0x72, 0x08, 0x70, 0xf1, 0x08, 0x57, 0x07, 0x05, - 0x08, 0x79, 0x08, 0xfd, 0x2c, 0xb8, 0x92, 0x3f, 0x36, 0xfc, 0x38, 0x84, 0xf7, 0x4d, 0x5a, 0xd4, - 0xc7, 0xc7, 0x6f, 0xde, 0x1e, 0x46, 0xbf, 0xbc, 0x3d, 0x8c, 0x7e, 0x7f, 0x7b, 0x18, 0xbd, 0xf8, - 0xf8, 0xdf, 0x7d, 0xf9, 0xd2, 0x82, 0xa3, 0xb0, 0xd5, 0xb7, 0xf1, 0xaf, 0x00, 0x00, 0x00, 0xff, - 0xff, 0xd1, 0x51, 0x14, 0xfd, 0x52, 0x0a, 0x00, 0x00, + // 1125 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xdd, 0x8e, 0x1b, 0xb5, + 0x17, 0xff, 0x27, 0xfb, 0x99, 0x93, 0xec, 0xb6, 0x7f, 0x77, 0x5b, 0xcc, 0xb2, 0x6c, 0xa3, 0xa8, + 0x42, 0x51, 0xd5, 0x26, 0xea, 0x02, 0x55, 0x5b, 0x21, 0xa4, 0xad, 0x5a, 0x60, 0x61, 0x17, 0xd0, + 0x2c, 0xed, 0x45, 0xef, 0xdc, 0x99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xdd, 0xc6, 0x42, 0x7f, 0x55, 0xe8, 0x8e, 0x63, 0xa9, 0x9d, 0xb2, 0x62, 0x41, 0x6f, 0x46, + 0xf4, 0x15, 0x19, 0xf9, 0x08, 0xda, 0x39, 0xb7, 0x0b, 0xea, 0x46, 0x44, 0x8d, 0x05, 0xe4, 0x18, + 0x76, 0x34, 0x2a, 0xf9, 0x2c, 0x39, 0xa7, 0x9b, 0x11, 0xa7, 0x02, 0x09, 0x85, 0x4d, 0xc5, 0xec, + 0xc8, 0x47, 0xa7, 0x12, 0x7a, 0x84, 0x74, 0x61, 0x57, 0xe3, 0x8c, 0x07, 0xc7, 0x97, 0xd2, 0x05, + 0x4a, 0x6e, 0xc3, 0x5e, 0x2a, 0x27, 0x13, 0x6e, 0x2f, 0xd0, 0x18, 0x96, 0x23, 0xdd, 0x89, 0x68, + 0x75, 0x11, 0xe9, 0x43, 0xa7, 0x04, 0x4e, 0xa7, 0x76, 0x24, 0x35, 0xdd, 0x8d, 0xa8, 0x35, 0x09, + 0xf9, 0x1a, 0xa0, 0xdc, 0x3f, 0x61, 0x16, 0x69, 0xcb, 0x67, 0xed, 0xf6, 0xa0, 0xec, 0xa8, 0x41, + 0xdc, 0x51, 0x03, 0x35, 0xce, 0x1d, 0x60, 0x06, 0xae, 0xa3, 0x06, 0xb3, 0x7b, 0x83, 0x1f, 0xf8, + 0x04, 0x93, 0x48, 0xdb, 0x79, 0xcf, 0x94, 0xfa, 0xd6, 0x55, 0x37, 0xc4, 0xde, 0x07, 0x90, 0x7c, + 0x05, 0x2d, 0xa6, 0xd4, 0x39, 0x7b, 0x89, 0x85, 0xa1, 0x6d, 0x5f, 0x53, 0xb7, 0xd6, 0x96, 0xa0, + 0xab, 0x96, 0x92, 0xf6, 0x54, 0x58, 0x3d, 0xaf, 0x2a, 0x7c, 0xa1, 0x4c, 0x6e, 0x01, 0x98, 0xb9, + 0x48, 0x2f, 0x2d, 0xb3, 0x53, 0x43, 0x3b, 0xd1, 0x61, 0x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0xaf, 0xb9, 0x96, 0x53, 0x55, 0x0b, 0x43, 0x09, 0x39, 0x5f, 0x67, + 0xe1, 0xc5, 0x8a, 0x23, 0x51, 0x81, 0x2e, 0x82, 0x63, 0x2e, 0x32, 0xff, 0xe6, 0x2e, 0x22, 0xe8, + 0x10, 0x27, 0xf1, 0x5f, 0x81, 0xcd, 0x58, 0xe2, 0x3f, 0x04, 0x3d, 0x68, 0x89, 0x45, 0x8b, 0xc4, + 0x8f, 0xc5, 0x12, 0xee, 0xbd, 0x80, 0xce, 0x13, 0x54, 0x28, 0x32, 0x14, 0x29, 0x47, 0xe3, 0x3e, + 0x16, 0x85, 0x4c, 0xc7, 0x21, 0xcd, 0x7e, 0xed, 0xb0, 0x0c, 0x95, 0x09, 0x69, 0xf6, 0x6b, 0x37, + 0x69, 0x34, 0xfe, 0x38, 0xe5, 0x1a, 0x27, 0xee, 0x6f, 0x56, 0x26, 0x28, 0xa9, 0x61, 0x3d, 0x05, + 0xd7, 0xd6, 0x3c, 0xd8, 0xe4, 0x18, 0x60, 0xf9, 0x64, 0x87, 0x83, 0x22, 0x84, 0x3c, 0x84, 0x4e, + 0x16, 0x5d, 0xc9, 0x1f, 0x1b, 0x7f, 0x33, 0xe2, 0xfb, 0x26, 0x35, 0xea, 0xe3, 0xd3, 0x37, 0x6f, + 0x8f, 0x1b, 0xbf, 0xbe, 0x3d, 0x6e, 0xfc, 0xf1, 0xf6, 0xb8, 0xf1, 0xe2, 0xe3, 0x7f, 0xf7, 0x41, + 0x4c, 0x0b, 0x8e, 0xc2, 0x86, 0x4f, 0xe6, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xc5, 0xd7, 0x70, + 0xae, 0x80, 0x0a, 0x00, 0x00, } func (m *EventSource) Marshal() (dAtA []byte, err error) { @@ -985,6 +995,11 @@ func (m *EventPayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + i -= len(m.RuntimeVersion) + copy(dAtA[i:], m.RuntimeVersion) + i = encodeVarintEvents(dAtA, i, uint64(len(m.RuntimeVersion))) + i-- + dAtA[i] = 0x32 if m.AppVersions != nil { { size, err := m.AppVersions.MarshalToSizedBuffer(dAtA[:i]) @@ -1568,6 +1583,8 @@ func (m *EventPayload) Size() (n int) { l = m.AppVersions.Size() n += 1 + l + sovEvents(uint64(l)) } + l = len(m.RuntimeVersion) + n += 1 + l + sovEvents(uint64(l)) if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -2214,6 +2231,39 @@ func (m *EventPayload) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RuntimeVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RuntimeVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000008) default: iNdEx = preIndex skippy, err := skipEvents(dAtA[iNdEx:]) @@ -2239,6 +2289,9 @@ func (m *EventPayload) Unmarshal(dAtA []byte) error { if hasFields[0]&uint64(0x00000004) == 0 { return github_com_gogo_protobuf_proto.NewRequiredNotSetError("source") } + if hasFields[0]&uint64(0x00000008) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("runtimeVersion") + } if iNdEx > l { return io.ErrUnexpectedEOF diff --git a/pkg/codefresh/client.go b/pkg/codefresh/client.go index d917fe9dd90e6..47158f6af6fd0 100644 --- a/pkg/codefresh/client.go +++ b/pkg/codefresh/client.go @@ -21,10 +21,11 @@ import ( ) type CodefreshConfig struct { - BaseURL string - AuthToken string - TlsInsecure bool - CaCertPath string + BaseURL string + AuthToken string + TlsInsecure bool + CaCertPath string + RuntimeVersion string } type CodefreshClient struct { diff --git a/server/application/events.proto b/server/application/events.proto index 4caf1dedfa7f8..045aa5888de7b 100644 --- a/server/application/events.proto +++ b/server/application/events.proto @@ -44,6 +44,8 @@ message EventPayload { repeated ObjectError errors = 4; // A version of the application and its dependencies optional ApplicationVersions appVersions = 5; + // A version of codefresh runtime + required string runtimeVersion = 6 [(gogoproto.nullable) = false]; } /**