Skip to content

Commit 723a578

Browse files
committed
kernelci: kbuild: transition to available state when complete
Currently, `kbuild` nodes transition to state `done` as soon as they complete, even though they often have many child nodes running afterwards. This is confusing as `checkout` nodes first transition to `available` state, then `closing` (waiting for child nodes to complete) and only transition to `done` once all child nodes have completed. This behaviour should be applied to `kbuild` nodes as well, both for consistency and to be able to easily schedule post-processing jobs (e.g. by triggering those on the `state: done` event). Also add a `holdoff` value (10 minutes, identical to `checkout` nodes) so the corresponding service properly handles state transitions for those nodes. Fixes #2875 Signed-off-by: Arnaud Ferraris <[email protected]>
1 parent 25691ae commit 723a578

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

kernelci/kbuild.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1058,12 +1058,18 @@ def submit(self, retcode, dry_run=False):
10581058
kselftest_result = 'pass'
10591059
break
10601060

1061+
if job_result == 'pass':
1062+
job_state = 'available'
1063+
else:
1064+
job_state = 'done'
1065+
10611066
results = {
10621067
'node': {
10631068
'name': self._apijobname,
10641069
'result': job_result,
1065-
'state': 'done',
1070+
'state': job_state,
10661071
'artifacts': af_uri,
1072+
'holdoff': str(datetime.utcnow() + timedelta(minutes=10)),
10671073
},
10681074
'child_nodes': []
10691075
}

0 commit comments

Comments
 (0)