Sourcegraph 6.0.12741

This is a patch release for Sourcegraph 6.0.

Details

Fixes

  • Update cody web to 0.31.1 to fix issue with pasting linebreaks (#3696)

    fix: prompt templates should not fail when pasting linebreaks

Sourcegraph 6.1.1295

This is a patch release for Sourcegraph 6.1.

Details

Improvements

  • Cody Gateway Add thinking/reasoning support to Anthropic models

    Added support for chain-of-thought reasoning in Anthropic models, allowing users to see the model's thinking process for complex tasks.
    Backport 389bf9a4f2cf8ed7762cf8876b0efe4064e2b234 from #3507

Sourcegraph 6.1.376

This is a patch release for Sourcegraph 6.1.

Details

Improvements

  • Agents Simplify agent admin onboarding experience
    • You can now create a GitHub App with all the right permissions/events for code review agents. Previously, you had to manually customize the apps.
      Backport 87e8d77f464912cbd4356a8c3c39fba1d099e3b6 from #3473

Fixes

  • Code Intel Correctly handle document counts exceeding MaxInt32

    Fixes a bug in SCIP index processing for instances with a long history of processing large uploads.
    Backport 48e7b47898ee7710f12270c6861c335a2ef75f48 from #3595

  • TransformChanges.group.directory should ignore file names

    fix: transformChanges.group.directory now ignores file names
    Backport 3b76fe4ab146565b0e736231353b1e24f1468241 from #3576

  • Rel Check for and remove timescaledb extension

    fix(rel): remove TimescaleDB from existing database if found during upgrade to Postgres 16 on the codeinsights database.
    Backport 71b4af3d6faef054803db0151b2cc7b151bb1c0e from #3556

  • Security Allow the admin's HTTP auth provider headers in CORS preflight requests
    • HTTP header auth username and email headers, if configured, are no longer blocked by CORS.
      Backport 782b98a780dac335576b8f43affb4b1a10123882 from #3512
  • Do not close stream when tab is unfocused
    • Fixes an (unreleased) issue that could cause duplicate search results when switching between tabs.
      Backport 746a29a25d6e54dfe7ab38f70855a9f58a652426 from #3528
  • Agents Render errors as strings in agent run logs
    • Errors are now rendered as strings in agent run logs. Previously, they rendered as Source: {}, which wasn't helpful.
      Backport d1f18d280fc9d3a985a284c31e819412d2add606 from #3514

Other

  • Agents Allow non-site-admins to read agent endpoints [CODY-4962]

    GET access to /.api/agent/* endpoints for non-site admins
    Backport 321543c38aab312c7d3924e19617f9f247c3a5fa from #3504

Sourcegraph 6.1.0

o3-mini high available to Enterprise customers

OpenAI o3-mini high reasoning model now available for Enterprise customers. [...]

Prompt template UI changes

Streamlined prompt template UI with context options in @-mentions menu. [...]

Updates to model availability for Cody

Deprecating and removing older models from Cody. [...]

Details

Improvements

  • Cody o3-mini high available to Enterprise customers
  • Agents Allow code review agent to auto-run based on feature flags
    • Code review agents can now automatically run on GitHub Pull Requests (actions: opened and synchronize) based on a feature flag. Both boolean (true/false) and rollout (percentage-based ) feature flags are supported. For example, this means you can enable automatic reviews on 10% of all opened PRs.
  • Agents Report progress with GitHub Commit Status API
    • The Code Review Agent now reports live status with the GitHub Commit Status API making it possible to open Agent logs directly from GitHub.
  • Agents Code reviews deduplicate diagnostics from historical review [CODY-4743]

    Code reviews deduplicate diagnostics from historical reviews

  • Agents Review Diagnostic Feedback [CODY-4951]

    Adds a feedback UI for diagnostics within the Agents app.

  • Cody Gateway Add cache related token usage data to telemetry(CODY-4808)

    OPTIONAL; info at https://www.notion.so/sourcegraph/Writing-a-changelog-entry-dd997f411d524caabf0d8d38a24a878c

  • Release `sg upgradetest`
    • allow the upgradetest to be run locally without knowing the bazel invocation required to stamp the build etc
    • unlock local minor and major branch upgradetests
  • Agents Make review triggers configurable
    • You can now request review from the Review Agent by posting a pull request comment with a configurable substring
  • Prompt templates editor supports @ current mentions

    feat: prompt templates editor supports dynamic @ mentions

  • Agents Add Run API, view live progress on agent runs
    • Add GET /.api/agents/runs to list runs of an agent, and other related endpoints including the ability to view logs
  • Cody Gateway Roll out new Gemini Models

    Move Gemini 2.0 Flash from Experimental to GA, add Gemini 2.0 Flash-Lite Preview Experimental and Gemini 2.0 Pro Experimental

  • Rel Add init subsection to release.yaml
    • feat: add init cmd subsection to release.yaml parser
    • feat: add init section to release.yaml
  • Agents Make Review agent handle large diffs
    • The Review agent can now review larger diffs.
  • Agents Adds Conversation HTTP handlers and generated DB columns [CODY-4751]

    Adds HTTP handlers for /.api/conversations for creating and filtering conversations as well as a DB method for querying conversations.

Fixes

  • Agents Redirect to settings page after creating agents
    • Creating a new agent now redirects to the settings page for further setup
  • Source Fix inability to update Gerrit code host config URL

    Fix bug where the URL of a Gerrit code host connection could not be updated.

  • Source RepoSource.BitbucketServer.CloneURLToRepoName(): support more URL shapes

    The logic that translates Bitbucket clone URLs to repository names has been fixed to support:

    • URLs that have no scheme (like "bitbucket.sgdev.org/sourcegraph/sourcegraph")
    • SSH clone urls that don't have a ssh:// scheme prefix (like [email protected]:sourcegraph/sourcegraph.git)
  • Source Web: ensure list of external accounts has unique entry for each key

    A bug on the user's account security page that could result in duplicated / buggy entries has been fixed.

  • Agents Use globs instead of regexp for include/exclude filters
    • Rule include/exclude patterns are now interpreted as globs (*.go) instead of regexp (.*\.go). Negative include patterns like !*.go will be interpreted as exclude patterns, and vice versa.
  • Authentication Add missing allowSignup option to HTTP header auth provider

    fix/auth: "http-header" auth provider can "allowSignup": false to disable automatic account creation

  • Rel Fix migrator update check

    fix(rel): fix migrator upgrade check

  • Server checks reindex at 5.10 now
    • single docker server checks for 5.10-reindex.completed instead of 5.1-reindex.completed
  • Update cody web to 0.31.1 to fix issue with pasting linebreaks

    fix: prompt templates should not fail when pasting linebreaks

Other

Sourcegraph 6.0.2687

This is a patch release for Sourcegraph 6.0.

Details

Improvements

Fixes

  • Source Fix inability to update Gerrit code host config URL (#3361)

    Fix bug where the URL of a Gerrit code host connection could not be updated.

    (cherry picked from commit e6da1ceb9586bf109339f06220c1fdbbf570a6d9)

  • Source Gitserver: Unambiguously identify commit boundaries in git log

    Commit listing should work correctly for repos which contain arbitrary characters in commit messages. This also affects downstream functionality such as commit graph updates needed for precise code navigation.

    Backport 2eae8e1 from #3359

Other

  • [backport] chore/source: Update src-cli to 6.0.1 (#3365)
    • Update src-cli version to 6.0.1
  • Backport 3254 to 6.0.x

    Uncategorized

    Others

    • Backport 3254 to 6.0.x (PR #3300)

Sourcegraph 5.9.17785

This is a patch release for Sourcegraph 5.9.

Details

Fixes

  • Retry graphql queries that failed with 502

    fix: retry graphql queries that failed with 502

Other

Sourcegraph 6.0.0

Introducing a unified UI for chat and search

Unified interface combining AI-powered chat and code search. [...]

Details

Improvements

  • Code Search Introducing a unified UI for chat and search

    Combines Cody chat and Code Search into a single unified interface.

  • Rel Address pg12 -> pg16 drift with normalization
    • Normalize drift detection to handle for postgres 12 to 16 upgrade
  • Agents Make review agent configurable via program files
    • The Review agent now requires the program file .sourcegraph/review-agent.json with at least the content "{}" to enable posting Pull Requests review through the GitHub App. The JSON file may contain additional configuration options to override defaults of the ReviewRequestConfiguration object (see OpenAPI spec)
  • Cody Improve rendering of diagnostics as GitHub comments
    • The Review Agent now includes the rule ID when posting comments on pull requests. By default, the minimum review severity is errors (previously it was warning). When the minimum severity is overridden to be warnings, then the review comments will also include the severity.
  • Cody Make Review Agent rule detection configurable
    • Configure custom review rules for the Review Agent by adding *.rule.md files nested under .sourcegraph/ directories in any ancestor director of files in the diff.
  • Cody Sourcegraph Agents
    • New /.api/agents/** endpoints to manage the creation of Sourcegraph Agents (EAP feature).
    • New support to automatically review GitHub Pull Requests with a Review Agent via GitHub Apps (EAP feature).
  • Prompt templates now support specific @ mentions

    feat: prompt templates now support specific @ mentions

  • Cody First stab at a Code Review Agent API
    • New GET /.api/tools endpoint to list tool definitions for Sourcegraph API endpoints to use with the LLM /chat/completions endpoint for function calling.
    • New POST /.api/review/diff endpoint to get a list of code review comments given a git diff (including GitHub pull requests and Gitlab merge requests).
  • Propagate bestScoringLine and use that to center chunks in the search UI
    • For broad matches, we now center the best-scoring line in search results
  • Add tools support to LLM API (aka. function calling)
    • The /.api/llm/chat/completions endpoint now support function calling via the tools property. This feature works when using the LLM providers: OpenAI, Anthropic, Fireworks, AWS Bedrock, and Gemini.

    OPTIONAL; info at https://www.notion.so/sourcegraph/Writing-a-changelog-entry-dd997f411d524caabf0d8d38a24a878c

  • Code Intel Highlights json files with tree-sitter

    Improved highlighting for JSON files

Fixes

  • Rel Add handling of cp failure for postgres conf

    fix(rel): add handling for permissions errors when handling custom Postgres configurations in database containers.

    Backport 67bddb2 from #3041

  • Cody Make public OpenAPI docs work again


    Backport dc8deea005067145855b03a3344675386bc75be7 from #3078

  • Agents Remove leftover printf statement


    Backport 9639850855bb169f7dee4fbcff869c77c17f9328 from #3007

  • Agents Fix bug in AgentStore.ListByWebhookID and LLMChatClient
    • Fixed bug in Review Agent where it didn't post review comments even for small diffs Backport 4710b59 from #3019
  • Buildkite Pipeline generates images with specific cloud tags for S2 deployments

    NA - no customer facing changes

  • Std upgradetest with pv set doesn't go beyond targetVersion

    NA

  • Multitenant Add telemetry for when repositories are added or removed

    N/A

  • Code Search Add response telemetry for streaming search

    OPTIONAL; info at https://www.notion.so/sourcegraph/Writing-a-changelog-entry-dd997f411d524caabf0d8d38a24a878c

  • Authentication Improve session expiration behavior

    We are changing the behavior of session expiration to be a hard-cap instead of a rolling window. auth.sessionExpiry will now set a hard-limit on the sessions lifetime, and users will have to re-authenticate after this period. To preserve the previous behavior where sessions would be invalidated after they haven't been used for a while, a new configuration option named auth.maxSessionIdleDuration has been introduced that controls session expiration based on inactivity.

  • Authentication Don't expire sessions based on OAuth token validity

    Fixed an issue where Sourcegraph user sessions initiated via OAuth integrations did not respect the auth.sessionExpiry configuration and expired much earlier.

  • Code Intel Add DB constraints for syntactic jobs+policies

    In the site admin configuration for code graph policies, restricts the creation of policies for syntactic indexing to HEAD-only. This restriction may be lifted in the future. Policies for precise auto-indexing are not affected.

  • Code Search VSCode Search extension - auth panel not loading when filesystem is case sensitive
    • fixes 404 errors when trying to load "authSidebar.js" when the Code Search VS Code extension is used with the VSCode Remote SSH extension
  • Multi Tenant Fixes update seats modal max count validation

    OPTIONAL; info at https://www.notion.so/sourcegraph/Writing-a-changelog-entry-dd997f411d524caabf0d8d38a24a878c

  • Don't show current prompt in suggested area

    fix: don't show current prompt in suggestions

  • Multitenant Add telemetry event for when onboarding repository checks fail

    N/A

Other

Sourcegraph 5.11.6271

This is a patch release for Sourcegraph 5.11.

Sourcegraph 5.11.5234

This is a patch release for Sourcegraph 5.11.

Details

Other

  • [Manual Backport]: update shellcheck to 0.10.0

    NA

Sourcegraph 5.11.4013

This is a patch release for Sourcegraph 5.11.

Details

Improvements

  • Allow single container server to run postgresql-16
    • server: runs postgresql from /var/run/postgresql instead of /run/postgresql
      Backport 36c78cdf596e1b22079512931fa526346c2ec821 from #2711
  • Security Sign release images

    Publish signatures for release containers.
    Backport c11764be4adb377521e4067c4852953d7c434e24 from #2697

Fixes

  • Rel Recover from unclean database shutdowns in pgsql entrypoint

    fix(rel): fix issue with Postgres docker container failing upgrades after an unclean database shutdown.
    Backport ca5185ce2528b67e1ce6bcb5170f96d3699e11e0 from #2660

Other

  • Fix(Bitbucket Cloud): Fix pagination logic for bitbucket cloud permissions

    Fixed an issue where Bitbucket Cloud permission syncs could produce incomplete results, resulting in lacking permissions.
    Backport 389661481f0f0a2385ef4f78f4113ab6ba14f4d5 from #2699

Sourcegraph 5.11.3601

This is a patch release for Sourcegraph 5.11.

Sourcegraph 5.11.2732

This is a patch release for Sourcegraph 5.11.

Details

Fixes

  • Code Search Propagate disk space to NewFirecrackerWorkspace
    • Addresses errors similar to: failed to prepare workspace: failed to create ext4 filesystem in backing file: "mke2fs 1.45.5 (07-Jan-2020)\nThe file losetup: /var/lib/firecracker/loop-devices/workspace-loop-47749-3763347387: Warning: file is smaller than 512 bytes; the loop device may be useless or invisible for system tools.\n/dev/loop13 does not exist and no size was specified.\n": exit status 1
    • Affects reading and using the environment variable EXECUTOR_FIRECRACKER_DISK_SPACE
      Backport 22db2a97a0393cdd233a92da7ade96cd59bb99ef from #2562

Sourcegraph 5.11.0

Details

Improvements

  • More telemetry for batch changes

    feat(batches): more telemetry events

  • Extend prompt tags with pagination and increased limit

    feat: extend prompt tags with pagination and increased limit

  • Cody Gateway Add Gemini 2.0 Flash experimental model

    OPTIONAL; info at https://www.notion.so/sourcegraph/Writing-a-changelog-entry-dd997f411d524caabf0d8d38a24a878c

  • Source Add App-level GitHub App code host connections

    Sourcegraph now supports App-level GitHub App connections that aren't tied to a specific Installation ID.

  • Editing tags on prompts

    feat: editing tags on prompts

  • Management page prompt categories

    feat: management page prompt categories

  • Prompt categories nav for web

    feat: add tags as filter to prompts and their navigation

  • Code Search Correctly lower repo name regexes

    Special uppercase regex tokens are no longer inverted for repository name search. eg repo:foo\B correctly interprets \B as not at ASCII word boundary. Previously it would transform the expression into repo:foo\b.

  • Add prompt labels to the GraphQL API

    feat: add prompt labels to the GraphQL API

  • Release Run `sg cut` in buildkite to automate nightly pipeline test
    • release: nightly release pipeline is working
  • Collect contributor data

    feat: calculate contributor stats

  • Code Intel Configurable time and size limits for scip-syntax
    • Adds configurable limits for file size and parsing time for syntactic indexing

Fixes

  • Release Fix regressions from 5.10 release process
    • refactor and fix bugs in release test

    <details>

    ➜  sourcegraph git:(wg/rel/post-release-5-10-fixup) ✗ bazel run //testing/tools/upgradetest:sh_upgradetest_run -- all -svs 5.9.0 -mvs 5.8.0 -avs 5.8.0 -pv 5.10.2832
    INFO: Analyzed target //testing/tools/upgradetest:sh_upgradetest_run (0 packages loaded, 0 targets configured).
    INFO: Found 1 target...
    Target //testing/tools/upgradetest:sh_upgradetest_run up-to-date:
      bazel-bin/testing/tools/upgradetest/sh_upgradetest_run
    Aspect @@rules_rust//rust/private:clippy.bzl%rust_clippy_aspect of //testing/tools/upgradetest:sh_upgradetest_run up-to-date (nothing to build)
    INFO: Elapsed time: 1.165s, Critical Path: 0.72s
    INFO: 5 processes: 1 internal, 4 darwin-sandbox.
    INFO: Build completed successfully, 5 total actions
    INFO: Running command line: bazel-bin/testing/tools/upgradetest/sh_upgradetest_run testing/tools/upgradetest/go_upgradetest_/go_upgradetest cmd/migrator/image_tarball.sh cmd/frontend/no_client_bundle.image_tarball.sh docker-images/postgresql-16/image_tarball.sh docker-images/postgresql-16-codeinsights/image_tarball.sh internal/database/_codeinsights_squashed.sql internal/database/_codeinsights_tenant_data_squashed.sql internal/database/_codeintel_squashed.sql internal/database/_codeintel_tenant_data_squashed.sql internal/database/_frontend_squashed.sql internal/database/_frontend_tenant_data_squashed.sql internal/database/_schema.codeinsights.json internal/database/_schema.codeinsights.md internal/database/_schema.codeintel.json internal/database/_schema.codeintel.md internal/database/_schema.json internal/database/_schema.md all -svs 5.9.0 -mvs 5.8.0 -avs 5.8.0 -pv 5.10.2832
    Loaded image: migrator:candidate
    Loaded image: frontend:candidate
    Loaded image: postgresql-16:candidate
    Loaded image: postgresql-16-codeinsights:candidate
    👉 Upgrade test ...
    Latest stable release version:  5.10.2832
    Latest minor version:  5.10.0
    Target version:  5.10.2832
    Migrator image used to upgrade:  sourcegraph/migrator:5.10.2832
    Standard Versions: [5.9.0]
    Multiversion Versions: [5.8.0]
    Autoupgrade Versions: [5.8.0]
    auto:  5.8.0
    mvu:  5.8.0
    std:  5.9.0
    --- 🕵️  Standard Upgrade Tests:
    ✅ 5.9.0 Passed -- 1m16.366600375s
    --- 🕵️  Multiversion Upgrade Tests:
    ✅ 5.8.0 Passed -- 1m17.939247958s
    --- 🕵️  Auto Upgrade Tests:
    ✅ 5.8.0 Passed -- 1m24.54765675s
    

    </details>
    Backport 8dc831953f43bbe9f6b9cb5467ef263b757425ac from #2374

  • Cody Add cody.notices to json schema

    OPTIONAL; info at https://www.notion.so/sourcegraph/Writing-a-changelog-entry-dd997f411d524caabf0d8d38a24a878c

  • Multitenant Add rote tests for workspaceGitHubAppRepositoryResolver

    N/A

  • Mulitenant Add rote tests for repositoryChecker implementations

    N/A

  • Mulitenant Add rote test for workspaceGitHubAppAccountResolver

    N/A

  • Code Intel Reports symbols for TypeScript type aliases

    Properly report symbols for TypeScript type aliases

  • Mulitenant Add test suite for (s *serviceImpl) listRepositoriesSearch

    OPTIONAL; info at https://www.notion.so/sourcegraph/Writing-a-changelog-entry-dd997f411d524caabf0d8d38a24a878c

  • Mulitenant Add test suite for (r *workspaceGitHubAppResolver) ListUserGitHubRepositories

    OPTIONAL; info at https://www.notion.so/sourcegraph/Writing-a-changelog-entry-dd997f411d524caabf0d8d38a24a878c

  • Remove surplus typename

    fix: remove surplus typename

  • Multitenant Add test suite for (r *workspaceGitHubAppResolver) ListPublicGitHubRepositories

    N/A

  • Code Search Executors: set the user/group on the job spec only if configured.
    • Also validates KUBERNETES_RUN_AS_USER and KUBERNETES_RUN_AS_GROUP.
    • Must be integers in the range [0, 2147483647].
  • Cody Switch to Snowball stopwords

    Narrowed down the stopwords list used in Cody context, to fix an issue where we could miss highly relevant files.

  • Cody Disable reranking for airgapped instances

    Fixes a bug in Cody context where airgapped instances would attempt to use the reranker model, which increased the context retrieval latency.

Other

  • Security Update src-cli to version 5.11.1
    • Update src-cli version to 5.11.1
      Backport 2721fd9106eb033afe4cca96164f7ecc5e0b6f88 from #2444
  • Bitbucketcloud: Fix repo perms syncing for inherited permissions and groups

    Fixed an issue with Bitbucket Cloud permission syncing where inherited permissions and group permissions were not correctly reflected.

  • Security Update src-cli to version 5.11.0
    • Update src-cli version to 5.11.0
  • Reapply "feat(cody-gateway): add Gemini 2.0 Flash experimental model"

    OPTIONAL; info at https://www.notion.so/sourcegraph/Writing-a-changelog-entry-dd997f411d524caabf0d8d38a24a878c

    Cody Gateway: add support to Google's Gemini 2.0 Flash Experimental model.

  • Revert "feat(cody-gateway): add Gemini 2.0 Flash experimental model

    OPTIONAL; info at https://www.notion.so/sourcegraph/Writing-a-changelog-entry-dd997f411d524caabf0d8d38a24a878c

  • Bugfix: anchor include patterns for symbol tree
    • Fixed a web app bug that could cause symbols to be shown in the symbol tree for files that share a name with the viewed file
  • Update Calendar Release Notifications

    N/A

  • Authz: Adjust default settings for perms syncing

    The default values for repo permission syncing have been adjusted. If you specified overrides, this means no change on your instance.

    Adjusted defaults:

    permissions.syncScheduleInterval is now 60s instead of 15s, in favor of scheduling more jobs at once (see below).

    permissions.syncOldestUsers and permissions.syncOldestRepos have been adjusted to 100 from 10 to schedule pending permission sync jobs faster.

    permissions.syncJobCleanupInterval has been bumped from every minute to every hour. Cleaning completed jobs is purely to prevent unbounded growth and every minute was more aggressive than necessary.

    The default concurrency for repo- and user-centric sync jobs has been bumped from 1 to 5 to account for larger instances. Historically, GitHub prevented concurrent API access in secondary rate limiting but this has been lifted to be much more lenient long ago. permissions.syncReposMaxConcurrency has also been introduced to compliment permissions.syncUsersMaxConcurrency.

Sourcegraph 5.10.3940

This is a patch release for Sourcegraph 5.10.

Details

Improvements

Fixes

  • Database Do not log DSN secrets when changed

    We no longer log the postgresql DSN when it changes. Previously this could contain the secret PGPASSWORD.
    Backport 2bd9c09969fff536c6fb29108656658d3f875047 from #2272

Sourcegraph 5.10.2832

This is a patch release for Sourcegraph 5.10.

Details

Improvements

Fixes

  • Rel Remove `--link` and add optional args env var

    fix(rel): change pg_upgrade behavior to use copy instead of hard links
    Backport 13caa807d96dd4b5dd872fec2a38322d1888134a from #2192

  • Rel Remove -x flag in readiness check on database containers

    fix(rel): address issue with readiness check outputting passwords to logs.
    Backport 655a739e8e791d7aab1977d2c26543a3a4871809 from #2132

Other

  • Context: switch to Snowball stopwords (#2223)

    Narrowed down the stopwords list used in Cody context, to fix an issue where we could miss highly relevant files.

    Backports https://github.com/sourcegraph/sourcegraph/pull/2223

  • Bugfix: do not load commit history eagerly
    • Fixes a bug where the new web app may consume an outsized amount of backend resources when browsing large repositories.
      Backport 79546146e2bfa4e3fcee1a8e825ad48823c8cd77 from #2197
  • Ci Bzlmod migration for rules_syft


    Backport fbf92aedbb81f00766d7107015b7697352b5c482 from #1812

Sourcegraph 5.10.1164

This is a patch release for Sourcegraph 5.10.

Details

Fixes

  • Code Search Disable zoekt go-git optimization by default

    Disabled an indexed search optimization which would skip files accidentally (ZOEKT_DISABLE_GOGIT_OPTIMIZATION=true).
    Backport 34ada948bdcee3d75499c98f4db5c32986943e88 from #2050

Sourcegraph 5.10.0

Details

Improvements

  • Release Handle postgres version upgrades in upgrade test
    • refactor upgradetest
    • introduce proper handling of the postgres version upgrade
      Backport 9ccdf4200e3e08cea56bffe5779ca8a6cda2909c from #1894
  • Code Search Include file paths in reranker items

    Cody context now incorporates filename information in reranking, improving context quality when the reranker is enabled.

  • Sg Add workspaces common operations
    • support get, list, and delete workspaces to sg
  • Rel Add pg16 and pg16 codeinsights to published images

    feat(rel): Add Postgresql 16 and Postgresql 16 codeinsights images to published image list.

  • Rel Add pg 16 codeinsights entrypoint and tests

    feat(rel): Add self updating to Postgres 16 codeinsights db image.

  • Rel Add pg 16 entrypoint and tests

    feat(rel): Add self updating to Postgres 16 container image.

  • GraphQL Add support for reading GitHub App Installation repos from GitHub REST API

    A new GraphQL query, GithubAppRepositoriesForInstallation, has been added that provides a paginated list of all the GitHub repositories that are accessible to the GitHub app with the provided installation id.

  • Multitenant Add helper routine for instantiating github app from multitenant credentials

    A simple helper routine to the multitenantenv package that automatically populates a github app struct with the provided validated credentials.

  • Cody Added `systemPreInstruction` (CODY-4032)
    • adds systemPreInstruction to the modelConfiguration key in site admin config that allows injecting a prelude prompt into every chat request for an enterprise
  • GitHub Add client ID support for GitHub App authentication

    The GitHub app authentication package now supports authenticating a GitHub app via the OAuth client ID following the announcement of https://github.blog/changelog/2024-05-01-github-apps-can-now-use-the-client-id-to-fetch-installation-tokens/

  • GraphQL Add endpoint for getting github app installations scoped by user

    A new graphql endpoint has been added, GithubAppInstallationsForUser, that returns installation information for the global GitHub multi tenant app when running in multitenant mode.

  • Source Multitenant: add worker job for inserting github multitenant app credentials

    A new worker job has been added that updates the database with the credentials for the global github app when running in multitenant mode.

  • Dev Adding sg command to request Entitle bundles

    Feat

    Dev

    • Adding sg command to request Entitle bundles #1370
  • Internal Add pagination support and test for GetUserInstallations

    The Github API client's GetUserInstallations route, which lists of GitHub App installations the user has access to, now has pagination support.

  • Multitenant Use default cookie for github app oauth login

    The routing logic for multitenant mode now has a new route that uses the "last seen tenant" cookie to route github app login authorization callbacks to the appropriate tenant.

  • Switch to buildkite for nightly release pipeline

    N/A

  • Cody Support openai predicted outputs
    • Cody Gateway: add support for OpeanAI predicted outputs
  • Rel Add wolfi postgres 16 codeinsights-db base image

    feat(rel): Add Postgres 16 CodeInsights Wolfi image

  • Rel Add wolfi postgres 16 base image

    feat(rel): Add Postgres 16 Wolfi image

  • Cody Gateway Add gpt-4o-mini model
    • Cody Gateway: add gpt-4o-mini to Cody Gateway allow list
    • Cody Gateway: add gpt-4o-mini to DotCom models list
  • Add dynamic filters and aggregation for repo metadata and topics
    • Added dynamic filters and the ability to aggregate by repo metadata and repo topic
  • Make filters sidebar collapsible
    • Search filters sidebar is now collapsible
  • Render mdx as markdown
    • Render .mdx files as markdown

Fixes

  • Rel Fix oob migrations hanging

    NA
    Backport a943412a99852332f921b52a0ee3179dc3331d20 from #1958

  • Code Search Consistently marshal SearchTypeRegex as regexp

    We sometimes would emit patternType:regex instead of patternType:regexp. We now always do regexp as well as treating regex as an alias for regexp.
    Backport a095b39ac39cfcbe3526ecf85ed6d50cb5fa3d9d from #1808

  • Release Correct views drift in postgres 16
    • add migrations to handle database drift caused during postgres 12 to postgres 16 upgrade
  • Rel Add vacuum after reindex in Postgres upgrade script

    fix(rel): Add vacuum to Postgres upgrade process

  • Release Fix drift check in local upgradetest
    • Fix bug in local upgrade test preventing final stage drift check via private monorepo
  • Cody Sync allowed models in dotcom user rate limits with models.json

    OPTIONAL; info at https://www.notion.so/sourcegraph/Writing-a-changelog-entry-dd997f411d524caabf0d8d38a24a878c

  • Security Do not expand env vars in executor logs

    This change reduces the risk of secrets being emitted in executor logs even if there are bugs in the secret redaction logic.

  • GraphQL Refactor getGithubAppFromEnvvar to use multitenantEnv.Config.AsGithubApp

    The logic in the new multitenant GraphQL resolvers has been reworked to use the new helper methods introduced in the Multitenant GitHub app configuration logic introduced in https://app.graphite.dev/github/pr/sourcegraph/sourcegraph/1758/.

  • Database Drop unique slug contraint from github app table

    The github_apps table has removed an erroneous unique constraint that accidentally incorporated an app's slug (which is mutable) as part of the unique identifier for an app.

  • Rel Install `sg` in the nightly pipeline GHA

    N/A

  • Batch Changes Titles now break over multiple lines if they are too long

    fix(batches): titles now break over multiple lines if they are too long

  • Code Insights Fix incorrect line counts in non-default config

    Code insights should show correct line counts when enhanced language detection is turned off (note: this setting is on by default).

  • Source p4-fusion now decodes encode file paths from Perforce
    • When cloning Perforce depots, Sourcegraph will now decode encoded paths correctly (paths that include characters like @ and #)

Other

Sourcegraph 5.9.1590

This is a patch release for Sourcegraph 5.9.

Details

Fixes

  • Cody Fix broken homepage redirect for cody only plans

    When using an instance with a Cody-only license, accessing the home page now correctly redirects you to /cody/dashboard, instead of a non-existent /cody page.
    Backport a4cb5a0723bad18e1c215d81231db457d1abfbdb from #1621

Other

  • Release Remove extra v identifier for version in artifact exporter

    OPTIONAL; info at https://www.notion.so/sourcegraph/Writing-a-changelog-entry-dd997f411d524caabf0d8d38a24a878c
    Backport c4b838103ce2f71e7591ade720e8bdf17f9a5b39 from #1490

  • Azure: Add support for repositoryPathPattern
    • Added support for the repositoryPathPattern property to Azure DevOps code host connections.
    • Fixed an issue where Azure DevOps repo names included a port number - aligning with other code host connection implementations
      Backport 762bd89a12825ff05de98d9c2d8adfcf1ef5bf4a from #1543

Sourcegraph 5.9.347

This is a patch release for Sourcegraph 5.9.

Sourcegraph 5.9.45

This is a patch release for Sourcegraph 5.9.

Details

Other

Sourcegraph 5.9.0

Promoted Prompts for VS Code and Cody Web

Admins can now highlight prompts at the top of the Prompt list to encourage best practices. [...]

IP-based permissions support for Perforce

Admins can now enforce Perforce access restrictions based on user IP addresses. [...]

Details

Improvements

  • Cody Gateway Add new claude-3-5-haiku-latest model

    OPTIONAL; info at https://www.notion.so/sourcegraph/Writing-a-changelog-entry-dd997f411d524caabf0d8d38a24a878c

    Cody Gateway: add new claude-3-5-haiku-latest & claude-3-5-opus-latest models to Cody Gateway allow list Cody Gateway: add new claude-3-5-haiku-latest dotcom models list
    Backport 11e7481ba3c810ae5b47d32b8cf32066e2f0b2bb from #1470

  • Cody Add more API docs content

    OPTIONAL; info at https://www.notion.so/sourcegraph/Writing-a-changelog-entry-dd997f411d524caabf0d8d38a24a878c

  • Cody Add embedded API docs via OpenAPI/Redocly
    • New OpenAPI API docs within the instance at the URL $SRC_ENDPOINT/api/openapi/public. Alternatively, reach the page at "User > Settings > OpenAPI Reference".
  • Analytics Log estimated LLM cost telemetry (CODY-4007)
    • Adds cost estimates to the ModelConfiguration returned by .api/llm/supported-models.json
    • Adds llmTokenUsageCostEstimate telemetry value with estimates of each requests LLM cost in pennies
  • Analytics Add check for PGDATASOURCE

    OPTIONAL; info at https://www.notion.so/sourcegraph/Writing-a-changelog-entry-dd997f411d524caabf0d8d38a24a878c

  • Administration Site config 'telemetry: { disableLocalEventLogs }' to disable event_logs

    Long-term local retention of user telemetry as 'event logs' can now be disabled entirely via the telemetry: { disableLocalEventLogs } site configuration.

  • Add embedded file snippet page
    • Added embeddable page for file snippets
  • Cody Gateway Deprecate old claude 3.5 sonnet

    OPTIONAL; info at https://www.notion.so/sourcegraph/Writing-a-changelog-entry-dd997f411d524caabf0d8d38a24a878c

  • Cody Add Claude 3.5 Sonnet (Latest) & Claude 3 Opus (Latest)

    OPTIONAL; info at https://www.notion.so/sourcegraph/Writing-a-changelog-entry-dd997f411d524caabf0d8d38a24a878c

  • Sub_repo_perms Add conditional logging for seeing if sub_repo_permisisons are working

    The sub repository permissions implementation now emits logs that describe the rules that were evaluated for a given request whenever tracing is enabled. (We limit these logs for only when tracing is enabled since they can be quite verbose).

  • Analytics Add source.server.server_client.user_agent to telemetry payload
    • Add the sourcegraph API client user-agent to telemetry payload types under source.server.server_client.user_agent.
  • Cody Expose token usage in the LLM API
    • The /.api/completions/stream API now includes used input/output tokens and the upstream model name in the response body when using the query parameter api-version=5 or higher. Does not apply to: Vertex Anthropic, Azure OpenAI (mo model name, and no token usage in streaming response), Gemini (no model name in streaming response)
    • LLM chat completions now support stream: false when using Azure OpenAI and OpenAI-compatible providers.
  • Analytics Propagate new x-sourcegraph-api-client-* headers to request clients
    • Propagates new X-Sourcegraph-API-Client-Name and X-Sourcegraph-API-Client-Version headers to request clients
  • Ci Record Test infrastructure failures
    • add library that writes to TEST_INFRASTRUCTURE_FAILURE_FILE if it is defined for test failures
  • Batch Changes Show name of additional fields that cause errors

    feat(batches): show name of additional fields that cause errors

  • Cody Add support to format raw API responses for Cody
    • The raw HTTP API now accepts the query paramter format=cody or header Accept: application/cody to render files and directories as context items for Cody. Example request path: /github.com/sourcegraph/cody/-/raw/agent/src/index.ts?format=cody.

Fixes

  • Batch Changes Enable request splitting by default

    fix(batches): enable request splitting by default

  • Source Correct Name() documentation for gitserver's ReadDirIterator

    The documentation for gitserver's ReadDir method has been clarified to reflect that the return iterator's Name() method returns the full path of the file, as opposed to just the basename.

  • Analytics Only log Cody API events to a remote data store, do n…

    OPTIONAL; info at https://www.notion.so/sourcegraph/Writing-a-changelog-entry-dd997f411d524caabf0d8d38a24a878c

  • Codyapi Restrict audit log retrieval to site admins only

    OPTIONAL; info at https://www.notion.so/sourcegraph/Writing-a-changelog-entry-dd997f411d524caabf0d8d38a24a878c

  • Dev Correctly propagate error key-value pairs

    Fixes a bug where logs and traces were sometimes missing key-value pairs recorded alongside errors.

  • Source Clarify exclude docs in github connection schema to say that individual expressions within block are `and`-ed together

    The documentation for the "exclude" section in the github code host connection schema has been clarified to explain that each block is OR'd together, and the expressions within each block are AND'd together.

  • Source Multiple GitHub external accounts to the same URL now refresh correctly
    • When there are multiple auth providers configured that point to the same GitHub URL, as can be the case when using private GitHub Apps, user external account tokens will now refresh correctly.
  • Code Search (new web ui) Make blob view readonly

    Prevents default browser shortcuts from modifying the file content locally.

  • Batch Changes Handle spec being nil for suffix salt

    fix(batches): handle spec being nil for suffix salt

  • Code Intel Add more limits in auto-indexing inference code

    Introduces new limits for auto-indexing inference to reduce the risk of continuously growing auto-indexing queues.

    • The number of jobs spawned per round of auto-indexing inference per repo is capped (default: 100) to reduce risk of clogging of auto-indexing queues. Excess jobs will be discarded.
    • The number of paths inspected for a single round of auto-indexing inference per repo is capped (default: 500) to reduce risk of timeouts. Excess paths will be discarded.
  • Code Intel Handle annotated tag hashes passed as 'commit' for uploads

    Fixes handling of SCIP uploads when the hash passed to the -commit flag of src-cli corresponds to the hash of an annotated tag instead of the hash of a commit. Previously, these uploads were not accessible for code navigation.

  • Source The sync of a GitHub repositoryQuery failing will no longer cause repos to be deleted
    • GitHub code host connections using repositoryQuery will no longer delete repositories if the sync fails for reasons like a GitHub outage or a token expiring.
  • Batch Changes Enable GQL request splitting via BATCH_CHANGES_REQUEST_SPLITTING

    fix(batches): enable GQL request splitting via BATCH_CHANGES_REQUEST_SPLITTING

  • Codyapi Add usage to completions/chat (CODY-3498)

    Added token usage information to .api/llm/chat/completions

  • Code Nav Trigger hovers for all programming languages

    Fixes a bug where hovers were not triggered for less mainstream languages like F#, Standard ML, Visual Basic, Pkl, Hack, MATLAB etc.

  • Code Search Exclude content filters from phrase boosting

    This fixes a bug where we would apply a phrase boost if a content: filter was specified with keyword search enabled. This led to inconsistent behavior (regexp vs keyword search) and it also rendered the content: filter ineffective, because we ran a general text search instead of a just a content search.

  • Code Monitor Fail monitors with missing/unverified primary email address

    fix(code-monitor): fail monitors with missing/unverified primary email address

  • Release Add stitched migration graph override (#935)

    NA

  • Batch Changes Display "Deleted Namespace" instead of throwing an error

    fix(batches): display "Deleted Namespace" instead of throwing an error

  • Code Intel Propagate error collector to fix retention tab GraphQL API call

    Fixes a bug where the retention tab for precise indexes would show a nil pointer exception instead of retention information.

Other

  • Release: Prep stitched migration graph for release (#1388)

    n/a

  • Enable reranker by default if Gateway is enabled

    Cody Chat: the context engine now uses the reranker by default everywhere where Cody Gateway is enabled.

  • Add code llama 7B model for ab test
    • adding code llama 7B for completions
  • Hide auto submit checkbox and add promoted badge

    OPTIONAL; info at https://www.notion.so/sourcegraph/Writing-a-changelog-entry-dd997f411d524caabf0d8d38a24a878c

  • Worker: Fix configuration error reporting

    A bug in configuration validation in the worker service has been fixed. Configuration mistakes are now correctly reported again.

  • Creating/Editing Prompts Re-design
    • The prompt creation/edit page has been redesigned.
  • Add recommended flag to Prompt Templates
    • Adds ability to mark prompts as recommended and then sort the recommended prompts at the top.
  • Analytics Report token usage per request to telemetry

    Added LLM token usage telemetry

  • Code Search Remove all non-single job pod code from Executors on Kubernetes.
    • The environment variable KUBERNETES_SINGLE_JOB_STEP_IMAGE is now KUBERNETES_JOB_STEP_IMAGE.
    • Both environment variables are read, with preference given to KUBERNETES_JOB_STEP_IMAGE, to preserve backward compatibility, but reading of KUBERNETES_SINGLE_JOB_STEP_IMAGE may be removed in a future version.
  • Bugfix: escape spaces in repo filter names
    • Fixed a bug that would cause filters added from the search sidebar to not be correctly escaped
  • Add prompt mode
    • Adds mode (CHAT, EDIT, INSERT) to prompt.
  • Feature: add internal/tracelog: a log.Logger that only logs if tracing is enabled

    Added a new internal/tracelog package that provides a conditional logger for tracing. This logger only logs when tracing is enabled, improving performance by reducing unnecessary logging.

  • Feature/source: implement core logic for parsing / evaluating Perforce IP addresses for sub repo permissions

    For the Perforce IP permissions implementation, this PR introduces machinery that implements the ability to parse the IP address expressions from the perforce protections table and compare them against the user's IP address (that's advertised from the incoming X-FORWARDED-FOR header.

    Namely, this PR:

    • Introduced parsePerforceIPString, which parses Perforce IP strings (e.g., CIDR expressions, specific IP addresses) into an ipMatcher for IP validation.

    • Implemented multiple ipMatcher types, including:

      • addrMatcher for exact IP matches.
      • cidrMatcher for checking IPs within a CIDR range.
      • alwaysTrueMatcher for wildcard * expressions.
    • Added toggleableIPMatcher, which either enables or disables IP enforcement based on site configuration settings.

    • Created matcherCache for caching recent IP string to ipMatcher translations, improving efficiency.

    • Updated NewRequestClientIPSource to properly derive IP from the x-forwarded-for header.

  • (feature): site-config: add ipParseCacheSize to schema for enforce IP restrictions schema

    Added a new ipParseCacheSize configuration option for sub-repo permissions to control the caching of Perforce "Host" to IP address translations.

  • Feature/site-config: add site configuration setting for enforcing IP restrictions

    Added enforceIPRestrictions setting to the SubRepoPermissions section in site configuration, allowing IP-based enforcement using the X-FORWARDED-FOR header.

    Updated JSON schema to require SubRepoPermissions to be enabled when enforceIPRestrictions is enabled.

    Added validation in Perforce external service configuration to ensure IgnoreRulesWithHost and enforceIPRestrictions cannot be enabled simultaneously.

    Updated internal implementation to associate each Perforce rule with an IPMatcher for IP-based rule enforcement.

  • Feature/plumbing: sub_repo_perms: do pumbling to thread comparing IP addresses alongside paths

    This PR introduces logic for IP-based permissions in the authz provider for Perforce: 1. Modified interfaces in internal/authz/sub_repo_perms.go to accept caller's IP address for enforcing IP permissions. 2. Introduced a new IPSource interface to provide IP addresses for sub-repo permissions implementation. 3. Updated rule implementation to include an IPMatcher for comparing provided IP addresses with Perforce rule IP addresses.

    This change lays the groundwork for supporting IP-based permissions in Perforce authz provider.

  • Add autoSubmit & includeViewerDrafts to Cody prompts
    • Adds options to set prompts to "Auto Submit", which would automatically execute the prompts in one-click.
  • Fix bug where text pushed buttons out of the container
  • Add ability to duplicate existing prompts
    • Users can now duplicate existing prompts.
  • Security Update rules_apko and fix issues with sg wolfi v2
    • Build containers using latest version of apko and rules_apko
  • Blob View: Ensure copy button copies full path and not displayed path
    • Fixes a bug where certain copy path buttons were only copying the visible path and not the full path of a file.