-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[server] Add server API to list blocked repositories #11080
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
Conversation
/werft run with-preview 👍 started the job as gitpod-build-af-blocked-repo-api.5 |
findAllBlockedRepositories( | ||
offset: number, | ||
limit: number, | ||
orderBy: keyof BlockedRepository, |
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.
Here it might make sense to limit to the fields that actually are indexex, for instance by using orderBy: keyof Pick<BlockedRepository, "id | "blockUser">
or similar.
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 have no indexes on the table besides the PK. As mentioned yesterday #11036 (comment), mysql can't make use of indexes on urlRegexp
when testing with REGEXP
.
Do you think we should add indexes to support this admin search?
Left some comments. Please squash before merging! 🙃 |
/werft run 👍 started the job as gitpod-build-af-blocked-repo-api.7 |
/werft run 👍 started the job as gitpod-build-af-blocked-repo-api.9 🤞 |
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.
Code LGTM, tested and works! ✔️
/hold Please squash before merging! 🙃
* Create, list, delete.
31bf584
to
d05129e
Compare
/unhold |
Description
Add
adminGetBlockedRepositories
API tocomponents/server
to fetch the list of blocked repositories.This is a step towards using these endpoints to manage blocked repositories in the admin UI.
Related Issue(s)
Part of #11030
How to test
Follow the first 3 steps on [server] Read blocked repositories from database #11036 to add some blocked repositories.
Open the developer tools on the admin page for this preview environment.
Run:
setting
searchTerm
as appropriate (or omitting it entirely).Release Notes
Documentation
Werft options
/hold