Skip to content

fix(sqs): log itn event messageid correctly #684

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Sep 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/monitor/sqsevent/sqs-monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ func (m SQSMonitor) processInterruptionEvents(interruptionEventWrappers []Interr
}

if failedInterruptionEventsCount != 0 {
return fmt.Errorf("some interruption events for message Id %b could not be processed", message.MessageId)
return fmt.Errorf("some interruption events for message Id %s could not be processed", *message.MessageId)
}

return nil
Expand Down
3 changes: 2 additions & 1 deletion pkg/monitor/sqsevent/sqs-monitor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,8 @@ func getSQSMessageFromEvent(event sqsevent.EventBridgeEvent) (sqs.Message, error
return sqs.Message{}, err
}
eventStr := string(eventBytes)
return sqs.Message{Body: &eventStr}, nil
messageId := "d7de6634-f672-ce5c-d87e-ae0b1b5b2510"
return sqs.Message{Body: &eventStr, MessageId: &messageId}, nil
}

func mockIsManagedTrue(asg *h.MockedASG) h.MockedASG {
Expand Down