Skip to content
This repository has been archived by the owner on Dec 15, 2018. It is now read-only.

Commit

Permalink
Add metric reporting for job step timeouts.
Browse files Browse the repository at this point in the history
Summary:
Job step timeouts are one of the significant causes of build failure that
aren't test failure, they can indicate problems, and they (as far as I can tell)
aren't currently easy to track.
This adds a very simple counter for job steps that have timed out so we can
monitor that.

Test Plan: Unit

Reviewers: ar

Reviewed By: ar

Subscribers: wwu

Differential Revision: https://tails.corp.dropbox.com/D89455
  • Loading branch information
kylec1 committed Feb 11, 2015
1 parent 8b75e88 commit 4f34ea2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion changes/jobs/sync_job_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from sqlalchemy.sql import func

from changes.constants import Status, Result
from changes.config import db
from changes.config import db, statsreporter
from changes.db.utils import try_create
from changes.models import (
ItemOption, JobPhase, JobStep, JobPlan, TestCase, ItemStat,
Expand Down Expand Up @@ -159,6 +159,7 @@ def sync_job_step(step_id):
})

db.session.flush()
statsreporter.stats().incr('job_step_timed_out')
if step.status != Status.in_progress:
retry_after = QUEUED_RETRY_DELAY
else:
Expand Down

0 comments on commit 4f34ea2

Please sign in to comment.