django.db.utils:IntegrityError when updating job log objects

RESOLVED FIXED

Status

RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: wlach, Assigned: wlach)

Tracking

Details

Attachments

(1 attachment)

e.g. https://rpm.newrelic.com/accounts/677903/applications/5585473/traced_errors/553eb5-f28591dc-282a-11e6-b947-b82a72d22a14

This could happen if we somehow had a log object with a different status after an updated job came in. This should be rare (since the log would normally only come in after a job completes?) but I guess it can happen. The fix is pretty simple.
Created attachment 8758852 [details] [review]
[treeherder] wlach:1277345 > mozilla:master
Attachment #8758852 - Flags: review?(emorley)

Comment 2

3 years ago
Comment on attachment 8758852 [details] [review]
[treeherder] wlach:1277345 > mozilla:master

Thank you :-)

I'm still puzzled as to how this state can occur (from what I can tell the example in comment 0 was a buildbot job, not a TC one where perhaps log urls were submitted via API for an incomplete job). But oh well!
Attachment #8758852 - Flags: review?(emorley) → review+
Keywords: autoland
Pull request has landed in master: https://github.com/mozilla/treeherder/commit/689777ab47d788153f7c28de043e6735a7655ca1
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Keywords: autoland
Resolution: --- → FIXED

Comment 4

3 years ago
Commit pushed to master at https://github.com/mozilla/treeherder

https://github.com/mozilla/treeherder/commit/de99ac57497f363bc120c775b5341fed7f386e26
Bug 1277345 - Fix log exception during job ingestion

When a log already exists with different state during job ingestion with
a non-default status, we should not change it.

Updated

3 years ago
Blocks: 1273231, 1277436
You need to log in before you can comment on or make changes to this bug.