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: create endpoint that return tree details #88

Merged
merged 1 commit into from
Jul 15, 2024

Conversation

lfjnascimento
Copy link
Contributor

@lfjnascimento lfjnascimento commented Jul 10, 2024

create an tree/<str:commit_hash> endpoint that returns all builds and a summary

To test it you can:

  • run the dev server poetry python manage.py runserver
  • Make a get request to http://localhost:8000/api/tree/22a40d14b572deb80c0648557f4bd502d7e83826

Copy link
Collaborator

@mari1912 mari1912 left a comment

Choose a reason for hiding this comment

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

LGTM

backend/kernelCI_app/views.py Outdated Show resolved Hide resolved
@lfjnascimento lfjnascimento marked this pull request as draft July 12, 2024 14:26
@lfjnascimento lfjnascimento changed the title feat: create /revision endpoint that return revision builds info feat: create endpoint that return tree details Jul 12, 2024
@lfjnascimento lfjnascimento force-pushed the feat/endpoint_builds branch from 84b80af to 48f6dd8 Compare July 12, 2024 20:09
@lfjnascimento lfjnascimento marked this pull request as ready for review July 12, 2024 20:40
@lfjnascimento lfjnascimento force-pushed the feat/endpoint_builds branch from 48f6dd8 to 527de46 Compare July 15, 2024 11:32
Copy link
Collaborator

@mari1912 mari1912 left a comment

Choose a reason for hiding this comment

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

I'm not sure test_status is working properly, it returns 0 for all of them when I tested it for http://localhost:8000/api/tree/189ee9735a4b2e8095b1a6c088ebc8e133872471 for example. When I search only localhost:8000/api/tree it gets some tests for this commit hash. Here I'm using kcidb to test. It may be a good idea to change it to default

start_time = serializers.CharField()
duration = serializers.CharField()
compiler = serializers.CharField()
test_status = serializers.CharField()
Copy link
Collaborator

Choose a reason for hiding this comment

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

we will also need the link of logs

Copy link
Collaborator

Choose a reason for hiding this comment

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

and config url

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You can test if there is a test.status for a specific build by runing:

SELECT tests.status
FROM
  tests
WHERE tests.build_id = <build_id>

You'll notice that most of the build you test there a test

Copy link
Collaborator

@mari1912 mari1912 left a comment

Choose a reason for hiding this comment

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

We also may have to get some kernel information from the misc field, the information that will be shown in the accordion content

@lfjnascimento lfjnascimento force-pushed the feat/endpoint_builds branch 2 times, most recently from 81c10e4 to 2410e1f Compare July 15, 2024 12:56
@lfjnascimento lfjnascimento force-pushed the feat/endpoint_builds branch from 2410e1f to 06b8991 Compare July 15, 2024 13:57
@lfjnascimento lfjnascimento merged commit 06b8991 into main Jul 15, 2024
2 checks passed
@lfjnascimento lfjnascimento deleted the feat/endpoint_builds branch July 15, 2024 13:58
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.

3 participants