CR: Update interactions-update job for multi-recipient delivery proof and deploy via CD
- Dominant language
- Python
- Stars
- 2
- Forks
- 22
- Avg merge
- 2d 35m
- Merged PRs (30d)
- 11
Description
### Description
We want to persist proof of email delivery from GC Notify in our database. GC Notify service has an API that provides the status of emails within 7 days of the request. The STRR codebase currently includes an `interactions_update` job but it needs to be modified and deployed.
Recipient splitting is already implemented in `strr-api/src/strr_api/services/interaction.py` -- comma-separated recipients => one notify-api POST each; primary notify_reference + meta_data.notify_references
- Confirm notify-api `GET /notify/{id}` fields against [GC Notify email status](https://documentation.notification.canada.ca/en/status.html#email-status) (`status`, `status_description`, `provider_response`, `email_address`, `completed_at`, failure types).
- Poll **all** notify refs: `notify_reference` + `meta_data.notify_references` / `notify_response.ids` (`[job.py](jobs/interactions-update/src/interactions_update/job.py)`).
- Store structured metadata per recipient (status, failure reason, provider ref, timestamps).
### Pre requisites
- Ensure that interactions table in the database is being populated on every email delivery. ([#1655](https://github.com/bcgov/STRR/issues/1655))
### Acceptance criteria
- Job updates every notify ref from recipient splitting, not only the primary column.
- Failure statuses/reasons are stored for reporting.
- CD workflow deploys job to target environments.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.