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

Feat/postman #1912

Merged
merged 3 commits into from
Aug 15, 2022
Merged

Feat/postman #1912

merged 3 commits into from
Aug 15, 2022

Conversation

gweiying
Copy link
Contributor

@gweiying gweiying commented Aug 10, 2022

Solution

Implemented Postman fallback mailer.

Notes

Postman fallback mailer will only be activated if env variable ACTIVATE_POSTMAN_FALLBACK is set to true. If not, it should still use the default SES email transport.

Tests

  • add env variables to Go-staging
  • push to edge
  • verify that non-SGMail inboxes can receive OTP from go-staging (via Postman)
  • verify that SGMail inboxes can receive OTP from go-staging (via Postman)
  • verify that non-SGMail inboxes can receive OTP from edu-staging or health-staging (via SES)
  • verify whether SGMail inboxes can receive OTP from edu-staging or health-staging (via SES)

Other todos

  • Determine if we should apply Postman fallback to health and edu environments as well

Deploy Notes

  • add env variables to prod
    • POSTMAN_API_KEY - 1Password
    • POSTMAN_API_URL - https://api.postman.gov.sg/v1/transactional/email/send
    • ACTIVATE_POSTMAN_FALLBACK - true
  • deploy to prod

@gweiying gweiying marked this pull request as ready for review August 10, 2022 16:24
@@ -39,6 +39,7 @@
"@sentry/webpack-plugin": "^1.15.1",
"@types/express-rate-limit": "^5.1.3",
"aws-sdk": "^2.1101.0",
"axios": "^0.27.2",
Copy link
Member

Choose a reason for hiding this comment

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

tech debt to address next time: the codebase currently using cross-fetch for making HTTP requests. axios might not be necessary

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Aha! Thanks for highlighting, I was poking around and couldn't find a HTTP request module.

Copy link
Member

Choose a reason for hiding this comment

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

no worries we can address this next time!

@gweiying gweiying merged commit 47549b6 into develop Aug 15, 2022
@gweiying gweiying deleted the feat/postman branch August 15, 2022 06:59
@gweiying gweiying mentioned this pull request Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants