Skip to content

Load recent repos and not all repos for BBS #18861

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

Merged
merged 3 commits into from
Oct 5, 2023
Merged

Conversation

selfcontained
Copy link
Contributor

@selfcontained selfcontained commented Oct 3, 2023

Description

This updates the repos we load for getSuggestedRepositories for Bitbucket Server to load the user's recent repositories instead of trying to grab up to 10k repos. With repository searching integrated we no longer need to load so many up front, and this should dramatically increase performance for BBS customers with a large number of repositories.

I've place this logic behind the repositoryFinderSearch flag since it depends on that functionality to be useful.

Initial repo results including a mix of most recent entries, but not ALL of the BBS test repos like it used to)
image

Summary generated by Copilot

🤖 Generated by Copilot at 84b26a0

This pull request adds a new method to the BitbucketServerApi class to query the Bitbucket Server API for recent repositories, and modifies the BitbucketServerRepositoryProvider class to use this method instead of querying all repositories. This is part of a feature to improve the repository selection experience for Bitbucket Server users in Gitpod.

Related Issue(s)

Fixes EXP-750

How to test

  • Join an org I’ve setup with our test Bitbucket Server git provider with this invite link.
  • Navigate to the Create Workspace page
  • Before you’ve searched in the repository selector, scroll down and ensure you don’t see any of the repo-n-nnn test repos (unless you've used one of them recently, then it should show up). These used to get loaded in the initial suggestions, they shouldn’t anymore.
  • Start typing repo- and you should see it search, and then pull back results matching those test repos.
  • This validates we’re no longer pulling back all of the repos for the initial suggestions, but that we can still find them with search.
  • You can also create a new repository on the test BBS server and you should see it show up in the initial results if you scroll through before searching.

Documentation

Preview status

Gitpod was successfully deployed to your preview environment.

Build Options

Build
  • /werft with-werft
    Run the build with werft instead of GHA
  • leeway-no-cache
  • /werft no-test
    Run Leeway with --dont-test
Publish
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer
  • analytics=segment
  • with-dedicated-emulation
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh. If enabled, with-preview and with-large-vm will be enabled.
  • with-monitoring

/hold

@selfcontained selfcontained changed the title Brad/recent-repos Load recent repos and not all repos for BBS Oct 4, 2023
@roboquat roboquat added size/M and removed size/S labels Oct 4, 2023
@selfcontained selfcontained marked this pull request as ready for review October 4, 2023 17:53
@selfcontained selfcontained requested a review from a team as a code owner October 4, 2023 17:53
Copy link
Member

@filiptronicek filiptronicek left a comment

Choose a reason for hiding this comment

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

Looks great! Initially, the load is quite fast, and I can confirm a repo I newly created is shown initially, although it is buried quite deep in the list (after about 2/3 of the initial results). Not sure how much we can do about it, though, and it seems ok to me.

:shipit:

@selfcontained
Copy link
Contributor Author

/unhold

@roboquat roboquat merged commit 306061d into main Oct 5, 2023
@roboquat roboquat deleted the brad/recent-repos branch October 5, 2023 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants