HomePhabricator
Diffusion Scap bd6d1e39de2f

Support per-check timeouts

Authored by dduvall on Mar 31 2016, 7:51 PM.

Description

Support per-check timeouts

Projects: Release-Engineering-Team

Maniphest Tasks: T131391

Summary:
Refactored checks module to support per-check timeout configuration:

  • Removed the timeout parameter from checks.execute
  • Introduced a timeout attribute/parameter in checks.Check
  • Implemented a checks.CheckJob.timedout method that compares the job's duration to the check's timeout.
  • Refactored checks.execute to test job.timedout

Fixes T131391

Test Plan:
Configure a check that exceeds the given timeout verify that it fails.

e.g.

checks:
  testfail:
    command: sleep 2
    timeout: 1

Reviewers: Release-Engineering-Team, thcipriani

Reviewed By: Release-Engineering-Team, thcipriani

Subscribers: thcipriani, jenkins

Differential Revision: https://phabricator.wikimedia.org/D167

Details