Sourcegraph 3.6: Bitbucket Server plugin, search performance improvements, and quick links

Christina Forney

Sourcegraph is the standard developer platform for code search and navigation at many of the largest and most exacting technology companies. With Sourcegraph, every company has access to the same kind of tools that Google and Facebook developers use every day.

Deploy or upgrade: Local | AWS | DigitalOcean | Kubernetes cluster

Native code intelligence with Sourcegraph Bitbucket Server plugin

The Sourcegraph for Bitbucket Server plugin is now available for installation on Bitbucket Server instances to provide native code intelligence automatically. Code intelligence, previously available only through the browser extension, includes hovers, tooltips, go to definition, and custom line decorations when browsing and reviewing code on Bitbucket Server instances.

There are two configuration steps:

  1. Install the Sourcegraph for Bitbucket Server plugin
  2. Update the Bitbucket Server external service configuration in your Sourcegraph instance to include ”corsOrigin”: β€œ<bitbucket server url>”

30% indexed search latency improvement for small and medium instances

chart showing 30% improvement of search latency

We have improved our search algorithm's performance and reduced peak memory usage. Our benchmarks show that the 99th percentile latency of indexed searches in small to medium instances (less than 3000 repositories) is reduced by up to 30%. We will be continuing work to further benchmark and optimize Sourcegraph for our customers with 30,000+ repositories.

Quick links can now be added below the search bar on the home and search results pages. They can be used for quickly accessing frequently used URLs such as a code search, main repository, or external resources like your CI system or team documentation.

Quick links can be defined at the global, organization, and user level using the quicklinks field:

{
  // ...
  "quicklinks": [
    // An external doc resource
    {
      "name": "Sourcegraph docs",
      "url": "https://docs.sourcegraph.com"
    },
    // The main repository for your organization
    {
      "name": "Main repository",
      "url": "/github.com/sourcegraph/sourcegraph"
    },
    // A commonly used search (all CHANGELOG updates)
    {
      "name": "Changelog updates",
      "url": "/search?q=repo:%5Egithub%5C.com/sourcegraph/sourcegraph%24+file:changelog.md+type:diff"
    }
  ]
  // ...
}

New repository syncing support for Bitbucket Cloud

Sourcegraph 3.6 now supports repository syncing for Bitbucket Cloud. In this initial release, all repositories accessible by the token for the user (including from teams listed in the config) will be synced. Support for excluding repositories and for adding public repositories is coming in a future version.

Improved repository syncing progress UI

Applying an external service configuration change is now done in the background upon saving, with progress information available to admins by clicking the syncing status indicator on the global navigation bar.

The repository syncing status indicator announced in 3.5 has been improved to support instances with 30,000+ repositories and to only show the number of repositories remaining to be cloned. This UI feature is now shown to all site admins.

Exclude rules for GitHub repository sync configuration now support regexp

The github.exclude field for the GitHub external service now supports the use of regular expressions using {"pattern": "^topsecretrepogroup/.*"}.

Now, entire groups of repositories such as those containing secrets, can be excluded in a single regexp instead of manually entering the name or id for each repository.

Meet the team at GopherCon 2019!

Our remote-first team from around the world is coming together at GopherCon next week. We are looking forward to seeing our friends in the Go community, so make sure to find us while you’re there! You can find a Sourcegrapher by spotting someone wearing one of these hoodies:

Sourcegraph GopherCon hoodie

3.6 Changelog

Added

Changed

  • Updating or creating an external service will no longer block until the service is synced.
  • The GraphQL fields Repository.createdAt and Repository.updatedAt are deprecated and will be removed in 3.8. Now createdAt is always the current time and updatedAt is always null.
  • In the GitHub external service config and Bitbucket Server external service config repositoryQuery is now only required if repos is not set.
  • Log messages from query-runner when saved searches fail now include the raw query as part of the message.
  • The status indicator in the navigation bar is now enabled by default
  • Usernames and org names can now contain the . character. #4674

Fixed

  • Commit searches now correctly highlight unicode characters, for example 加. #4512
  • Symbol searches now show the number of symbol matches rather than the number of file matches found. #4578
  • Symbol searches with truncated results now show a + on the results page to signal that some results have been omitted. #4579

Thank you

Thank you to the many people who contributed to Sourcegraph since the last release!


Deploy or upgrade: Local | AWS | DigitalOcean | Kubernetes cluster

From the entire Sourcegraph team (@sourcegraph), happy coding!

Get Cody, the AI coding assistant

Cody makes it easy to write, fix, and maintain code.