-
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
93214: Fix error logging for DR SavedClaim status updater jobs #18642
Conversation
# Increment StatsD and log only for new errors | ||
unless old_uploads_metadata.dig(upload_id, 'status') == ERROR_STATUS | ||
StatsD.increment("#{STATSD_KEY_PREFIX}_upload.status", tags: ["status:#{status}"]) | ||
if status == ERROR_STATUS |
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.
It seems like the conditional is different here where logging is happening upon error status whereas before in the unless condition, it was happening when the status was not ERROR_STATUS
. Is this the intent, just want to check?
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.
That's correct - we want it to log only if the status changed to ERROR_STATUS
but not if it was already ERROR_STATUS
.
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.
changes look good 👍 one question just for clarification — are we still incrementing when non-error statuses are unchanged? 🤔 i might have missed it in the code, but seems like we might also want to more broadly check that we only increment when statuses change?
For now we are incrementing for every non-error status check. I think it is a good idea to change it so we are incrementing statsd values only when the status values change, but I'd prefer to make that a separate ticket + PR. |
Backend-review-group approval confirmed. |
Summary
This fixes an erroneous log message for non-error evidence statuses in the DR SavedClaim status updater jobs.
Related issue(s)
department-of-veterans-affairs/va.gov-team#93214
department-of-veterans-affairs/va.gov-team#90103
#18579
Testing done
Tested locally and spec tests
What areas of the site does it impact?
This impacts Rails logs and the SavedClaim status updater jobs.
Acceptance criteria