Repository navigation
chore/release: open the sourcegraph MinimumVersion bump PR automatically - #1400
Draft
marcleblanc2 wants to merge 1 commit into
Draft
marcleblanc2 wants to merge 1 commit into
marcleblanc2 wants to merge 1 commit into
Conversation
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
force-pushed
the
automate-sourcegraph-src-cli-bump
branch
from
November 4, 2026 04:04
fcd446b to
8b22da1
Compare
Contributor
Author
|
Ran |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Instances only serve a new src-cli release after someone bumps
MinimumVersionin 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_bumpjob to the release workflow. After a new latest release it opens the sourcegraph/sourcegraph PR for us, with@sourcegraph/platformas reviewer:internal/src-cli/consts.go:MinimumVersiondev/tool_deps.bzl:SRC_CLI_VERSIONand the tarball checksums, read from the release'schecksums.txtMODULE.bazel.lock:bazel mod tidyIt can also be run by hand:
Not verified: that
BOT_CROSS_REPO_PATcan open PRs and request reviewers on sourcegraph/sourcegraph (the bot has write access), and how long a coldbazel mod tidytakes in Actions.Test Plan
Ran
dev/open-sourcegraph-bump-pr.shlocally withVERSION=8.0.0against a sourcegraph checkout. It opened sourcegraph/sourcegraph#18330: same shape as sourcegraph/sourcegraph#14574 (3 files, 11 lines),bazel fetchpulled 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.