Skip to content

Commit

Permalink
fix(TreeDetails): add lazy load
Browse files Browse the repository at this point in the history
Now the order of the lazy load is Summary > Current Page Tab> Other
Pages Tab
- Fixed typos in variable names (e.g., "enviroment" to "environment")
- Updated type definitions in backend and frontend files
- Refactored API calls to use a more modular approach
- Improved lazy loading of tree details in the frontend
- Updated schema.yml to reflect changes in type definitions

Closes #755
  • Loading branch information
WilsonNet committed Jan 17, 2025
1 parent 4004405 commit 4ce802e
Show file tree
Hide file tree
Showing 16 changed files with 574 additions and 343 deletions.
2 changes: 1 addition & 1 deletion backend/kernelCI_app/typeModels/commonDetails.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class TestSummary(BaseModel):
failed_platforms: List[str]
environment_compatible: Optional[Dict] = None
environment_misc: Optional[Dict] = None
platforms: Optional[Dict[str, TestStatusCount]]
platforms: Optional[Dict[str, TestStatusCount]] = None


class BuildSummary(BaseModel):
Expand Down
10 changes: 5 additions & 5 deletions backend/kernelCI_app/typeModels/treeDetails.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Dict, List, Optional, Set
from typing import Dict, List, Optional

from kernelCI_app.typeModels.commonDetails import (
Summary,
Expand All @@ -22,15 +22,15 @@ class TestSummary(BaseModel):
configs: Dict[str, TestStatusCount]
issues: List[TestIssuesItem]
unknown_issues: int
enviroment_compatible: Dict[str, TestStatusCount]
enviroment_misc: Dict[str, TestStatusCount]
environment_compatible: Dict[str, TestStatusCount]
environment_misc: Dict[str, TestStatusCount]
fail_reasons: Dict[str, int]
failed_platforms: List[str]


class TreeSummary(Summary):
hardware: Set[str]
tree_url: str
hardware: Optional[List[str]]
tree_url: Optional[str]
git_commit_tags: Optional[List[str]]


Expand Down
8 changes: 4 additions & 4 deletions backend/kernelCI_app/views/treeDetailsSummaryView.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ def get(self, request, commit_hash: str | None):
"configs": self.bootConfigs,
"issues": self.bootIssues,
"unknown_issues": self.failedBootsWithUnknownIssues,
"enviroment_compatible": self.bootEnvironmentCompatible,
"enviroment_misc": self.bootEnvironmentMisc,
"environment_compatible": self.bootEnvironmentCompatible,
"environment_misc": self.bootEnvironmentMisc,
"fail_reasons": self.bootFailReasons,
"failed_platforms": list(self.bootPlatformsFailing),
},
Expand All @@ -176,8 +176,8 @@ def get(self, request, commit_hash: str | None):
"configs": self.test_configs,
"issues": self.testIssues,
"unknown_issues": self.failedTestsWithUnknownIssues,
"enviroment_compatible": self.testEnvironmentCompatible,
"enviroment_misc": self.testEnvironmentMisc,
"environment_compatible": self.testEnvironmentCompatible,
"environment_misc": self.testEnvironmentMisc,
"fail_reasons": self.testFailReasons,
"failed_platforms": list(self.testPlatformsWithErrors),
},
Expand Down
8 changes: 4 additions & 4 deletions backend/kernelCI_app/views/treeDetailsView.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ def get(self, request, commit_hash: str | None):
"configs": self.bootConfigs,
"issues": self.bootIssues,
"unknown_issues": self.failedBootsWithUnknownIssues,
"enviroment_compatible": self.bootEnvironmentCompatible,
"enviroment_misc": self.bootEnvironmentMisc,
"environment_compatible": self.bootEnvironmentCompatible,
"environment_misc": self.bootEnvironmentMisc,
"fail_reasons": self.bootFailReasons,
"failed_platforms": list(self.bootPlatformsFailing),
},
Expand All @@ -193,8 +193,8 @@ def get(self, request, commit_hash: str | None):
"configs": self.test_configs,
"issues": self.testIssues,
"unknown_issues": self.failedTestsWithUnknownIssues,
"enviroment_compatible": self.testEnvironmentCompatible,
"enviroment_misc": self.testEnvironmentMisc,
"environment_compatible": self.testEnvironmentCompatible,
"environment_misc": self.testEnvironmentMisc,
"fail_reasons": self.testFailReasons,
"failed_platforms": list(self.testPlatformsWithErrors),
},
Expand Down
Loading

0 comments on commit 4ce802e

Please sign in to comment.