Release 4.30.2 - fix AWS endpoint and /emailnotifications log group #78
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
In the current release, logs from our
/emailnotifications
endpoint are going to the main log group instead of the custom log groupformsg-email-notifications-production
. This means that our bounce alarms are on the wrong log group, and email logs are being stored for a year instead of a week as intended.An extra trailing
/
was introduced to the AWS endpoint during the TypeScript migration, breaking all image, logo and attachment uploads and downloads.Solution
The problem was that during the TypeScript migration for
src/config/logger
, the AWS and CloudWatch environment variables were modified to be imported fromconfig
instead of taken directly fromprocess.env
. This caused them to be undefined becauseconfig
depends onlogger
, resulting in a circular dependency. The solution is to get the env vars directly fromprocess.env
instead of importing them fromconfig
.Removing the trailing
/
.