Skip to content

Commit

Permalink
Merge remote-tracking branch 'flyteadmin/debug-b64' into monorepo-mov…
Browse files Browse the repository at this point in the history
…e/flyteadmin/debug-b64
  • Loading branch information
eapolinario committed Oct 3, 2023
2 parents d9586b0 + 66e194d commit 24af41d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
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
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

0 comments on commit 24af41d

Please sign in to comment.