-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat/platform support for hardware details #876
Conversation
8023b0c
to
d43dbb1
Compare
Use the database type for it, it was breaking when fetching hardwares that had that version
d43dbb1
to
378f588
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be working well
@@ -94,7 +96,7 @@ class HardwareTestHistoryItem(TestHistoryItem): | |||
class HardwareBuildHistoryItem(BuildHistoryItem): | |||
tree_name: Optional[str] | |||
issue_id: Optional[str] | |||
issue_version: Optional[int] | |||
issue_version: Optional[Issue__Version] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I don't see a need to change this here, unless you change other fields as well, but it will work nonetheless
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have the opinion that in this case specifically (moving to the standardized types) any gradual change is already good. But I agree that if this change was not motivated by any other thing other than simply changing the type, I'd like to see this happen at least in every field of this model
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
django models.Q
surprised me because I thought this would be harder to implement. Worked well on my test!
- Added `models.Q` to filter queries by `environment_misc__platform` - Wrapped `_sanitize_records` and `_format_processing_for_response` in try block - Updated error response to use `e.json()` in `HardwareDetailsSummaryView` - Added check for `summaryResponse.data.common.compatibles` length in `HardwareDetails.tsx`
378f588
to
ac8eadb
Compare
Description
Makes Hardware comaptible with the platform field in the JSON.
Closes #865
How to test
Use known platforms that are not compatibles:
http://localhost:5173/hardware/kubernetes?et=1738672200&st=1738240200
http://localhost:5173/hardware/sc7180-trogdor-lazor-limozeen?et=1738672200&st=1738240200
http://localhost:5173/hardware/acer-chromebox-cxi4-puff?et=1738672200&st=1738240200