-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add feedback_reason
column to the notification table
#2443
base: main
Are you sure you want to change the base?
Conversation
- Added new notification_status: pinpoint-failure - Added pinpoint-failure to various enum-like variables
@@ -1548,6 +1548,7 @@ def check_code(self, cde): | |||
NOTIFICATION_TECHNICAL_FAILURE = "technical-failure" | |||
NOTIFICATION_TEMPORARY_FAILURE = "temporary-failure" | |||
NOTIFICATION_PERMANENT_FAILURE = "permanent-failure" | |||
NOTIFICATION_PINPOINT_FAILURE = "pinpoint-failure" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's name the status to untie from a specific technology. We could go back to AWS SES or we could support Twilio as well and other providers. Is there a way to name this without depending on the implementation (and extend the model on an abstract name)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently all the failures are SES related. This is now Piinpoint related and we wanted to store that and make it obv. I think as we grow and add more providers/ clients/ - we should add failures according to those implementations so we might know exactly where the failure came from and not have to traceback through logs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with not tying statuses to functionality or vendor specific terminology. That said, properly achieving vendor agnostic terminology for statuses, while still improving observability would take some effort.
Since we're handling a conflict between a Request - send to intl. #
, and the configuration of the target provider resource - pinpoint not configured for intl. sending
, we could use something more generic like:
PROVIDER_FAILURE
PROVIDER_CONFLICT_FAILURE
PROVIDER_VALIDATION_FAILURE
Then capture the vendor specific info + failure reason in the feedback_reason
. To Jumana's point - the current solution does provide added observability while requiring minimal changes to existing infrastructure for the time being.
Summary | Résumé
This PR adds a new column,
feedback_reason
, to the notifications table. It will be leveraged to track more granular reasons why a notification fails. It also adds a new notification_statuspinpoint-failure
.E.g. boto validates that the requested resource on AWS can handle the request being made through it. Since we disabled international sending in Pinpoint boto will throw an exception.
Related context that led to this decision
Test instructions | Instructions pour tester la modification
flask db upgrade
andflask db downgrade
work locallyRelease Instructions | Instructions pour le déploiement
None.
Reviewer checklist | Liste de vérification du réviseur