-
Notifications
You must be signed in to change notification settings - Fork 1.3k
undo limit to fetch the first 100 user repos for New Workspace – EXP-554 #18644
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
components/server/src/bitbucket-server/bitbucket-server-repository-provider.ts
Show resolved
Hide resolved
this reverts 2f2b1ab effectively
f490b01
to
9f58430
Compare
We synced with @AlexTugarev when one tries to type in the search or collapse context url and then tries to reopen UI freezes. There are memory consumptions jumps between 20-150 Mbs. Alex is going to investigate it 🙏 |
@@ -41,14 +40,18 @@ export const useUserLoader = () => { | |||
retryDelay: (attemptIndex) => Math.min(1000 * 2 ** attemptIndex, 10000), | |||
cacheTime: 1000 * 60 * 60 * 1, // 1 hour | |||
staleTime: 1000 * 60 * 60 * 1, // 1 hour | |||
onSuccess: (loadedUser) => { | |||
setUser(loadedUser); | |||
refreshSearchData(); |
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.
@svenefftinge, maybe you recall why this was introduced?
We've noticed getSuggestedContextURLs
was called 3x on load of /new
. Explicitly updating on setUser
seems to be less obvious, but maybe there was some reason to introduce this? git history shows that there were many changes related to the transition from contexts holding/updating data to usage of query, and I wonder if this is a left-over.
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.
Does RepositoryFinder depend on any user properties that it should be retriggered? if not it should not be here? It looks rather strange way of doing, we would provide user state as a dependency to RepositoryFinder if we want to do it properly? cc @selfcontained
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.
Good question! 🤷🏻♂️
Maybe if you're pasting in a repository URL of a SCM provider you did not authorized with, and the context resolution fails, which will render the Authorize with provider
action? But even if that's the case, and we'd call setUser
on a success event, we should try to refresh search data from there, and not do it on every update, including the initial one.
I'll try to reproduce, and see how that's behaving.
} catch {} | ||
} | ||
} else { | ||
result = suggestedContextURLs.slice(0, 200); |
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.
While testing this, I was wondering if we could add a trailing element which indicates that this list is truncated.
/gh run recreate-vm=true Comment triggered a workflow runStarted workflow run: 6069966446
|
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.
It works the way better now! It stays under 10Mb for the page.
/unhold |
This reverts 2f2b1ab effectively.
We've also discovered, that rending of many items in the drop down becomes a bottleneck. To make it still work nicely, this PR introduces a limit of items to be rendered on New Workspace list. This limit is applied after filtering, so that you'd be able to start typing and find even repositories not visible by scrolling down.
Summary generated by Copilot
🤖 Generated by Copilot at f490b01
Increase the number of repos fetched from Bitbucket Server in the dashboard. Modify
getUserRepos
inbitbucket-server-repository-provider.ts
to use pagination.Related Issue(s)
Fixes EXP-554
How to test
See all repositories are loaded on New Workspace page if you've a connection to testing BBS with ~10K repos.
Documentation
Preview status
Gitpod was successfully deployed to your preview environment.
Build Options
Build
Run the build with werft instead of GHA
Run Leeway with
--dont-test
Publish
Installer
Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
If enabled this will build
install/preview
If enabled this will create the environment on GCE infra
Valid options are
all
,workspace
,webapp
,ide
,jetbrains
,vscode
,ssh
. If enabled,with-preview
andwith-large-vm
will be enabled./hold