-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[admin] Improve workspaces queries #6312
Conversation
At some point we used db.transaction(...) for all tests, which is not necessary, and also breaks certain queries
const query: AdminGetWorkspacesQuery = { | ||
ownerId: props?.user?.id, | ||
}; | ||
if (matchesInstanceIdOrLegacyWorkspaceIdExactly(searchTerm)) { |
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.
@gtsiolis What I try to do here is to "guess" what the user is entering, to enable performance improvements in the SQL query. Problem is that this is not perfect (cmp. instanceIdOrWorkspaceId
). Another option would be a Dropdown of sorts that allows to choose this explicitly.
I would be interested in your perspective on this; maybe you have an idea how to improve here without requiring too much friction.
/werft run 👍 started the job as gitpod-build-gpl-4988-admin-queries.4 |
/werft run 👍 started the job as gitpod-build-gpl-4988-admin-queries.5 |
/werft run with-clean-slate-deployment 👍 started the job as gitpod-build-gpl-4988-admin-queries.6 |
/werft run 👍 started the job as gitpod-build-gpl-4988-admin-queries.7 |
Is it expected that only the current instance of a WS can be queried? |
/werft run 👍 started the job as gitpod-build-gpl-4988-admin-queries.8 |
/lgtm |
LGTM label has been added. Git tree hash: 1a4874be2043ab7f19ce82a6f2d3349e3e307a6f
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JanKoehnlein Associated issue: #4988 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Description
Improves performance of
findAllWorkspaceAndInstances
by being more explicit what we ask forRelated Issue(s)
fixes the workspace part of #4988
How to test
unit test are fine
manual test positive
Release Notes
Documentation