From 72685bb1a79b44b95efd6012dbe3ffdb21b092d2 Mon Sep 17 00:00:00 2001 From: Arnaud Ferraris Date: Wed, 20 Aug 2025 20:36:12 +0200 Subject: [PATCH] kernelci: api: models: add new "process" node type Post-processing jobs are currently nodes of the `job` kind, which only works as long as they're related to `checkout` or `kbuild` nodes. However, due to performance issues of the `coverage-report` jobs, we need to post-process each coverage-enabled test job individually. This leads to scheduling issues, as we could enter an infinite loop where new post-processing jobs would be triggered whenever one of those transitions to the `done` state. We must therefore create a new node kind for post-processing jobs in order to avoid those scheduler limitations. Signed-off-by: Arnaud Ferraris --- kernelci/api/models.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/kernelci/api/models.py b/kernelci/api/models.py index dbdef01ba9..05567e9245 100644 --- a/kernelci/api/models.py +++ b/kernelci/api/models.py @@ -627,6 +627,19 @@ class Job(Node): ] +class Process(Node): + """API model for post-processing job nodes""" + class_kind: ClassVar[str] = 'process' + kind: Literal['process'] = Field( + default='process', + description='Type of the object', + ) + + OBJECT_ID_FIELDS = Node.OBJECT_ID_FIELDS + [ + 'data.regression', + ] + + class RegressionData(BaseModel): """Model for the data field of a Regression node""" fail_node: Optional[PyObjectId] = Field(