Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2ce7576

Browse files
committedMay 26, 2025··
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 <arnaud.ferraris@collabora.com>
1 parent 25691ae commit 2ce7576

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed
 

‎kernelci/kbuild.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
- kselftest: false - do not build kselftest
2525
"""
2626

27+
from datetime import datetime, timedelta
2728
import os
2829
import sys
2930
import re
@@ -1058,12 +1059,18 @@ def submit(self, retcode, dry_run=False):
10581059
kselftest_result = 'pass'
10591060
break
10601061

1062+
if job_result == 'pass':
1063+
job_state = 'available'
1064+
else:
1065+
job_state = 'done'
1066+
10611067
results = {
10621068
'node': {
10631069
'name': self._apijobname,
10641070
'result': job_result,
1065-
'state': 'done',
1071+
'state': job_state,
10661072
'artifacts': af_uri,
1073+
'holdoff': str(datetime.utcnow() + timedelta(minutes=10)),
10671074
},
10681075
'child_nodes': []
10691076
}

0 commit comments

Comments
 (0)
Please sign in to comment.