-
Notifications
You must be signed in to change notification settings - Fork 63
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
Add logging for submit 0781 job exhaustion #19433
base: master
Are you sure you want to change the base?
Conversation
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.
Small style comments but they aren't important feel free to merge
{ | ||
'jid' => form526_job_status.job_id, | ||
'error_class' => 'Broken Job Error', | ||
'error_message' => 'Your Job Broke', |
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.
lol
|
||
context 'for a Lighthouse upload' do | ||
it 'logs the job failure' do | ||
Flipper.enable(:disability_compensation_upload_0781_to_lighthouse) |
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.
Totally optional style not but I like these in a before block under the context block, as it sets up all the tests for this context and if we add more it will make that easier. Super nitpicky though
Flipper.enable(:disability_compensation_use_api_provider_for_0781_uploads) | ||
end | ||
|
||
let(:sidekiq_job_exhaustion_errors) do |
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.
Also a nit, this is more like sidekiq_job_exhaustion_arguments
or something like that hmm I don't have a better name but since it has the job id and job args its more like metadata
if Flipper.enabled?(:disability_compensation_use_api_provider_for_0781_uploads) | ||
submission = Form526Submission.find(form526_submission_id) | ||
|
||
provider = api_upload_provider(submission, FORM_ID_0781) |
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.
Bahhh that's right we don't know which form actually failed here (0781 or 0781a) but since we're logging the same metric regardless and logging the actual error below it doesn't matter, so I think this is totally fine
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.
Yeah, that was my thinking as well. If we need to dig into the error more, we can find the form type on the submission.
This PR adds logging for when the submit0781 job exhausts, in order to be consistent with how we log exhaustion for the BDD instructions and Veteran Upload jobs.
This change is part of a larger effort to gradually migrate to using the Lighthouse API instead of EVSS. All the migration behavior is behind flippers.
Summary
Related issue(s)
Testing done
The job exhausted but did not log to Datadog
This will be monitored in Datadog
The 0781 LH migration is being rolled out incrementally based on a percentage of production users, starting at 1%. All 0781 upload attempts will be logged and monitored.
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
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?