Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoandredinis committed Jan 14, 2025
1 parent fe9d532 commit cdbc9c0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/proto/teleport/legacy/types/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7624,7 +7624,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,
Expand Down
2 changes: 1 addition & 1 deletion api/types/types.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions lib/auth/usertasks/usertasksv1/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion lib/srv/discovery/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit cdbc9c0

Please sign in to comment.