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: improve tests boot query peformance #281

Merged
merged 4 commits into from
Sep 13, 2024
Merged

Conversation

@loadez loadez self-assigned this Sep 11, 2024
@loadez loadez force-pushed the feat/improve-test-boots-query branch from 4ac96a6 to 935009a Compare September 11, 2024 19:39
@loadez loadez requested review from lfjnascimento and WilsonNet and removed request for lfjnascimento September 12, 2024 11:01
@loadez loadez force-pushed the feat/improve-test-boots-query branch from 935009a to d6ca200 Compare September 12, 2024 11:59
@WilsonNet WilsonNet force-pushed the feat/performance-boots branch 2 times, most recently from 8610500 to d2440fe Compare September 12, 2024 12:13
@loadez loadez changed the base branch from feat/performance-boots to main September 12, 2024 12:22
@WilsonNet WilsonNet marked this pull request as draft September 12, 2024 12:25
@loadez loadez force-pushed the feat/improve-test-boots-query branch from d6ca200 to 07d182f Compare September 12, 2024 12:29
@WilsonNet WilsonNet marked this pull request as ready for review September 12, 2024 13:34
@loadez loadez force-pushed the feat/improve-test-boots-query branch from e53f1e1 to acc2317 Compare September 12, 2024 14:43
from django.db import connection


class TreeDetailsSlow(View):
Copy link
Collaborator

Choose a reason for hiding this comment

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

please add a httpie request so we can easily test it

from kernelCI_app.models import Checkouts
import json


class TreeTestsView(View):
Copy link
Collaborator

Choose a reason for hiding this comment

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

will this endpoint still be necessary? we can delete the unnecessary endpoints



class TreeDetailsSlow(View):
def get(self, request, commit_hash: str | None):
Copy link
Collaborator

@WilsonNet WilsonNet Sep 12, 2024

Choose a reason for hiding this comment

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

we are missing the filters, we want to get them in this PR or will it be a regression, we can do in a separated PR but targeting this PR and move this to draft if you think it is too much

WHERE
builds.origin = %(origin_param)s
) AS builds_filter
LEFT JOIN tests
Copy link
Collaborator

Choose a reason for hiding this comment

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

these joins can be inner joins because we are looking for tests, we don't have business with checkouts that does not have builds and builds that does not have tests

origin,
);

const data = useMemo((): TPathTests[] => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we can have a loading state if we use a web worker here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Is it really necessary considering the time frame that we have?

@WilsonNet WilsonNet marked this pull request as draft September 12, 2024 17:12
@WilsonNet WilsonNet marked this pull request as draft September 12, 2024 17:12
@loadez loadez force-pushed the feat/improve-test-boots-query branch from a398548 to f88c893 Compare September 13, 2024 19:33
@loadez loadez marked this pull request as ready for review September 13, 2024 19:35
Copy link
Collaborator

@WilsonNet WilsonNet left a comment

Choose a reason for hiding this comment

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

looks nice

@loadez loadez force-pushed the feat/improve-test-boots-query branch from f88c893 to 49eb554 Compare September 13, 2024 19:40
@loadez loadez merged commit 49eb554 into main Sep 13, 2024
5 checks passed
@WilsonNet WilsonNet deleted the feat/improve-test-boots-query branch September 17, 2024 11: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.

2 participants