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

feat: add hardwareDetailsTests endpoint #831

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MarceloRobert
Copy link
Collaborator

Adds /hardware/<hardware_name>/tests endpoint

How to test

This endpoint is not being used by the frontend, but you can compare the responses by opening the network tab on the dashboard website, going to a hardware details with tests data, checking the request body for the post to hardwareDetails endpoint and use that body in a request from the api view. Check if filters and tree selection work normally.

Example: go to localhost:8000/api/hardware/brcm,bcm2711/tests and send the body

{
    "origin":"maestro",
    "startTimestampInSeconds":1737487800,
    "endTimestampInSeconds":1737574200,
    "selectedCommits":{},
    "filter":{}
}

in the POST request

Part of #751
Closes #762

@MarceloRobert MarceloRobert self-assigned this Jan 22, 2025
@MarceloRobert MarceloRobert force-pushed the feat/hardware-details-tests branch from 1d683cd to dbe12ca Compare January 22, 2025 19:58
@MarceloRobert MarceloRobert linked an issue Jan 23, 2025 that may be closed by this pull request
@MarceloRobert MarceloRobert force-pushed the feat/hardware-details-summary branch 2 times, most recently from 0278c2a to 5d700f1 Compare January 23, 2025 15:04
@MarceloRobert MarceloRobert force-pushed the feat/hardware-details-tests branch from dbe12ca to ba6b50c Compare January 23, 2025 16:30
@MarceloRobert MarceloRobert changed the base branch from feat/hardware-details-summary to main January 23, 2025 16:31
@MarceloRobert MarceloRobert force-pushed the feat/hardware-details-tests branch from ba6b50c to 1f2e1f5 Compare January 23, 2025 16:38
Comment on lines 93 to 97
@extend_schema(
responses=HardwareDetailsTestsResponse,
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@extend_schema(
responses=HardwareDetailsTestsResponse,
)
@extend_schema(
responses=HardwareDetailsTestsResponse,
request=HardwareDetailsPostBody,
methods=["POST"],
)

@MarceloRobert MarceloRobert force-pushed the feat/hardware-details-tests branch 2 times, most recently from 8d87fc6 to e70e674 Compare January 23, 2025 17:42
Copy link
Collaborator

@Francisco2002 Francisco2002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pre approve with a comment

def _process_test(self, record: Dict) -> None:
is_record_boot = is_boot(record["path"])
if is_record_boot:
self.processed_tests.add(record["id"])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't need to add a non processed tests in this set

@MarceloRobert MarceloRobert force-pushed the feat/hardware-details-tests branch from e70e674 to 695836f Compare January 23, 2025 19:28
@MarceloRobert MarceloRobert force-pushed the feat/hardware-details-tests branch from 695836f to ee5bec3 Compare January 23, 2025 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

create hardwareDetails/str:hardware/tests
3 participants