Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions kernelci/api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@
class KbuildData(BaseModel):
"""Model for the data field of a Kbuild node"""
# [TODO] Can be fetched from parent checkout node
kernel_revision: Optional[Revision] = Field(

Check failure on line 442 in kernelci/api/models.py

View workflow job for this annotation

GitHub Actions / Lint

Incompatible types in assignment (expression has type "CheckoutData", base class "Node" defined the type as "dict[str, Any] | None") [assignment]
description="Kernel repo revision data",
default=None
)
Expand Down Expand Up @@ -514,7 +514,7 @@
'data.regression',
]


Check failure on line 517 in kernelci/api/models.py

View workflow job for this annotation

GitHub Actions / Lint

Incompatible types in assignment (expression has type "KbuildData", base class "Node" defined the type as "dict[str, Any] | None") [assignment]
class TestData(BaseModel):
"""Model for the data field of a Test node"""
error_code: Optional[ErrorCodes] = Field(
Expand Down Expand Up @@ -609,7 +609,7 @@
'data.regression',
]


Check failure on line 612 in kernelci/api/models.py

View workflow job for this annotation

GitHub Actions / Lint

Incompatible types in assignment (expression has type "TestData", base class "Node" defined the type as "dict[str, Any] | None") [assignment]
class Job(Node):
"""API model for job (test suite) nodes"""
class_kind: ClassVar[str] = 'job'
Expand All @@ -626,7 +626,20 @@
'data.regression',
]


Check failure on line 629 in kernelci/api/models.py

View workflow job for this annotation

GitHub Actions / Lint

Incompatible types in assignment (expression has type "TestData", base class "Node" defined the type as "dict[str, Any] | None") [assignment]
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(
Expand Down Expand Up @@ -708,7 +721,7 @@
'data.fail_node',
'data.pass_node',
]
TIMESTAMP_FIELDS = Node.TIMESTAMP_FIELDS + [

Check failure on line 724 in kernelci/api/models.py

View workflow job for this annotation

GitHub Actions / Lint

Incompatible types in assignment (expression has type "RegressionData", base class "Node" defined the type as "dict[str, Any] | None") [assignment]
'data.fail_node.created',
'data.fail_node.updated',
'data.fail_node.timeout',
Expand Down