Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api.models: make Fields of KbuildData Optional #2306

Closed
wants to merge 1 commit into from
Closed
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
7 changes: 4 additions & 3 deletions kernelci/api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@
data: CheckoutData = Field(
description="Checkout details"
)

Check failure on line 296 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 "Optional[Dict[str, Any]]") [assignment]

class KbuildData(BaseModel):
"""Model for the data field of a Kbuild node"""
Expand All @@ -301,13 +301,14 @@
kernel_revision: Revision = Field(
description="Kernel repo revision data"
)
arch: str = Field(
# [TODO]: review which of these Fields should be optional or mandatory
arch: Optional[str] = Field(
description="CPU architecture family"
)
defconfig: str = Field(
defconfig: Optional[str] = Field(
description="Kernel defconfig identifier"
)
compiler: str = Field(
compiler: Optional[str] = Field(
description="Compiler used for the build"
)
fragments: Optional[List[str]] = Field(
Expand All @@ -330,7 +331,7 @@
data: KbuildData = Field(
description="Kbuild details"
)

Check failure on line 334 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 "Optional[Dict[str, Any]]") [assignment]

class TestData(BaseModel):
"""Model for the data field of a Test node"""
Expand Down Expand Up @@ -362,7 +363,7 @@
data: TestData = Field(
description="Test details"
)

Check failure on line 366 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 "Optional[Dict[str, Any]]") [assignment]

class RegressionData(BaseModel):
"""Model for the data field of a Regression node"""
Expand All @@ -389,7 +390,7 @@
data: RegressionData = Field(
description="Regression details"
)

Check failure on line 393 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 "Optional[Dict[str, Any]]") [assignment]
_OBJECT_ID_FIELDS = Node._OBJECT_ID_FIELDS + [
'data.fail_node',
'data.pass_node',
Expand Down
Loading