-
Notifications
You must be signed in to change notification settings - Fork 556
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
[Monitoring] Testcase upload metrics for the triage lifecycle #4364
Conversation
d59292c
to
cdb5960
Compare
Why was it OK to remove this? |
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.
lgtm
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.
LGTM % Jonathan's comments
The only place where this gets used is here
This would only change the presentation of the uploaded testcases page in appengine, so I expect no badness from this movement. |
Motivation
Chrome security shepherds manually upload testcases through appengine, triggering analyze task and, in case of a legitimate crash, the followup progression tasks:
This PR adds instrumentation to track the time elapsed between the user upload, and the completion of the above events.
Attention points
TestcaseUploadMetadata.timestamp was being mutated on the preprocess stage for analyze task. This mutation was removed, so that this entity can be the source of truth for when a testcase was in fact uploaded by the user.
The job name could be retrieved from the JOB_NAME env var within the uworker, however this does not work for the cleanup use case. For this reason, the job name is fetched from datastore instead.
The
query_testcase_upload_metadata
method was moved from analyze_task.py to a helpers file, so it could be reused across tasks and on the cleanup cronjobTesting strategy
Every task mentioned was executed locally, with a valid uploaded testcase. The codepath for the metric emission was hit and produced the desired output, both for the tasks and the cronjob.
Part of #4271