diff --git a/api/proto/teleport/legacy/types/types.proto b/api/proto/teleport/legacy/types/types.proto index 35179685047b9..763e7f9200bb7 100644 --- a/api/proto/teleport/legacy/types/types.proto +++ b/api/proto/teleport/legacy/types/types.proto @@ -7643,7 +7643,7 @@ message IntegrationV1 { message IntegrationStatusV1 { // PendingUserTasksNotificationID contains the notification ID that indicates that this integration has unresolved user tasks. string PendingUserTasksNotificationID = 1 [(gogoproto.jsontag) = "pending_user_tasks_notification_id,omitempty"]; - // NeedsAttentionNotificationExpires contains the expiration date for the notification. + // PendingUserTasksNotificationExpires contains the expiration date for the notification. // Used to ensure new notifications' expiration is the greater between the current notification and the new one. google.protobuf.Timestamp PendingUserTasksNotificationExpires = 2 [ (gogoproto.stdtime) = true, diff --git a/api/types/types.pb.go b/api/types/types.pb.go index 920a37ad6d227..87cea987cc512 100644 --- a/api/types/types.pb.go +++ b/api/types/types.pb.go @@ -20357,7 +20357,7 @@ var xxx_messageInfo_IntegrationV1 proto.InternalMessageInfo type IntegrationStatusV1 struct { // PendingUserTasksNotificationID contains the notification ID that indicates that this integration has unresolved user tasks. PendingUserTasksNotificationID string `protobuf:"bytes,1,opt,name=PendingUserTasksNotificationID,proto3" json:"pending_user_tasks_notification_id,omitempty"` - // NeedsAttentionNotificationExpires contains the expiration date for the notification. + // PendingUserTasksNotificationExpires contains the expiration date for the notification. // Used to ensure new notifications' expiration is the greater between the current notification and the new one. PendingUserTasksNotificationExpires *time.Time `protobuf:"bytes,2,opt,name=PendingUserTasksNotificationExpires,proto3,stdtime" json:"pending_user_tasks_notification_expires,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` diff --git a/lib/auth/usertasks/usertasksv1/service.go b/lib/auth/usertasks/usertasksv1/service.go index 94658aa24453d..a5c0aca198fa1 100644 --- a/lib/auth/usertasks/usertasksv1/service.go +++ b/lib/auth/usertasks/usertasksv1/service.go @@ -475,8 +475,7 @@ func (s *Service) notifyUserAboutPendingTask(ctx context.Context, ut *usertasksv return trace.Wrap(err) } integrationStatus := integration.GetStatus() - existingNotification := integrationStatus.PendingUserTasksNotificationID - if existingNotification != "" { + if integrationStatus.PendingUserTasksNotificationID != "" { if err := s.backend.DeleteGlobalNotification(ctx, integrationStatus.PendingUserTasksNotificationID); err != nil { // NotFound might be returned when the GlobalNotification already expired or was deleted. if !trace.IsNotFound(err) { diff --git a/lib/srv/discovery/status.go b/lib/srv/discovery/status.go index 2ed3724169aab..8697fcb3ce169 100644 --- a/lib/srv/discovery/status.go +++ b/lib/srv/discovery/status.go @@ -547,7 +547,7 @@ func (s *Server) acquireSemaphore(kind, semaphoreName string) (releaseFn func(), // acquireSemaphoreForIntegration tries to acquire a semaphore lock for the integration. // This allows the process to do two things: -// - merge the current UserTask with the one stored in the backend, so that no discover-ec2.instance is lost +// - merge the current UserTask with the one stored in the backend, so that no task items are lost // - ensure a single Notification (pending-user-task-integration) is created // The former could be achieved using the UserTask name as lock identifier. // However, for the latter, we would need a lock for the Integration.