diff --git a/pkg/apiclient/events/events.pb.go b/pkg/apiclient/events/events.pb.go index ed4394d2a0727..76a933236c59d 100644 --- a/pkg/apiclient/events/events.pb.go +++ b/pkg/apiclient/events/events.pb.go @@ -233,27 +233,28 @@ func (m *EventPayload) GetErrors() []*ObjectError { //* // 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"` - 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"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *ObjectSource) Reset() { *m = ObjectSource{} } @@ -415,6 +416,13 @@ func (m *ObjectSource) GetHistoryId() int64 { return 0 } +func (m *ObjectSource) GetOperationSyncRevision() string { + if m != nil { + return m.OperationSyncRevision + } + return "" +} + //* // Holds error information type ObjectError struct { @@ -500,59 +508,60 @@ func init() { func init() { proto.RegisterFile("server/application/events.proto", fileDescriptor_3ad9267ec62b112f) } var fileDescriptor_3ad9267ec62b112f = []byte{ - // 823 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0xc1, 0x6e, 0x24, 0x35, - 0x13, 0xfe, 0x7b, 0x66, 0x92, 0x49, 0x6a, 0x26, 0xb3, 0xf9, 0xad, 0x2c, 0x58, 0x23, 0xc8, 0xb6, - 0x46, 0x11, 0x1a, 0xad, 0x76, 0xbb, 0xc9, 0x00, 0xd2, 0x82, 0xb8, 0x64, 0x45, 0x10, 0xa0, 0x2c, - 0xa0, 0x0e, 0x20, 0xc1, 0xcd, 0xe9, 0xa9, 0xed, 0xf6, 0xa6, 0xbb, 0x6d, 0xd9, 0x9e, 0x96, 0xe6, - 0xca, 0x2b, 0x70, 0xe3, 0x05, 0x38, 0xf3, 0x16, 0x7b, 0x44, 0xe2, 0x8e, 0x50, 0xc4, 0x83, 0x20, - 0xbb, 0x7b, 0x26, 0xee, 0xb0, 0x07, 0x96, 0x9b, 0xeb, 0xab, 0xaf, 0x3e, 0xbb, 0x5c, 0x55, 0x36, - 0x3c, 0xd0, 0xa8, 0x6a, 0x54, 0x31, 0x93, 0xb2, 0xe0, 0x29, 0x33, 0x5c, 0x54, 0x31, 0xd6, 0x58, - 0x19, 0x1d, 0x49, 0x25, 0x8c, 0x20, 0xc3, 0x0c, 0x2b, 0x54, 0x3c, 0x9d, 0x5e, 0x64, 0xdc, 0xe4, - 0xab, 0xab, 0x28, 0x15, 0x65, 0xcc, 0x54, 0x26, 0xa4, 0x12, 0x2f, 0xdc, 0xe2, 0x71, 0xba, 0x8c, - 0xeb, 0x45, 0x2c, 0xaf, 0xb3, 0x98, 0x49, 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 0x76, 0x06, 0xd2, 0x21, 0x64, 0x0a, - 0x3b, 0x05, 0xd6, 0x58, 0x74, 0x86, 0xaf, 0x81, 0x6c, 0x1e, 0x65, 0x9b, 0xa7, 0x3f, 0x6f, 0x1b, - 0x90, 0x5c, 0xc0, 0x5e, 0xc1, 0xb4, 0xb9, 0x44, 0xac, 0xdc, 0xb0, 0xfd, 0x97, 0xc2, 0x6e, 0x15, - 0x16, 0x08, 0x7b, 0xee, 0xe5, 0xe3, 0x55, 0x46, 0xbe, 0x87, 0x43, 0x57, 0x6c, 0xff, 0xf5, 0xbd, - 0x7d, 0x8e, 0x3c, 0x74, 0x3a, 0xe9, 0xa2, 0xb3, 0xb7, 0x7f, 0xfc, 0xfd, 0xaf, 0x9f, 0x7a, 0x6f, - 0x92, 0xfb, 0xee, 0x49, 0xaf, 0x4f, 0x63, 0x6d, 0x14, 0xb2, 0xb2, 0xfd, 0x98, 0xde, 0x0d, 0x9e, - 0x9e, 0xbd, 0xbc, 0x39, 0x0e, 0x7e, 0xbb, 0x39, 0x0e, 0xfe, 0xbc, 0x39, 0x0e, 0x7e, 0x78, 0xef, - 0xdf, 0xfd, 0x4c, 0x69, 0xc1, 0xb1, 0x32, 0xad, 0xc8, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xc5, - 0xd7, 0xc4, 0x70, 0xf9, 0x06, 0x00, 0x00, + // 843 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0x51, 0x6f, 0x23, 0x35, + 0x10, 0x66, 0x93, 0xb4, 0x69, 0x27, 0x69, 0xae, 0x98, 0x16, 0xac, 0x08, 0x7a, 0x51, 0x54, 0xa1, + 0xe8, 0x74, 0xb7, 0x4b, 0x03, 0x48, 0xc7, 0x89, 0x97, 0x9e, 0x28, 0x02, 0xd4, 0x03, 0xb4, 0x05, + 0x24, 0x78, 0x73, 0x37, 0x73, 0x1b, 0x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ff, 0xf1, + 0xcf, 0x2f, 0x9d, 0x77, 0xc8, 0xa1, 0xfb, 0x0e, 0xca, 0x93, 0x48, 0x1b, 0x85, 0x2c, 0xaf, 0x3f, + 0xb5, 0x0f, 0x82, 0xa7, 0xa7, 0x2f, 0xaf, 0x8f, 0x82, 0xdf, 0xaf, 0x8f, 0x82, 0xbf, 0xaf, 0x8f, + 0x82, 0x9f, 0x3e, 0xfc, 0x7f, 0xbf, 0x5a, 0x92, 0x71, 0x2c, 0x4c, 0x2d, 0xf2, 0x6f, 0x00, 0x00, + 0x00, 0xff, 0xff, 0x7c, 0x9a, 0x78, 0x53, 0x35, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -843,6 +852,13 @@ func (m *ObjectSource) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + i -= len(m.OperationSyncRevision) + copy(dAtA[i:], m.OperationSyncRevision) + i = encodeVarintEvents(dAtA, i, uint64(len(m.OperationSyncRevision))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x9a i = encodeVarintEvents(dAtA, i, uint64(m.HistoryId)) i-- dAtA[i] = 0x1 @@ -1163,6 +1179,8 @@ func (m *ObjectSource) Size() (n int) { l = len(m.Cluster) n += 2 + l + sovEvents(uint64(l)) n += 2 + sovEvents(uint64(m.HistoryId)) + l = len(m.OperationSyncRevision) + n += 2 + l + sovEvents(uint64(l)) if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -2343,6 +2361,38 @@ func (m *ObjectSource) Unmarshal(dAtA []byte) error { break } } + case 19: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OperationSyncRevision", 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.OperationSyncRevision = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvents(dAtA[iNdEx:]) diff --git a/server/application/application_event_reporter.go b/server/application/application_event_reporter.go index 998a0fad64d54..3a4c8892b5e06 100644 --- a/server/application/application_event_reporter.go +++ b/server/application/application_event_reporter.go @@ -132,7 +132,7 @@ func (s *applicationEventReporter) streamApplicationEvents( desiredManifests, _, manifestGenErr := s.getDesiredManifests(ctx, parentApplicationEntity, logCtx) - revisionMetadata, _ := s.getApplicationHistoryRevisionDetails(ctx, a) + revisionMetadata, _ := s.getApplicationRevisionDetails(ctx, a, a.Status.OperationState.Operation.Sync.Revision) s.processResource(ctx, *rs, parentApplicationEntity, logCtx, ts, desiredManifests, stream, appTree, es, manifestGenErr, a, revisionMetadata, true) } else { @@ -159,7 +159,7 @@ func (s *applicationEventReporter) streamApplicationEvents( return err } - revisionMetadata, _ := s.getApplicationHistoryRevisionDetails(ctx, a) + revisionMetadata, _ := s.getApplicationRevisionDetails(ctx, a, a.Status.OperationState.Operation.Sync.Revision) // for each resource in the application get desired and actual state, // then stream the event for _, rs := range a.Status.Resources { @@ -336,9 +336,17 @@ func getApplicationLatestRevision(a *appv1.Application) string { return revision } -func (s *applicationEventReporter) getApplicationHistoryRevisionDetails(ctx context.Context, a *appv1.Application) (*appv1.RevisionMetadata, error) { - revision := getApplicationLatestRevision(a) +func getOperationRevision(a *appv1.Application) string { + revision := "" + if a.Status.OperationState != nil && a.Status.OperationState.Operation.Sync != nil { + revision = a.Status.OperationState.Operation.Sync.Revision + } + + return revision +} + +func (s *applicationEventReporter) getApplicationRevisionDetails(ctx context.Context, a *appv1.Application, revision string) (*appv1.RevisionMetadata, error) { return s.server.RevisionMetadata(ctx, &application.RevisionMetadataQuery{ Name: &a.Name, Revision: &revision, @@ -444,19 +452,20 @@ func getResourceEventPayload( } source := events.ObjectSource{ - DesiredManifest: desiredState.CompiledManifest, - ActualManifest: actualState.Manifest, - GitManifest: desiredState.RawManifest, - RepoURL: parentApplication.Status.Sync.ComparedTo.Source.RepoURL, - Path: desiredState.Path, - Revision: getApplicationLatestRevision(parentApplication), - HistoryId: getLatestAppHistoryId(parentApplication), - AppName: parentApplication.Name, - AppLabels: parentApplication.Labels, - SyncStatus: string(rs.Status), - SyncStartedAt: syncStarted, - SyncFinishedAt: syncFinished, - Cluster: parentApplication.Spec.Destination.Server, + DesiredManifest: desiredState.CompiledManifest, + ActualManifest: actualState.Manifest, + GitManifest: desiredState.RawManifest, + RepoURL: parentApplication.Status.Sync.ComparedTo.Source.RepoURL, + Path: desiredState.Path, + Revision: getApplicationLatestRevision(parentApplication), + OperationSyncRevision: getOperationRevision(parentApplication), + HistoryId: getLatestAppHistoryId(parentApplication), + AppName: parentApplication.Name, + AppLabels: parentApplication.Labels, + SyncStatus: string(rs.Status), + SyncStartedAt: syncStarted, + SyncFinishedAt: syncFinished, + Cluster: parentApplication.Spec.Destination.Server, } if revisionMetadata != nil { @@ -510,7 +519,7 @@ func (s *applicationEventReporter) getApplicationEventPayload(ctx context.Contex } if a.Status.Sync.Revision != "" || (a.Status.History != nil && len(a.Status.History) > 0) { - revisionMetadata, err := s.getApplicationHistoryRevisionDetails(ctx, a) + revisionMetadata, err := s.getApplicationRevisionDetails(ctx, a, a.Status.OperationState.Operation.Sync.Revision) if err != nil { if !strings.Contains(err.Error(), "not found") { @@ -542,23 +551,24 @@ func (s *applicationEventReporter) getApplicationEventPayload(ctx context.Contex hs := string(a.Status.Health.Status) source := &events.ObjectSource{ - DesiredManifest: "", - GitManifest: "", - ActualManifest: actualManifest, - RepoURL: a.Spec.Source.RepoURL, - CommitMessage: "", - CommitAuthor: "", - Path: "", - Revision: "", - HistoryId: 0, - AppName: "", - AppLabels: map[string]string{}, - SyncStatus: string(a.Status.Sync.Status), - SyncStartedAt: syncStarted, - SyncFinishedAt: syncFinished, - HealthStatus: &hs, - HealthMessage: &a.Status.Health.Message, - Cluster: a.Spec.Destination.Server, + DesiredManifest: "", + GitManifest: "", + ActualManifest: actualManifest, + RepoURL: a.Spec.Source.RepoURL, + CommitMessage: "", + CommitAuthor: "", + Path: "", + Revision: "", + OperationSyncRevision: "", + HistoryId: 0, + AppName: "", + AppLabels: map[string]string{}, + SyncStatus: string(a.Status.Sync.Status), + SyncStartedAt: syncStarted, + SyncFinishedAt: syncFinished, + HealthStatus: &hs, + HealthMessage: &a.Status.Health.Message, + Cluster: a.Spec.Destination.Server, } payload := events.EventPayload{ diff --git a/server/application/application_event_reporter_test.go b/server/application/application_event_reporter_test.go index 53012ec48811c..6997ffa96473b 100644 --- a/server/application/application_event_reporter_test.go +++ b/server/application/application_event_reporter_test.go @@ -71,6 +71,7 @@ func TestGetResourceEventPayload(t *testing.T) { ObjectMeta: metav1.ObjectMeta{ DeletionTimestamp: &metav1.Time{}, }, + Status: v1alpha1.ApplicationStatus{}, } rs := v1alpha1.ResourceStatus{} es := events.EventSource{} diff --git a/server/application/events.proto b/server/application/events.proto index 313e96f12e151..168427594a806 100644 --- a/server/application/events.proto +++ b/server/application/events.proto @@ -73,6 +73,7 @@ message ObjectSource { optional string healthMessage = 16; optional string cluster = 17 [(gogoproto.nullable) = false]; optional int64 historyId = 18 [(gogoproto.nullable) = false]; + optional string operationSyncRevision = 19 [(gogoproto.nullable) = false]; } /**