department-of-veterans-affairs / va.gov-team

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
281 stars 201 forks source link

EVSS PCIU Migration: Remove calls to PCIU in global Pre-fill #73776

Open sethdarragile6 opened 8 months ago

sethdarragile6 commented 8 months ago

Issue Description

To prepare for the eventual sunsetting of EVSS, all calls to PCIU must eventually be removed from vets-api. During the course of discovery for Form526ez, it was discovered that calls to PCIU were being made in the FormProfile base-class related to the Pre-fill functionality- specifically to gather phone and email information. While Form526ez and many other forms intentionally use it in combination with their own derived Pre-fill classes, further digging through vets-api and in DataDog revealed that essentially every form in the system was calling out to PCIU. Either way, it became apparent that the scope of the problem was beyond just Form526ez.

The good news is that the base-class pre-fill is already calling out to VA Profile, which is widely considered the best one-stop source of all contact information within the VA. The specific reason we call out to PCIU here at all remains a mystery, although the best educated guess so far suggests that it may have to do with a potential lag between the time that the user enters/updates information and the time when it becomes available in VA Profile. In other words, if a user just updated their information and went straight to an application that uses Pre-fill, that information might not prefill in that application's form. This is just speculation, however, and there's a chance that if it WAS a problem when they added the PCIU calls 4-6 years ago, that latency might not be an issue anymore.

A potential strategy for the Platform Team (who likely owns this code) or whoever is tagged to implement/orchestrate the change):

  1. Use a flipper flag to gate the removal of the base-class PCIU calls
  2. Deploy to Production/Staging with the flipper flag off (for Prod) and on (for Staging)
  3. Put out a request to all teams (especially those intentionally using it) to test the change in Staging
  4. When all teams have tested and signed off on it, turn the flag on in Production
  5. After a time of verification, remove the flag along with the PCIU calls

Acceptance Criteria

Related Docs

OCTO Objectives:

Objective: This aligns with O2: Our platforms are the best way to deliver products at VA OKR This aligns with OKR1: Our platforms hit the "elite" level (as defined by DORA) on Deployment Frequency, Lead Time for Changes, Change Failure Rate, and Time to Restore Service.

Previous Epic

Future Initiative

### Tasks
- [ ] https://github.com/department-of-veterans-affairs/va.gov-team/issues/74982
- [ ] https://github.com/department-of-veterans-affairs/va.gov-team/issues/74590
- [ ] https://github.com/department-of-veterans-affairs/va.gov-team/issues/74977
- [ ] https://github.com/department-of-veterans-affairs/va.gov-team/issues/74971
- [ ] https://github.com/department-of-veterans-affairs/va.gov-team/issues/74594
- [ ] https://github.com/department-of-veterans-affairs/va.gov-team/issues/74972
- [ ] https://github.com/department-of-veterans-affairs/va.gov-team/issues/74978
- [ ] https://github.com/department-of-veterans-affairs/va.gov-team/issues/74974
- [ ] https://github.com/department-of-veterans-affairs/va.gov-team/issues/74973
- [ ] https://github.com/department-of-veterans-affairs/va.gov-team/issues/78835
- [ ] https://github.com/department-of-veterans-affairs/va.gov-team/issues/76169
- [ ] https://github.com/department-of-veterans-affairs/va.gov-team/issues/74975
- [ ] https://github.com/department-of-veterans-affairs/va.gov-team/issues/81493
- [ ] https://github.com/department-of-veterans-affairs/va.gov-team/issues/91490
- [ ] https://github.com/department-of-veterans-affairs/va.gov-team/issues/93445
- [ ] https://github.com/department-of-veterans-affairs/va.gov-team/issues/81364
- [ ] https://github.com/department-of-veterans-affairs/va.gov-team/issues/76170
- [ ] https://github.com/department-of-veterans-affairs/va.gov-team/issues/76168
- [ ] https://github.com/department-of-veterans-affairs/va.gov-team/issues/79050
- [ ] https://github.com/department-of-veterans-affairs/va.gov-team/issues/74980
- [ ] https://github.com/department-of-veterans-affairs/va.gov-team/issues/91697
- [ ] https://github.com/department-of-veterans-affairs/va.gov-team/issues/76166
- [ ] https://github.com/department-of-veterans-affairs/va.gov-team/issues/76175
- [ ] https://github.com/department-of-veterans-affairs/va.gov-team/issues/79044
- [ ] https://github.com/department-of-veterans-affairs/va.gov-team/issues/76167
- [ ] https://github.com/department-of-veterans-affairs/va.gov-team/issues/78839
- [ ] https://github.com/department-of-veterans-affairs/va.gov-team/issues/74592
- [ ] https://github.com/department-of-veterans-affairs/va.gov-team/issues/93444
- [ ] https://github.com/department-of-veterans-affairs/va.gov-team/issues/93453
- [ ] https://github.com/department-of-veterans-affairs/va.gov-team/issues/90980
rmtolmach commented 8 months ago

Prefill for contact_information is used in most of the forms. For example in config/form_profile_mappings/10-10EZR.yml

homePhone: [contact_information, us_phone]
veteranAddress: [contact_information, address]
email: [contact_information, email]

contact_information is initialized in form_profile.rb

  def initialize_contact_information
    opt = {}
    opt.merge!(vets360_contact_info_hash) if vet360_contact_info

    opt[:address] ||= user_address_hash

    opt[:email] ||= extract_pciu_data(:pciu_email)
    if opt[:home_phone].nil?
      opt[:home_phone] = pciu_primary_phone
      opt[:us_phone] = pciu_us_phone
    end
...

vets-api has been getting contact information from VA Profile for a few years now, so that's good /lib/va_profile/contact_information.

LindseySaari commented 8 months ago

We will want some other tickets for

  1. Discovery around the EVSS integrations in Vets API - 74971
  2. Define ownership for Integrations - 74972
  3. Review VA Profile API docs to map EVSS data to VA Profile - 74973
  4. Write/use service class to call VA Profile - 74974
  5. Identify test users - 74975
  6. Identify forms to test this against - 74978
  7. Testing on a review instance - 74977
  8. Re-record cassettes - 74980
  9. Update test suite - 74982
jennb33 commented 6 months ago

Per @RachalCassity, she has been working with Seth Darr. PCIU calls have been removed and implementation has been held up. Disability Benefits team is focused on the the 526 form, and it doesn't appear that we are overlapping.

jennb33 commented 3 months ago

Messaged @sethdarragile6 via Slack on 6/6/2024 to see if there is a sunsetting date for EVSS.