Closed stevelong00 closed 2 months ago
PR is approved and merged. There is follow-up work. The Prod feature flag in this PR is set to False, meaning it is off and using the default code in Prod. Will hold this ticket open for QA testing.
PR approved and merged after the revert earlier this week. Currently deployed to Perf. Will begin manual testing for edge cases next week.
Edge cases so far:
Test case failures:
I went back to the original tickets for the explicit send feature and don't really see any other edge cases.
Kyle and Evan have been working on a fix for the 'stuck in created' issue, expect to see a PR 'soon'. They are also looking at that deceased veteran hard bounce vs delivered issue.
A fix is up. That fix has been deployed to Perf and Staging PERF: Feature flag is enabled | True STAGING: Feature flag is disabled | False
Now have a known good deceased PID for perf/staging, will test with that one.
will retest things Tuesday morning.
QA PASSED
PERF - ENABLED Has feature flag set to True (enabled, will use V3) Callback: /internal/qa-staging-automation-callback Both sms and email tested
delivered
has no status_reasonpreferences-declined
where recipient has opted-out of a notification has status_reason 'Contact preferences set to false'preferences-declined
where recipient has not set a preference for notifications has status_reason 'No recipient opt-in found for explicit preference'STAGING - DISABLED Has feature flag set to False (disabled, does not use V3) Callback: /internal/qa-staging-automation-callback Both sms and email tested
delivered
has no status_reasonpreferences-declined
where recipient has opted-out of a notification has status_reason 'Contact preferences set to false'preferences-declined
where recipient has not set a preference for notifications has status_reason 'No recipient opt-in found for explicit preference'Thanks for the update, Cris.
Can you help me understand how to reproduce these errors, and maybe write tests against the functionality? Are there any tests in the repo that I can look at, which we have not covered in the v3 functionality?
Oh! The checkboxes are filled in now! Maybe I spoke too soon?
@AdamKing0126 you can refer to the PR hotfix that Evan and Kyle worked on and discuss with Evan if you have any questions.
PR has been merged.
This is going straight up to Prod. Closing ticket.
User Story - Business Need
Companion Ticket from VA-IIR Team
Currently we have two celery tasks, one for looking up contact info and one for looking up communication permissions. We want to move the permissions check into the contact info lookup so that both can use a single call to Profile API.
User Story(ies)
As a software developer working on the
notifications-api
repository I want to integrate permission check into contact info lookup So that I can both can use a single call to Profile APIAdditional Info and Resources
Parent spike with details in the comments
Profile API Notes
Currently we have two celery tasks, contact_information_tasks.py and lookup_recipient_communication_permissions_task.py.
We want to combine these into a single task, which makes a single call to Profile API. The simplest way to do this is to integrate the permission check into the contact info lookup, so that contact info is returned only when it both exists and has permissions enabled.
Acceptance Criteria
[ ] In the VAProfileClient class, create a new method
get_contact_info_with_permission
. This makes a single call to the Profile API v3 to fetch email, phone, and permissions. If permissions are not granted for the requested email or phone number, a new exception should be raised indicating that permissions were denied.[ ] In the lookup_contact_info celery task
COMBINE_CONTACT_INFO_AND_PERMISSIONS_LOOKUP
flag is enabled, replace calls toget_email
orget_telephone
with calls toget_contact_info_with_permission
[ ] In process_notifications.py, when the
COMBINE_CONTACT_INFO_AND_PERMISSIONS_LOOKUP
flag is enabled, bypass both places where thelookup_recipient_communication_permissions
task is insertedQA Considerations
All business logic should be the same as before. The only difference with these changes should be that the permission check now happens within the same task as the phone or email lookup.
Potential Dependencies
Out of Scope