-
Notifications
You must be signed in to change notification settings - Fork 66
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
PR #4 for silent failure work - Add lighthouse files and changes for uploading a document #20453
base: master
Are you sure you want to change the base?
Conversation
Generated by 🚫 Danger |
Summary
This pr is the third pr to merge some of the work from #20105. The first pr that included the db changes was previously merged #20318. The second pr that added the model, factory, constants, helpers and vcr cassettes was also previously merged #20346. The third pr added evss files and changes for
This pr does the following:
lib/lighthouse/benefits_documents/service.rb
so that we add to the evidence_submission table when the ffcst_send_evidence_submission_failure_emails
is enabled. Also use the helpers and constants.app/sidekiq/lighthouse/document_upload.rb
and replaced it withapp/sidekiq/lighthouse/evidence_submissions/document_upload.rb
app/sidekiq/lighthouse/evidence_submissions/document_upload.rb
to replaceapp/sidekiq/lighthouse/document_upload.rb
so that it is in its own folder. Also updated the evidence_submission table when the ffcst_send_evidence_submission_failure_emails
is enabled. Also use the helpers and constants. Updated logic to pass in personalization with an obscured file name.app/sidekiq/lighthouse/failure_notification.rb
to expect a personalization object instead of first_name, filename, date_submitted, and date_failedmodules/mobile/spec/requests/mobile/v0/claim/documents_spec.rb
moved variables around, added user_account so tests passed, and updated logic so that it had the flippercst_send_evidence_submission_failure_emails
enabled and disabled for all tests.spec/lib/lighthouse/benefits_documents/service_spec.rb
spec/sidekiq/lighthouse/evidence_submissions/document_upload_spec.rb
spec/sidekiq/lighthouse/failure_notification_spec.rb
Related issue(s)
Testing done
Describe what the old behavior was prior to the change
Information for how to add va-notify to settings.local.yaml -> here
How to test that feature flag works when ffs are disabled and we upload a file successfully
benefits_documents_use_lighthouse
is enabledcst_synchronous_evidence_uploads
is disabledcst_send_evidence_failure_emails
can be disabled or enabledcst_send_evidence_submission_failure_emails
is disabledsettings.local.yml
has a vanotify sectionlib/lighthouse/benefits_claims/service.rb
with an icn of a user in staging EX:@icn = '1012830712V627751' # icn for user 19
lib/lighthouse/benefits_documents/configuration.rb
to the participantId of the staging user that you are using ( you can get this from argo or ask someone with argo access to get this for you) EX:participantId: 600_073_191,
How to test that feature flag works when ffs are disabled and we upload a file and get an error, causing an email to be sent
benefits_documents_use_lighthouse
is enabledcst_synchronous_evidence_uploads
is disabledcst_send_evidence_failure_emails
is enabledcst_send_evidence_submission_failure_emails
is disabledsettings.local.yml
has a vanotify sectionlib/lighthouse/benefits_claims/service.rb
with an icn of a user in staging EX:@icn = '1012830712V627751' # icn for user 19
notify_client.send_email()
we replacerecipient_identifier: { id_value: icn, id_type: 'ICN' }
withemail_address: 'YOUR_EMAIL',
lib/lighthouse/benefits_documents/configuration.rb
to the participantId is not being set to a specific staging user (only needed if you were testing previous scenario) --> this is how we will generate an errorHow to test that feature flag works when ffs are enabled and we upload a file successfully
benefits_documents_use_lighthouse
is enabledcst_synchronous_evidence_uploads
is disabledcst_send_evidence_failure_emails
can be disabled or enabledcst_send_evidence_submission_failure_emails
is enabledsettings.local.yml
has a vanotify sectionlib/lighthouse/benefits_claims/service.rb
with an icn of a user in staging EX:@icn = '1012830712V627751' # icn for user 19
lib/lighthouse/benefits_documents/configuration.rb
to the participantId of the staging user that you are using ( you can get this from argo or ask someone with argo access to get this for you) EX:participantId: 600_073_191,
How to test that feature flag works when ffs are enabled and we upload a file and get an error, causing an email to be sent
benefits_documents_use_lighthouse
is enabledcst_synchronous_evidence_uploads
is disabledcst_send_evidence_failure_emails
can be disabled or enabledcst_send_evidence_submission_failure_emails
is enabledsettings.local.yml
has a vanotify sectionlib/lighthouse/benefits_claims/service.rb
with an icn of a user in staging EX:@icn = '1012830712V627751' # icn for user 19
lib/lighthouse/benefits_documents/configuration.rb
to the participantId is not being set to a specific staging user (only needed if you were testing previous scenario) --> this is how we will generate an errornotify_client.send_email()
is called we replacerecipient_identifier: { id_value: icn, id_type: 'ICN' }
withemail_address: 'YOUR_EMAIL',
)Screenshots
Test that feature flag works when
benefits_documents_use_lighthouse
is enabled,cst_synchronous_evidence_uploads
is disabled,cst_send_evidence_failure_emails
is enabled or disabled, andcst_send_evidence_submission_failure_emails
is disabled. When you upload a file, no evidence submission record is added and file is successfully uploaded:Test that feature flag works when
benefits_documents_use_lighthouse
is enabled,cst_send_evidence_failure_emails
is enabled,cst_synchronous_evidence_uploads
is disabled, and cst_send_evidence_submission_failure_emails is disabled. When you upload a file and an error occurs, no evidence submission record is added and an email is sent for failed upload:Test that feature flag works when
benefits_documents_use_lighthouse
is enabled,cst_synchronous_evidence_uploads
is disabled,cst_send_evidence_failure_emails
is disabled or enabled, andcst_send_evidence_submission_failure_emails
is enabled. When you upload a file, no evidence submission record is added and file is successfully uploaded:Test that feature flag works when
benefits_documents_use_lighthouse
is enabled,cst_send_evidence_failure_emails
is enabled or disabled,cst_synchronous_evidence_uploads
is disabled, and cst_send_evidence_submission_failure_emails is enabled. When you upload a file, an evidence submission record is added and updated (it will have a FAILED upload_status and a failed_date) and no email is sent for failed upload (NOTE: an email will eventually be sent when the polling job runs)What areas of the site does it impact?
Claim Status Tool
Acceptance criteria
Requested Feedback
(OPTIONAL)What should the reviewers know in addition to the above. Is there anything specific you wish the reviewer to assist with. Do you have any concerns with this PR, why?