Skip to content

chore/release: open the sourcegraph MinimumVersion bump PR automatically - #1400

Draft
marcleblanc2 wants to merge 1 commit into
mainfrom
automate-sourcegraph-src-cli-bump
Draft

marcleblanc2 wants to merge 1 commit into
mainfrom
automate-sourcegraph-src-cli-bump

Conversation

@marcleblanc2

@marcleblanc2 marcleblanc2 commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Instances only serve a new src-cli release after someone bumps MinimumVersion in sourcegraph/sourcegraph by hand (see sourcegraph/sourcegraph#14574). We forget: 8.0.0 shipped in September and sourcegraph.com still recommends 7.6.0.

This adds a sourcegraph_bump job to the release workflow. After a new latest release it opens the sourcegraph/sourcegraph PR for us, with @sourcegraph/platform as reviewer:

  • internal/src-cli/consts.go: MinimumVersion
  • dev/tool_deps.bzl: SRC_CLI_VERSION and the tarball checksums, read from the release's checksums.txt
  • MODULE.bazel.lock: bazel mod tidy

It can also be run by hand:

gh workflow run sourcegraph-bump.yml -R sourcegraph/src-cli -f version=8.0.0

Not verified: that BOT_CROSS_REPO_PAT can open PRs and request reviewers on sourcegraph/sourcegraph (the bot has write access), and how long a cold bazel mod tidy takes in Actions.

Test Plan

Ran dev/open-sourcegraph-bump-pr.sh locally with VERSION=8.0.0 against a sourcegraph checkout. It opened sourcegraph/sourcegraph#18330: same shape as sourcegraph/sourcegraph#14574 (3 files, 11 lines), bazel fetch pulled both tarballs with the new checksums, and the platform team was requested as reviewer. The Actions job itself only runs on a tag or manual dispatch, so it is untested until this merges.

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

Every Sourcegraph instance serves the src-cli version pinned in
sourcegraph/sourcegraph `internal/src-cli/consts.go` (`MinimumVersion`)
from `/.api/src-cli/version`, so a release is invisible to instances until
someone also hand-edits that constant, `dev/tool_deps.bzl`, and
`MODULE.bazel.lock`. That step is easy to forget: src-cli 8.0.0 shipped in
September and sourcegraph.com still recommends 7.6.0.

The release workflow now runs a `sourcegraph_bump` job after every new
latest release. It checks out sourcegraph/sourcegraph, applies the three
edits with the tarball checksums from the release's `checksums.txt`,
regenerates the lockfile with `bazel mod tidy`, verifies the pins with
`bazel fetch`, and opens a `src-cli-bump/<version>` PR with the platform
team as reviewer. The job lives in its own workflow so it can also be run
by hand for a release whose PR was never opened.

## Test Plan

Ran `dev/open-sourcegraph-bump-pr.sh` locally with `VERSION=8.0.0` and
`OPEN_PR=0` against a sourcegraph checkout at `16a472ea69e`: the diff
matched the shape of sourcegraph/sourcegraph#14574 (3 files, 11 lines,
including the regenerated `bzlTransitiveDigest` entries) and `bazel fetch`
pulled both tarballs with the new checksums. The GitHub job itself only
runs on a tag, so it has not been exercised yet.

Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a1a3bd-c619-7427-a499-52a596adc40b
@marcleblanc2
marcleblanc2 force-pushed the automate-sourcegraph-src-cli-bump branch from fcd446b to 8b22da1 Compare November 4, 2026 04:04
@marcleblanc2

Copy link
Copy Markdown
Contributor Author

Ran dev/open-sourcegraph-bump-pr.sh from this branch with VERSION=8.0.0 OPEN_PR=1 (the workflow_dispatch trigger is not available until this merges). It opened sourcegraph/sourcegraph#18330 with @sourcegraph/platform requested, which is the PR the job will open for each future release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant