-
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: improve tests boot query peformance #281
Conversation
4ac96a6
to
935009a
Compare
8ccfe99
to
bce175e
Compare
935009a
to
d6ca200
Compare
8610500
to
d2440fe
Compare
d6ca200
to
07d182f
Compare
e53f1e1
to
acc2317
Compare
from django.db import connection | ||
|
||
|
||
class TreeDetailsSlow(View): |
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.
please add a httpie request so we can easily test it
from kernelCI_app.models import Checkouts | ||
import json | ||
|
||
|
||
class TreeTestsView(View): |
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.
will this endpoint still be necessary? we can delete the unnecessary endpoints
|
||
|
||
class TreeDetailsSlow(View): | ||
def get(self, request, commit_hash: str | None): |
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.
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 |
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.
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[] => { |
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 think we can have a loading state if we use a web worker here
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.
Is it really necessary considering the time frame that we have?
a398548
to
f88c893
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.
looks nice
f88c893
to
49eb554
Compare
Check if the information present on the endpoint /tree/<commit_hash>/full is sufficient for the tests and boots tabs.
http://localhost:8000/api/tree/4f8fa5a023dce383394ddfbfdd908964226b051a/full?origin=maestro&git_url=https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git&git_branch=for-next
http://localhost:8000/api/tree/3e7256c41c6572b4e5b6eb024090f8b0730d7304/full?origin=maestro&git_url=https://android.googlesource.com/kernel/common&git_branch=android-mainline