Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix: add To header to emailsender emails #1999

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

johannes94
Copy link
Contributor

@johannes94 johannes94 commented Aug 26, 2024

Description

This PR fixes emailsender to set the "To" header of emails sent. The header is explicitly not set by the acscsEmail integration to allow emailsender to append. But that part was forgotten during initial implementation.

This led to emails being send but email clients would show an empty To header.

Checklist (Definition of Done)

  • Unit and integration tests added
  • Added test description under Test manual
  • Documentation added if necessary (i.e. changes to dev setup, test execution, ...)
  • CI and all relevant tests are passing
  • Add the ticket number to the PR title if available, i.e. ROX-12345: ...
  • Discussed security and business related topics privately. Will move any security and business related topics that arise to private communication channel.
  • Add secret to app-interface Vault or Secrets Manager if necessary
  • RDS changes were e2e tested manually
  • Check AWS limits are reasonable for changes provisioning new resources
  • (If applicable) Changes to the dp-terraform Helm values have been reflected in the addon on integration environment

Test manual

make db/teardown db/setup

#Login to ocm and AWS dev account before running this

make run/emailsender

curl localhost:8080/api/v1/acscsemail -v -XPOST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $(ocm token)" \
--data-raw '{"to":["[email protected]"], "rawMessage":"dGVzdCBtZXNzYWdlIGNvbnRlbnQ="}'

# Verify
# 1. Status code is successful and you receive the email
# 2. From and To headers are set like expected

Copy link
Member

@kurlov kurlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

Copy link
Contributor

openshift-ci bot commented Aug 26, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: johannes94, kurlov

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@johannes94
Copy link
Contributor Author

/retest

@johannes94 johannes94 merged commit 6c007c7 into main Aug 27, 2024
7 checks passed
@johannes94 johannes94 deleted the jmalsam/fix-to-field-emailsender branch August 27, 2024 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants