Sourcegraph 3.39 release

Sourcegraph 3.39 is now available! Here are some highlights from this release:

Onboard developers fast with Notebooks

Built with onboarding in mind, the Notebooks feature allows you to integrate search results and Markdown to enable documentation that is easy to create and doesn't get stale. The feature is inspired by the Jupyter Notebooks project and features four unique block types, an intelligent notepad for creating notebooks on the fly, and deep integration with Code Search, so you can always find the code you need.

Web-based notebooks are the easiest way to create and share new documentation with your team, but we also support file-based notebooks via a special .snb.md file type. With file-based notebooks, you can transform your existing documentation and augment it with Sourcegraph query blocks. You can also embed notebooks on any web page, enabling easy integration with your own knowledge management systems, so you can meet your developers where they are.

Notebooks are now available for free for all users in Sourcegraph 3.39, and you can also explore some of our public notebooks on Sourcegraph Cloud with no account required.

To learn more, read the Notebooks docs.

Filter Code Insights using search contexts

Image of a search context being used to filter a code insight

Search contexts are pre-set repository groups that make it easy to scope your Sourcegraph searches, and you can now apply search contexts to Code Insights as well. Then, by updating your search contexts, your filtered insights will automatically update to reflect the changes as well. Using search contexts is a fast, succinct way to reuse complex repository filters.

In this initial release, you can use the repo: or -repo: field of query-based search contexts to filter your insights. We're continuing to explore enabling other capabilities of search contexts to use as filters. To learn more, read the search context filters docs.

Code Insights no longer requires a Timescale database

Code Insights can now be used with managed database solutions that do not support Timescale, like Amazon RDS. It now uses native PostgreSQL.

This migration has been applied over 3.37 and 3.38, and should be seamless if you are running infrastructure as described by the official Sourcegraph deployment repositories. If you have a customized deployment, you may need to incorporate some changes into your configuration (more details and examples here).

Any managed database solution that supports the official Sourcegraph PostgreSQL version requirements is now suitable for Code Insights. Migration from a self-hosted database is not performed automatically, and will need to be performed by a Sourcegraph admin at your own discretion.

Local navigation for Java code is now faster and more accurate

We've added tree-sitter to our search-based Code Intelligence, meaning that local navigation for Java is now faster and more precise.

Search your Go dependencies natively in Sourcegraph

Dependencies search, introduced for NPM in Sourcegraph 3.38, allows you to quickly search through your repository dependencies for faster incident and vulnerability resolution. Dependencies search has been expanded to now support Go dependencies as well. You can read the dependencies search docs here or try it out yourself on Sourcegraph Cloud.

Changelog highlights

  1. Repositories
    The repository page has been redesigned and now includes information such as recent commits and Code Intelligence availability. To use this feature, enable the `new-repo-page` feature flag.
  2. Code Insights
    The Code Insights GraphQL API now accepts search contexts as filters. Using a search context as a filter will extract the `repo` and `-repo` search query fields from the context and apply it, allowing you to scope your insights and only return data relevant to the repositories you care about.
  3. Code Insights
    The Code Insights commit indexer can now index commits in smaller batches to ensure it succeeds for repositories with many commits. Set the number of days per batch in the site setting `insights.commit.indexer.windowDuration`. A value of 0 (default) will disable batching.
  4. Code Insights
    Code Insights series data is now sorted by semantic version and then alphabetically to make it easier to understand data in order of earliest to latest versions.
  5. Search
    We've optimized search patterns containing `and` and `not` expressions. These kinds of queries now generally execute 10 times faster than before. Previous cases where no results were returned due to hitting the file limit should now work and return results quickly.
  6. Admin
    Built-in authentication (i.e. username and password) now supports account lockout after consecutive failed sign-in attempts. New config options have been added under `auth.lockout` to customize the threshold for failed attempts and length of lockouts.

Get Cody, the AI coding assistant

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