Closed Bug 1173882 Opened 9 years ago Closed 9 years ago

Autophone - should use updated attempts when inserting a new job due to a retry

Categories

(Testing Graveyard :: Autophone, defect)

defect
Not set
normal

Tracking

(firefox41 affected)

RESOLVED FIXED
Tracking Status
firefox41 --- affected

People

(Reporter: bc, Assigned: bc)

References

Details

(Keywords: regression)

Attachments

(2 files)

Last night I noticed a job which continually submitted retries:

https://treeherder.mozilla.org/#/jobs?repo=try&exclusion_profile=false&filter-searchStr=autophone&revision=6e083a56ff88

I saw this again locally when testing --override-build-dir where incompatible api builds were being served to builds. The job would be retried and the newly inserted job would have attempts initialized to 0 which meant that retried jobs would not be purged after exceeding the maximum number of attempts.

see https://github.com/mozilla/autophone/blob/master/worker.py#L629

The fix is to change Jobs.new_job to take an attempts keyword argument with default 0 and to use that to increment the attempts for retried jobs.
Attachment #8621243 - Flags: review?(gbrown) → review+
https://github.com/mozilla/autophone/commit/9170a302a14593156f4936bf018cbf1be4fcde43
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
I shouldn't have incremented the attempts in the new retried job. Just passing the existing attempts would have been correct.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attachment #8621729 - Flags: review?(gbrown)
Blocks: 1174271
Comment on attachment 8621729 [details] [diff] [review]
bug-1173882-followup.patch

Review of attachment 8621729 [details] [diff] [review]:
-----------------------------------------------------------------

Sorry, I should have flagged that.
Attachment #8621729 - Flags: review?(gbrown) → review+
https://github.com/mozilla/autophone/commit/b0ce085535ffefe0edd7bc3f9e5c93eea86051d9
Status: REOPENED → RESOLVED
Closed: 9 years ago9 years ago
Resolution: --- → FIXED
fwiw, this was a regression from bug 1165403. Prior to that check in, the new job generated from the retry would be attached to the existing row in the jobs table. After the check in, a new row would be generated in the jobs table for the build if duplicates were allowed. This new row would have had attempts 0 initially which was the cause of our problem.
Blocks: 1165403
Keywords: regression
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: