vets-api
vets-api copied to clipboard
Implement with_tracking block in Form526DocumentUploadFailureEmail
This mailer job was initially implemented (by me) without properly using the rather obtuse Job Tracking module in lib/sidekiq/form526_job_status_tracker/job_tracker.rb
. Adds this behavior as there were some failures in testing this mailer in staging that were throwing in the job tracker and obscuring actual errors that need to be surfaced.
In addition, it was required to refactor these tests to use perform_async
and described_class.drain
, as calling perform on these jobs doesn't appear to create a job id (jid
is the available var in Sidekiq callbacks) and the Job Tracker relies on this for a lot of its logging paradigm. In the wild, these jobs will be executed with perform_async
anyway.
Summary
- *This work is behind a feature toggle (flipper): No, but the mailer is
- (Which team do you work for, does your team own the maintenance of this component?) Benefits and Disabilities
Related issue(s)
N/A
Testing done
- [X] New code is covered by unit tests N/A. for more information on this mailer see the original PR
Screenshots
Note: Optional
What areas of the site does it impact?
(Describe what parts of the site are impacted andifcode touched other areas)
Acceptance criteria
- [X] I fixed|updated|added unit tests and integration tests for each feature (if applicable).
- [X] No error nor warning in the console.
- [X] Events are being sent to the appropriate logging solution
- [ ] Documentation has been updated (link to documentation) N/A
- [X] No sensitive information (i.e. PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs
- [ ] Feature/bug has a monitor built into Datadog or Grafana (if applicable)
- [ ] If app impacted requires authentication, did you login to a local build and verify all authenticated routes work as expected
- [ ] I added a screenshot of the developed feature
Requested Feedback
N/A