Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Debug b64 issue #614

Closed
wants to merge 1 commit into from
Closed
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
1 change: 1 addition & 0 deletions pkg/async/notifications/implementations/aws_emailer.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ func FlyteEmailToSesEmailInput(email admin.EmailMessage) ses.SendEmailInput {
}

func (e *AwsEmailer) SendEmail(ctx context.Context, email admin.EmailMessage) error {
logger.Infof(ctx, "debugb64 Sending email %v", email.Body)
emailInput := FlyteEmailToSesEmailInput(email)
_, err := e.awsEmail.SendEmail(&emailInput)
e.systemMetrics.SendTotal.Inc()
Expand Down
5 changes: 5 additions & 0 deletions pkg/async/notifications/implementations/aws_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,12 @@ func (p *Processor) run() error {
var emailMessage admin.EmailMessage
var err error
for msg := range p.sub.Start() {
ctx := context.Background()

p.systemMetrics.MessageTotal.Inc()
// Currently this is safe because Gizmo takes a string and casts it to a byte array.
stringMsg := string(msg.Message())
logger.Infof(ctx, "debugb64 Original stringMsg [%v]", stringMsg)

var snsJSONFormat map[string]interface{}

Expand All @@ -53,6 +56,7 @@ func (p *Processor) run() error {
p.markMessageDone(msg)
continue
}
logger.Infof(ctx, "debugb64 snsJSONFormat [%v]", snsJSONFormat)

var value interface{}
var ok bool
Expand Down Expand Up @@ -81,6 +85,7 @@ func (p *Processor) run() error {
p.markMessageDone(msg)
continue
}
logger.Infof(ctx, "debugb64 Decoded valueString [%v] to [%v]", valueString, notificationBytes)

if err = proto.Unmarshal(notificationBytes, &emailMessage); err != nil {
logger.Debugf(context.Background(), "failed to unmarshal to notification object from decoded string[%s] from message [%s] with err: %v", valueString, stringMsg, err)
Expand Down