-
Notifications
You must be signed in to change notification settings - Fork 62
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
Initial 526 form 4142 benefits intake API work #18801
base: master
Are you sure you want to change the base?
Initial 526 form 4142 benefits intake API work #18801
Conversation
Needs lots of work still
Error: A file (or its parent directories) does not have a CODEOWNERS entry. Please update the .github/CODEOWNERS file and add the entry for the Offending file: app/models/form526_ancillary_form4142_status_polling_record.rb |
Error: A file (or its parent directories) does not have a CODEOWNERS entry. Please update the .github/CODEOWNERS file and add the entry for the Offending file: app/models/form526_ancillary_form4142_status_polling_record.rb |
Error: A file (or its parent directories) does not have a CODEOWNERS entry. Please update the .github/CODEOWNERS file and add the entry for the Offending file: app/models/form526_ancillary_form4142_status_polling_record.rb |
Error: A file (or its parent directories) does not have a CODEOWNERS entry. Please update the .github/CODEOWNERS file and add the entry for the Offending file: app/models/form526_ancillary_form4142_status_polling_record.rb |
Error: A file (or its parent directories) does not have a CODEOWNERS entry. Please update the .github/CODEOWNERS file and add the entry for the Offending file: app/models/form526_ancillary_form4142_status_polling_record.rb |
Error: A file (or its parent directories) does not have a CODEOWNERS entry. Please update the .github/CODEOWNERS file and add the entry for the Offending file: app/models/form4142_status_polling_record.rb |
Error: A file (or its parent directories) does not have a CODEOWNERS entry. Please update the .github/CODEOWNERS file and add the entry for the Offending file: app/models/form4142_status_polling_record.rb |
Error: A file (or its parent directories) does not have a CODEOWNERS entry. Please update the .github/CODEOWNERS file and add the entry for the Offending file: app/models/form4142_status_polling_record.rb |
FormSubmissionAttempt.create(form_submission:) | ||
log_info[:form_submission_id] = form_submission.id | ||
end | ||
Rails.logger.info('Successful Form4142 Submission to Lighthouse', log_info) |
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 always thought it was presumptive to have this log statement positioned before the upload_doc
call.
Summary
form526_send_4142_failure_notification - existing flipper, global send emails at all killswitch
disability_526_form4142_polling_records (CentralMail::SubmitForm4142Job::POLLING_FLIPPER_KEY) - new flipper, when enabled, create a polling record with every email job queued
disability_526_form4142_polling_record_failure_email (CentralMail::SubmitForm4142Job::POLLED_FAILURE_EMAIL) - new flipper, when enabled, queue a ZSF failure notification email in the case that a polled result indicates downstream failure to deliver document
In this PR, a new feature is introduced to utilize the existing
FormSubmission
andFormSubmissionAttempt
models, which already poll benefits intake api, to track the downstream status of form 526 generated form 4142 forms. The feature also includes sending an email, when enabled, to notify the user when a polled failure occurs.This is the solution proposed by the VA stakeholders to deal with remaining silent failure situations.
Benefits and Claims team (DBEX/Carbs team), we own the maintenance of all files edited in this PR, with the exception of
app/models/form_submission_attempt.rb
andspec/models/form_submission_attempt_spec.rb
which are owned by the@department-of-veterans-affairs/platform-va-product-forms
team100% success. We will turn the flipper on to just create records at first, and then, after verification of the records and polling working, we will then enable the emailing.
Related issue(s)
department-of-veterans-affairs/va.gov-team#94144
Testing done
Document was sent to LH and it was not tracked further. Email failure was only sent if we could not get the document to Lighthouse Benefits Intake API. Now, in addition to emailing at that failure point, we also will email the same failure email in the case of Lighthouse receiving the document, and later erroring to get it further downstream.
turning on in staging
checking the database records via the rails console
confirming log messages in datadog
Done
turning on in staging
testing in staging with flippers on and off
turning on record creation in prod
checking that records and polling are created and operating as expected
checking that datadog logging and metrics are incrementing as expected
only once that is confirmed, then enable the email, via that flipper
What areas of the site does it impact?
(Describe what parts of the site are impacted andifcode touched other areas)
Should only impact backend code touched here.
Acceptance criteria
Requested Feedback
This feature makes use of 2 other teams stuff. The simple form teams FormSubmission model(s), and the Burials teams ZSF logging/statsD code. Any feedback from those teams on this use of their stuff is appreciated.