1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-04 22:40:12 +01:00

Merge branch 'build-timeout-customization' into 'master'

build: make per-build hard time limit customizable

See merge request fdroid/fdroidserver!446
This commit is contained in:
Hans-Christoph Steiner 2018-01-30 11:22:08 +01:00
commit adaf97a3cb
7 changed files with 125 additions and 5 deletions

View File

@ -31,7 +31,9 @@ metadata_v0:
- git checkout $GITCOMMIT
- cd fdroiddata
- ../tests/dump_internal_metadata_format.py
- sed -i -e '/kivy\W false/d'
- sed -i
-e '/kivy:\sfalse/d'
-e '/timeout:\s/d'
metadata/dump_*/*.yaml
- diff -uw metadata/dump_*

View File

@ -913,9 +913,9 @@ def trybuild(app, build, build_dir, output_dir, log_dir, also_check_dir,
return True
def force_halt_build():
def force_halt_build(timeout):
"""Halt the currently running Vagrant VM, to be called from a Timer"""
logging.error(_('Force halting build after timeout!'))
logging.error(_('Force halting build after {0} sec timeout!').format(timeout))
timeout_event.set()
vm = vmtools.get_build_vm('builder')
vm.halt()
@ -1093,8 +1093,15 @@ def main():
if time.time() > endtime:
max_build_time_reached = True
break
if options.server: # enable watchdog timer
timer = threading.Timer(7200, force_halt_build)
# Enable watchdog timer (2 hours by default).
if build.timeout is None:
timeout = 7200
else:
timeout = int(build.timeout)
if options.server and timeout > 0:
logging.debug(_('Setting {0} sec timeout for this build').format(timeout))
timer = threading.Timer(timeout, force_halt_build, [timeout])
timer.start()
else:
timer = None

View File

@ -206,6 +206,7 @@ def fieldtype(name):
build_flags_order = [
'disable',
'commit',
'timeout',
'subdir',
'submodules',
'sudo',
@ -248,6 +249,7 @@ class Build(dict):
super().__init__()
self.disable = False
self.commit = None
self.timeout = None
self.subdir = None
self.submodules = False
self.sudo = ''
@ -347,6 +349,7 @@ flagtypes = {
'forcevercode': TYPE_BOOL,
'novcheck': TYPE_BOOL,
'antifeatures': TYPE_LIST,
'timeout': TYPE_INT,
}
@ -1208,6 +1211,8 @@ def parse_txt_metadata(mf, app):
build[pk] = pv
elif t == TYPE_BOOL:
build[pk] = _decode_bool(pv)
elif t == TYPE_INT:
build[pk] = int(pv)
def parse_buildline(lines):
v = "".join(lines)

View File

@ -71,6 +71,7 @@ builds:
submodules: false
sudo: ''
target: android-10
timeout: null
versionCode: '3'
versionName: '1.2'
- androidupdate: []
@ -104,6 +105,7 @@ builds:
submodules: false
sudo: ''
target: android-15
timeout: null
versionCode: '4'
versionName: '1.3'
- androidupdate: []
@ -137,6 +139,7 @@ builds:
submodules: false
sudo: ''
target: android-10
timeout: null
versionCode: '5'
versionName: '1.4'
- androidupdate: []
@ -171,6 +174,7 @@ builds:
submodules: false
sudo: echo 'this is just a test'
target: null
timeout: null
versionCode: '6'
versionName: '1.5'
comments: {}

View File

@ -92,6 +92,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '13'
versionName: '1.12'
- androidupdate: []
@ -127,6 +128,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '16'
versionName: '1.15'
- androidupdate: []
@ -162,6 +164,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '19'
versionName: '1.18'
- androidupdate: []
@ -197,6 +200,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '20'
versionName: '1.19'
- androidupdate: []
@ -232,6 +236,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '21'
versionName: '1.20'
- androidupdate: []
@ -267,6 +272,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '22'
versionName: '1.21'
- androidupdate: []
@ -300,6 +306,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '24'
versionName: '1.23'
- androidupdate: []
@ -334,6 +341,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '25'
versionName: '1.24'
- androidupdate: []
@ -368,6 +376,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '26'
versionName: '1.25'
- androidupdate: []
@ -402,6 +411,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '27'
versionName: '1.26'
- androidupdate: []
@ -436,6 +446,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '28'
versionName: '1.27'
- androidupdate: []
@ -470,6 +481,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '30'
versionName: '1.29'
- androidupdate: []
@ -504,6 +516,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '33'
versionName: '1.32'
- androidupdate: []
@ -537,6 +550,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '34'
versionName: '1.33'
- androidupdate: []
@ -571,6 +585,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '35'
versionName: '1.34'
- androidupdate: []
@ -605,6 +620,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '36'
versionName: '1.35'
- androidupdate: []
@ -639,6 +655,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '37'
versionName: '1.36'
- androidupdate: []
@ -673,6 +690,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '38'
versionName: '1.37'
- androidupdate:
@ -719,6 +737,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '40'
versionName: '2.1'
- androidupdate:
@ -765,6 +784,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '42'
versionName: '2.3'
- androidupdate: []
@ -801,6 +821,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '45'
versionName: '2.6'
- androidupdate: []
@ -837,6 +858,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '46'
versionName: '2.7'
- androidupdate: []
@ -873,6 +895,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '47'
versionName: '2.8'
- androidupdate: []
@ -909,6 +932,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '48'
versionName: 2.8.1
- androidupdate: []
@ -945,6 +969,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '49'
versionName: '2.9'
- androidupdate: []
@ -981,6 +1006,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '50'
versionName: 2.9.1
- androidupdate: []
@ -1017,6 +1043,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '51'
versionName: 2.9.2
- androidupdate: []
@ -1053,6 +1080,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '52'
versionName: '3.0'
comments:

View File

@ -100,6 +100,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '5'
versionName: 0.3.3
- androidupdate: []
@ -137,6 +138,7 @@ builds:
submodules: true
sudo: ''
target: null
timeout: null
versionCode: '6'
versionName: 0.3.3
- androidupdate: []
@ -173,6 +175,7 @@ builds:
submodules: true
sudo: ''
target: null
timeout: null
versionCode: '9'
versionName: 0.4.2
- androidupdate: []
@ -209,6 +212,7 @@ builds:
submodules: true
sudo: ''
target: null
timeout: null
versionCode: '11'
versionName: 0.5.1
- androidupdate: []
@ -244,6 +248,7 @@ builds:
submodules: true
sudo: ''
target: null
timeout: null
versionCode: '12'
versionName: 0.5.2
- androidupdate: []
@ -279,6 +284,7 @@ builds:
submodules: true
sudo: ''
target: null
timeout: null
versionCode: '100'
versionName: 0.5.3
- androidupdate: []
@ -314,6 +320,7 @@ builds:
submodules: true
sudo: ''
target: null
timeout: null
versionCode: '101'
versionName: 0.5.4
- androidupdate: []
@ -349,6 +356,7 @@ builds:
submodules: true
sudo: ''
target: null
timeout: null
versionCode: '102'
versionName: 0.6.0
comments: {}

View File

@ -93,6 +93,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '110'
versionName: 0.0.11-ARMv7
- androidupdate:
@ -129,6 +130,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '111'
versionName: 0.0.11-ARM
- androidupdate:
@ -165,6 +167,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '112'
versionName: 0.0.11-x86
- androidupdate:
@ -201,6 +204,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '113'
versionName: 0.0.11-mips
- androidupdate: []
@ -236,6 +240,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '1301'
versionName: 0.1.3-MIPS
- androidupdate: []
@ -271,6 +276,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '1302'
versionName: 0.1.3-x86
- androidupdate: []
@ -306,6 +312,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '1303'
versionName: 0.1.3-ARM
- androidupdate: []
@ -341,6 +348,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '1304'
versionName: 0.1.3-ARMv7
- androidupdate: []
@ -375,6 +383,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '9002'
versionName: 0.9.0
- androidupdate: []
@ -409,6 +418,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '9004'
versionName: 0.9.0
- androidupdate: []
@ -443,6 +453,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '9102'
versionName: 0.9.1
- androidupdate: []
@ -477,6 +488,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '9104'
versionName: 0.9.1
- androidupdate: []
@ -511,6 +523,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '9502'
versionName: 0.9.5
- androidupdate: []
@ -545,6 +558,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '9504'
versionName: 0.9.5
- androidupdate: []
@ -579,6 +593,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '9602'
versionName: 0.9.6
- androidupdate: []
@ -613,6 +628,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '9604'
versionName: 0.9.6
- androidupdate: []
@ -647,6 +663,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '9702'
versionName: 0.9.7
- androidupdate: []
@ -681,6 +698,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '9704'
versionName: 0.9.7
- androidupdate: []
@ -715,6 +733,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '9711'
versionName: 0.9.7.1
- androidupdate: []
@ -749,6 +768,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '9712'
versionName: 0.9.7.1
- androidupdate: []
@ -783,6 +803,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '9714'
versionName: 0.9.7.1
- androidupdate: []
@ -817,6 +838,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '9802'
versionName: 0.9.8
- androidupdate: []
@ -851,6 +873,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '9803'
versionName: 0.9.8
- androidupdate: []
@ -885,6 +908,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '9804'
versionName: 0.9.8
- androidupdate: []
@ -919,6 +943,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '9902'
versionName: 0.9.9
- androidupdate: []
@ -953,6 +978,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '9903'
versionName: 0.9.9
- androidupdate: []
@ -987,6 +1013,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '9904'
versionName: 0.9.9
- androidupdate: []
@ -1021,6 +1048,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '10002'
versionName: 0.9.10
- androidupdate: []
@ -1055,6 +1083,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '10003'
versionName: 0.9.10
- androidupdate: []
@ -1089,6 +1118,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '10004'
versionName: 0.9.10
- androidupdate: []
@ -1123,6 +1153,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '10006'
versionName: 1.0.0
- androidupdate: []
@ -1157,6 +1188,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '10007'
versionName: 1.0.0
- androidupdate: []
@ -1191,6 +1223,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '10008'
versionName: 1.0.0
- androidupdate: []
@ -1225,6 +1258,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '10102'
versionName: 1.0.1
- androidupdate: []
@ -1259,6 +1293,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '10103'
versionName: 1.0.1
- androidupdate: []
@ -1293,6 +1328,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '10104'
versionName: 1.0.1
- androidupdate: []
@ -1329,6 +1365,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '1010303'
versionName: 1.1.3
- androidupdate: []
@ -1365,6 +1402,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '1010304'
versionName: 1.1.3
- androidupdate: []
@ -1401,6 +1439,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '1010305'
versionName: 1.1.3
- androidupdate: []
@ -1437,6 +1476,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '1010503'
versionName: 1.1.5
- androidupdate: []
@ -1473,6 +1513,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '1010504'
versionName: 1.1.5
- androidupdate: []
@ -1509,6 +1550,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '1010505'
versionName: 1.1.5
- androidupdate: []
@ -1545,6 +1587,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '1010603'
versionName: 1.1.6
- androidupdate: []
@ -1581,6 +1624,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '1010604'
versionName: 1.1.6
- androidupdate: []
@ -1617,6 +1661,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '1010605'
versionName: 1.1.6
- androidupdate: []
@ -1653,6 +1698,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '1020003'
versionName: 1.2.0
- androidupdate: []
@ -1689,6 +1735,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '1020004'
versionName: 1.2.0
- androidupdate: []
@ -1725,6 +1772,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '1020005'
versionName: 1.2.0
- androidupdate: []
@ -1761,6 +1809,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '1020103'
versionName: 1.2.1
- androidupdate: []
@ -1797,6 +1846,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '1020104'
versionName: 1.2.1
- androidupdate: []
@ -1833,6 +1883,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '1020105'
versionName: 1.2.1
- androidupdate: []
@ -1869,6 +1920,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '1020203'
versionName: 1.2.2
- androidupdate: []
@ -1905,6 +1957,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '1020204'
versionName: 1.2.2
- androidupdate: []
@ -1941,6 +1994,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '1020205'
versionName: 1.2.2
- androidupdate: []
@ -1977,6 +2031,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '1020303'
versionName: 1.2.3
- androidupdate: []
@ -2013,6 +2068,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '1020304'
versionName: 1.2.3
- androidupdate: []
@ -2049,6 +2105,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '1020305'
versionName: 1.2.3
- androidupdate: []
@ -2085,6 +2142,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '1020403'
versionName: 1.2.4
- androidupdate: []
@ -2121,6 +2179,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '1020404'
versionName: 1.2.4
- androidupdate: []
@ -2157,6 +2216,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '1020405'
versionName: 1.2.4
- androidupdate: []
@ -2193,6 +2253,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '1020503'
versionName: 1.2.5
- androidupdate: []
@ -2229,6 +2290,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '1020504'
versionName: 1.2.5
- androidupdate: []
@ -2265,6 +2327,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '1020505'
versionName: 1.2.5
- androidupdate: []
@ -2301,6 +2364,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '1030003'
versionName: 1.2.6
- androidupdate: []
@ -2337,6 +2401,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '1030004'
versionName: 1.2.6
- androidupdate: []
@ -2373,6 +2438,7 @@ builds:
submodules: false
sudo: ''
target: null
timeout: null
versionCode: '1030005'
versionName: 1.2.6
comments: {}