Skip to content

Commit 63172bc

Browse files
author
Staging script
committed
Staging PR 2927
1 parent 50fcdc5 commit 63172bc

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

kernelci/api/helper.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ def _is_job_filtered(self, node):
441441
return False
442442

443443
def create_job_node(self, job_config, input_node,
444-
runtime=None, platform=None):
444+
runtime=None, platform=None, retry_counter=0):
445445
"""Create a new job node based on input and configuration"""
446446
jobfilter = input_node.get('jobfilter')
447447
platform_filter = input_node.get('platform_filter')
@@ -459,6 +459,7 @@ def create_job_node(self, job_config, input_node,
459459
'data': {
460460
'kernel_revision': input_node['data']['kernel_revision'],
461461
},
462+
'retry_counter': retry_counter,
462463
}
463464
if jobfilter:
464465
job_node['jobfilter'] = jobfilter

kernelci/api/models.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,10 @@ class Node(DatabaseModel):
269269
description="Flag to indicate if the node was processed by KCIDB-Bridge",
270270
default=False
271271
)
272+
retry_counter: int = Field(
273+
default=0,
274+
description="Number of times the job has retried"
275+
)
272276

273277
OBJECT_ID_FIELDS: ClassVar[list] = ['parent']
274278
TIMESTAMP_FIELDS: ClassVar[list] = ['created', 'updated', 'timeout', 'holdoff']

0 commit comments

Comments
 (0)