diff --git a/api/proto/teleport/legacy/types/types.proto b/api/proto/teleport/legacy/types/types.proto index a8f4202f623d0..c3778f85c394a 100644 --- a/api/proto/teleport/legacy/types/types.proto +++ b/api/proto/teleport/legacy/types/types.proto @@ -7613,7 +7613,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 d970acbe22d3e..7256dbe59b4e3 100644 --- a/api/types/types.pb.go +++ b/api/types/types.pb.go @@ -20312,7 +20312,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 a614294079e6d..4f1e8e462b121 100644 --- a/lib/auth/usertasks/usertasksv1/service.go +++ b/lib/auth/usertasks/usertasksv1/service.go @@ -468,8 +468,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 05e0263452fa5..ce4a4d1feb08d 100644 --- a/lib/srv/discovery/status.go +++ b/lib/srv/discovery/status.go @@ -538,7 +538,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.