department-of-veterans-affairs / notification-api

Notification API
MIT License
16 stars 9 forks source link

Send email on successful 526ez submission #45

Closed anushyaprasad closed 4 years ago

anushyaprasad commented 4 years ago

As a veteran when submitting disability compensation form I want to receive email confirmation of my submission So that I have a record of the submission with reference number.

Checklist:

To revisit:

Assumption:

Open questions:

Additional useful context:

app/controllers/v0/disability_compensation_forms_controller.rb is the controller used when a veteran is logged into VA.gov and wants to submit a claim. This is the code that our contract deals with . modules/claims_api/app/controllers/claims_api/v1/forms/disability_compensation_controller.rb is the api called by a VSO working to submit a claim on behalf of a veteran. This code is written by the Lighthouse team (separate contract).

Learnings:

ffafara-tw commented 4 years ago

An example of sidekiq job that sends emails: app/workers/direct_deposit_email_job.rb

Used here: app/controllers/v0/ppiu_controller.rb#send_confirmation_email

QaysarA commented 4 years ago

We should discuss the scenarios that trigger the submission email on va.gov (I found some documentation around two success confirmation messages and other error messages - but not sure if they are still applicable)

ffafara-tw commented 4 years ago

UI polling logic is here: vets-website/src/applications/disability-benefits/526EZ/components/ConfirmationPoll.jsx Confirmation page: vets-website/src/applications/disability-benefits/526EZ/containers/ConfirmationPage.jsx

philherbert commented 4 years ago

Taylor Skinner has added configuration for VANotify to the fwdproxy in this commit https://github.com/department-of-veterans-affairs/devops/commit/b36345add9d58148aaf0c5dfb388e4a642717cd0#diff-f2be7bb8d7e38cd735cc6f4af56d0e24

philherbert commented 4 years ago

A recap of the current issues:

  1. send_form526_confirmation_email fails because of a JSON parsing error:

    2020-06-23 20:10:50.225655 W [20:47342534670460] Sidekiq -- TypeError: no implicit conversion of nil into String
    2020-06-23 20:10:50.225673 W [20:47342534670460] Sidekiq -- /usr/local/bundle/gems/json-2.3.0/lib/json/common.rb:156:in `initialize'
    /usr/local/bundle/gems/json-2.3.0/lib/json/common.rb:156:in `new'
    /usr/local/bundle/gems/json-2.3.0/lib/json/common.rb:156:in `parse'
    /srv/vets-api/src/app/models/form526_submission.rb:154:in `send_form526_confirmation_email'
    /srv/vets-api/src/app/models/form526_submission.rb:128:in `workflow_complete_handler'
    /usr/local/bundle/gems/sidekiq-pro-5.0.0/lib/sidekiq/batch/callback.rb:37:in `execute_callback'

    We're going to do some more digging into this tomorrow, because the form_json is definitely present in the database.

  2. Form526ConfirmationEmailJob.perform_async fails because of an issue with OpenSSL - the configuration for the review instance has a client_url that starts with https, which the instance can't access. Raised department-of-veterans-affairs/devops#7159 to fix.

philherbert commented 4 years ago

PR department-of-veterans-affairs/vets-api#4426 requested review!

philherbert commented 4 years ago

Waiting on review from Anna, we'll give it a day and then move it

lingtran commented 4 years ago

Awaiting verification of feature success in dev environment. We currently can't seem to successfully submit a claim. Started a thread in platform support seeking help. https://dsva.slack.com/archives/CBU0KDSB1/p1593456555482200

marisahoenig commented 4 years ago

Staging configuration and staging API key (pointing to our dev environment) has been added, so now, we should be able to test in the vets-api staging environment (after we turn the flipper on!).

marisahoenig commented 4 years ago

Issues we're currently having: review instance here

  1. When we added the new load balancers, we did not include the port :80 in the service addresses, so we added these in, merged the PR, and it should be deployed momentarily.

    • The error we saw was service unavailable (503) for the review instance.
    • Tested with email vets.gov.user+15@gmail.com
  2. In review instance, we received an error for certain users that reached max EP codes. We think we need to reset the counts for those users.

    • Slack thread in #evss-prod: https://dsva.slack.com/archives/C8R3JS8BU/p1593635695339100
    • We need to make sure we have an account that works for the demo (like vets.gov.user+15@gmail.com)
    • Update: We contacted Raparthi, Mahesh (CSRA) <Mahesh.Raparthi@va.gov> from the EVSS Test Team to clear the EP codes for users 226, 228, and 229. We sent the users, email, and the SSNs for the sample users, to get the PIFs cleared. We asked what the threshold is for max EP codes and are awaiting a response.
  3. We are testing form526 submission confirmation email in staging by submitting the form through the UI and are receiving an error that we did not see when testing in our review instance: uninitialized constant Form526ConfirmationEmailJob Did you mean? FormContactInformation.

Notes:

ffafara-tw commented 4 years ago

Shall we also try these users: https://github.com/department-of-veterans-affairs/va.gov-team-sensitive/blob/master/Administrative/vagov-users/staging-test-accounts-claims.md

marisahoenig commented 4 years ago

Created new tech task for getting dev environment to work: https://github.com/department-of-veterans-affairs/notification-api/issues/109