Skip to content

Commit fb2416e

Browse files
authored
Merge branch 'main' into wb/guard-release-version
2 parents c3b01ee + 99c43e8 commit fb2416e

66 files changed

Lines changed: 1937 additions & 1443 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/diff-tour.yml‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This GitHub Action imported from the shared action
2+
# https://github.com/sourcegraph/actions/blob/main/diff-tour/
3+
# Please make fixes / enhancements in the shared action,
4+
# so all of our repos get the benefits
5+
6+
name: Diff Tour link
7+
8+
on:
9+
pull_request:
10+
# `edited` fires when the base branch changes; `synchronize` does not
11+
# `closed` fires on merge and on plain close; either way the comment is
12+
# updated to a link that survives deleting the head branch
13+
types: [closed, edited, opened, reopened, synchronize]
14+
15+
# The only permission needed. The action does not check out your repo, so
16+
# `contents: read` is not required, even for private repos
17+
permissions:
18+
pull-requests: write
19+
20+
jobs:
21+
diff-tour:
22+
name: Comment
23+
runs-on: ubuntu-latest
24+
# Diff Tour resolves branch names against the base repo, so skip fork PRs
25+
if: github.event.pull_request.head.repo.full_name == github.repository
26+
steps:
27+
- uses: sourcegraph/actions/diff-tour@main

‎CHANGELOG.md‎

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,20 @@ All notable changes to `src-cli` are documented in this file.
1515

1616
### Changed
1717

18+
- Updated Go to 1.26.10 and the Alpine `ca-certificates-bundle` in Docker images to 20261020-r0 to stop trusting the compromised eMudhra CAs ([CVE-2026-111943](https://emudhra.we-have-a-problem.com/)).
19+
- HTTP requests now fail instead of hanging forever if the server does not start responding within 1 minute. Set the `SRC_RESPONSE_HEADER_TIMEOUT` environment variable to change this timeout, or to `0` to disable it. Responses that stream data for a long time (for example, large search job results) are not affected.
20+
- `src search-jobs logs` and `src search-jobs results` now use the standard API client, gaining proxy support, `-insecure-skip-verify`, and cross-host redirect protection, and now report an error on non-200 responses instead of writing the error page into the output.
21+
- The command list in `src help` is now generated from the registered commands instead of being maintained by hand. `src debug`, `src snapshot`, and `src lsp` now appear in it; aliases are shown after each description.
22+
23+
### Fixed
24+
25+
- `src doc` now generates reference pages for the `search-jobs`, `debug`, and `snapshot` subcommands, and the root `index.md` again lists legacy commands (`batch`, `repos`, `search`, ...) alongside the `urfave/cli` ones.
26+
1827
### Removed
1928

2029
- Removed `src sbom` and `src signature` commands. SBOMs and container signatures are no longer published as of Sourcegraph 7.1.0.
30+
- Removed the internal `src batch exec` command. Server-side Batch Changes execution now uses the `batch-exec` binary in the Sourcegraph repository.
31+
- Removed the `src teams` (`src team`) commands. Teams were removed in Sourcegraph 7.0 and the commands have refused to run against 7.x instances since src-cli 7.0.0.
2132

2233
## 6.7.1104
2334

@@ -43,7 +54,7 @@ All notable changes to `src-cli` are documented in this file.
4354

4455
### Added
4556

46-
- SBOM support: Added `--image` and `--exclude-image` flags to `src sbom fetch` for filtering which docker images SBOMs are fetched for. Both flags support glob patterns (e.g., `frontend`, `*api*`) and comma-separated lists. The `sourcegraph/` image name prefix is optional.
57+
- SBOM support: Added `--image` and `--exclude-image` flags to `src sbom fetch` for filtering which Docker images SBOMs are fetched for. Both flags support glob patterns (e.g., `frontend`, `*api*`) and comma-separated lists. The `sourcegraph/` image name prefix is optional.
4758

4859
### Changed
4960

@@ -85,7 +96,7 @@ All notable changes to `src-cli` are documented in this file.
8596
## 5.10.0
8697

8798
- cody gateway benchmark changes
88-
- fix local builds for non sourcegraph team [1121](https://github.com/sourcegraph/src-cli/pull/1121)
99+
- fix local builds for non Sourcegraph team [1121](https://github.com/sourcegraph/src-cli/pull/1121)
89100

90101
## 5.9.1
91102

@@ -163,7 +174,7 @@ All notable changes to `src-cli` are documented in this file.
163174

164175
### Fixed
165176

166-
- The fork attribute in changesetTemplate is now acknowleged when creating a batch change via `src-cli`. [#58156](https://github.com/sourcegraph/sourcegraph/pull/58156)
177+
- The fork attribute in changesetTemplate is now acknowledged when creating a batch change via `src-cli`. [#58156](https://github.com/sourcegraph/sourcegraph/pull/58156)
167178

168179
## 5.2.0
169180

@@ -179,7 +190,7 @@ All notable changes to `src-cli` are documented in this file.
179190

180191
### Fixed
181192

182-
- The temporary docker volume created during workspace preparation is now cleaned up when failure occurs. [#1021](https://github.com/sourcegraph/src-cli/pull/1021).
193+
- The temporary Docker volume created during workspace preparation is now cleaned up when failure occurs. [#1021](https://github.com/sourcegraph/src-cli/pull/1021).
183194

184195
## 5.1.1
185196

@@ -265,7 +276,7 @@ No noteworthy changes, mechanical release to match Sourcegraph release.
265276

266277
### Fixed
267278

268-
- Fix network timeout in `src users clean` occuring in instances with many users [#901](https://github.com/sourcegraph/src-cli/pull/901)
279+
- Fix network timeout in `src users clean` occurring in instances with many users [#901](https://github.com/sourcegraph/src-cli/pull/901)
269280
- Aligned parsing of spec file parameter of `src batch repos` with other commands. [#919](https://github.com/sourcegraph/src-cli/pull/919)
270281
- Remove empty log outputs during batch spec execution. [#923](https://github.com/sourcegraph/src-cli/pull/923)
271282

@@ -277,7 +288,7 @@ No noteworthy changes, mechanical release to match Sourcegraph release.
277288

278289
### Added
279290

280-
- Batch Changes: Watchdog that checks for docker responsiveness while running commands has been added. [#898](https://github.com/sourcegraph/src-cli/pull/898)
291+
- Batch Changes: Watchdog that checks for Docker responsiveness while running commands has been added. [#898](https://github.com/sourcegraph/src-cli/pull/898)
281292

282293
## 4.2.1
283294

@@ -306,7 +317,7 @@ No noteworthy changes, mechanical release to match Sourcegraph release.
306317

307318
### Changed
308319

309-
- Improved output for failing docker pulls in batch change execution. [#880](https://github.com/sourcegraph/src-cli/pull/880)
320+
- Improved output for failing Docker pulls in batch change execution. [#880](https://github.com/sourcegraph/src-cli/pull/880)
310321

311322
## 4.1.0
312323

@@ -793,7 +804,7 @@ Re-release of 3.29.3 for Sourcegraph 3.30.
793804

794805
### Fixed
795806

796-
- When specifying `-skip-errors`, the batch spec would always be empty. This ix fixed and the intended behavior has been restored. [#539](https://github.com/sourcegraph/src-cli/pull/539)
807+
- When specifying `-skip-errors`, the batch spec would always be empty. This is fixed and the intended behavior has been restored. [#539](https://github.com/sourcegraph/src-cli/pull/539)
797808

798809
## 3.27.0
799810

@@ -868,13 +879,13 @@ Re-release of 3.29.3 for Sourcegraph 3.30.
868879

869880
### Fixed
870881

871-
- The homebrew recipe for `src-cli` contained the wrong binary name.
882+
- The Homebrew recipe for `src-cli` contained the wrong binary name.
872883

873884
## 3.24.6
874885

875886
### Fixed
876887

877-
- Workspaces could sometimes fail with docker bind mount errors, due to a race condition of multiple workspaces accessing the same auxilliary files. [#468](https://github.com/sourcegraph/src-cli/pull/468)
888+
- Workspaces could sometimes fail with Docker bind mount errors, due to a race condition of multiple workspaces accessing the same auxiliary files. [#468](https://github.com/sourcegraph/src-cli/pull/468)
878889

879890
## 3.24.5
880891

@@ -1150,7 +1161,7 @@ Re-release of 3.29.3 for Sourcegraph 3.30.
11501161

11511162
- Add `--no-progress` flag to the `lsif upload` command to disable verbose output in non-TTY environments.
11521163
- `SRC_HEADER_AUTHORIZATION="Bearer $(...)"` is now supported for authenticating `src` with custom auth proxies. See [auth proxy configuration docs](AUTH_PROXY.md) for more information. [#239](https://github.com/sourcegraph/src-cli/pull/239)
1153-
- Pull missing docker images automatically. [#191](https://github.com/sourcegraph/src-cli/pull/191)
1164+
- Pull missing Docker images automatically. [#191](https://github.com/sourcegraph/src-cli/pull/191)
11541165
- Searches that result in errors will now display any alerts returned by Sourcegraph, including suggestions for how the search could be corrected. [#221](https://github.com/sourcegraph/src-cli/pull/221)
11551166

11561167
### Changed

‎DEVELOPMENT.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ For quick end-to-end CLI sanity checks against a live Sourcegraph instance, run:
6262

6363
This script intentionally uses your currently exported `SRC_*` environment variables, is not hooked up to CI, and is meant for manual regression checks (for example, to catch issues like `src users list` failing unexpectedly).
6464

65-
We adhere to the [general Sourcegraph principles for testing](https://docs.sourcegraph.com/dev/background-information/testing_principles), as well as [the Go specific directions](https://docs.sourcegraph.com/dev/background-information/languages/testing_go_code), at least to the extent they apply to a standalone tool like `src`.
65+
We adhere to the general Sourcegraph principles for testing, as well as the Go specific directions used in the main Sourcegraph repository, at least to the extent they apply to a standalone tool like `src`.
6666

6767
## Releasing
6868

‎Dockerfile‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,18 @@
44
#
55
# Nothing fancy here: we copy in the source code and build on the Alpine Go
66
# image. Refer to .dockerignore to get a sense of what we're not going to copy.
7-
FROM golang:1.26.5-alpine3.23@sha256:622e56dbc11a8cfe87cafa2331e9a201877271cbff918af53d3be315f3da88cc AS builder
7+
FROM golang:1.26.10-alpine3.23@sha256:a07f231c19b03e6106cf442f02a5bcf262147e744d15b7b5e4b6d81d420c70a0 AS builder
88

99
COPY . /src
1010
WORKDIR /src
1111
RUN go build ./cmd/src
1212

1313
# This stage should be kept in sync with Dockerfile.release.
14-
FROM alpine:3.22@sha256:4b7ce07002c69e8f3d704a9c5d6fd3053be500b7f1c69fc0d80990c2ad8dd412
14+
FROM alpine:3.22@sha256:5291449c3df73caf6ed85e649dec1b9e818b39a5d8c871e97afc13e9cd5e8fa8
1515

1616
# needed for `src code-intel upload` and `src actions exec`
17-
RUN apk add --no-cache git
17+
# ca-certificates-bundle >= 20261020-r0 drops the eMudhra roots (CVE-2026-111943).
18+
RUN apk add --no-cache git && apk upgrade --no-cache ca-certificates-bundle
1819

1920
COPY --from=builder /src/src /usr/bin/
2021
ENTRYPOINT ["/usr/bin/src"]

‎Dockerfile.release‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
# suitable for testing, since it depends on a src binary being at the project
33
# root _and_ that src binary being runnable on Alpine. To test this, refer to
44
# the main Dockerfile, which should have an identical second stage.
5-
FROM alpine:3.22@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1
5+
FROM alpine:3.22@sha256:5291449c3df73caf6ed85e649dec1b9e818b39a5d8c871e97afc13e9cd5e8fa8
66

77
# needed for `src code-intel upload` and `src actions exec`
8-
RUN apk add --no-cache git
8+
# ca-certificates-bundle >= 20261020-r0 drops the eMudhra roots (CVE-2026-111943).
9+
RUN apk add --no-cache git && apk upgrade --no-cache ca-certificates-bundle
910

1011
COPY src /usr/bin/
1112
ENTRYPOINT ["/usr/bin/src"]

‎README.md‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
- **Search & get results in your terminal**
88
- **Search & get JSON** for programmatic consumption
99
- Make **GraphQL API requests** with auth easily & get JSON back fast
10-
- Execute **[batch changes](https://docs.sourcegraph.com/batch_changes)**
10+
- Execute **[batch changes](https://sourcegraph.com/docs/batch_changes)**
1111
- **Manage & administrate** repositories, users, and more
1212
- **Easily convert src-CLI commands to equivalent curl commands**, just add --get-curl!
1313

@@ -173,7 +173,7 @@ Is your Sourcegraph instance behind a custom auth proxy? See [auth proxy configu
173173
- `src auth` - print the active authentication token or authorization header
174174
- `src search` - perform searches and get results in your terminal or as JSON
175175
- `src api` - run Sourcegraph GraphQL API requests
176-
- `src batch` - execute and manage [batch changes](https://docs.sourcegraph.com/batch_changes)
176+
- `src batch` - execute and manage [batch changes](https://sourcegraph.com/docs/batch_changes)
177177
- `src repos` - manage repositories
178178
- `src users` - manage users
179179
- `src orgs` - manages organization
@@ -185,7 +185,7 @@ Is your Sourcegraph instance behind a custom auth proxy? See [auth proxy configu
185185
- `src version` - check version and guaranteed-compatible version for your Sourcegraph instance
186186

187187
Run `src -h` and `src <subcommand> -h` for more detailed usage information.
188-
You can also read the [usage docs for the latest version of `src-cli`](https://docs.sourcegraph.com/cli/references) online.
188+
You can also read the [usage docs for the latest version of `src-cli`](https://sourcegraph.com/docs/cli/references) online.
189189

190190
#### Optional: Renaming `src`
191191

@@ -197,6 +197,10 @@ mv /usr/local/bin/src /usr/local/bin/src-cli
197197

198198
You can then invoke it via `src-cli`.
199199

200+
## Timeouts
201+
202+
`src` waits up to 1 minute for the server to start responding to a request. To change this, set the `SRC_RESPONSE_HEADER_TIMEOUT` environment variable to a duration such as `30s` or `10m`, or to `0` to disable the timeout. This timeout only applies until the server sends its response headers — responses that stream data for a long time, such as large search job results, are not interrupted.
203+
200204
## Telemetry
201205

202206
`src` includes the operating system and architecture in the `User-Agent` header sent to Sourcegraph. For example, running `src` version 3.21.10 on an x86-64 Linux host will result in this header:
@@ -207,7 +211,7 @@ src-cli/3.21.10 linux amd64
207211

208212
To disable this and _only_ send the version, you can set `-user-agent-telemetry=false` for a single command, or set the `SRC_DISABLE_USER_AGENT_TELEMETRY` environment variable to any non-blank string.
209213

210-
As with [other Sourcegraph telemetry](https://docs.sourcegraph.com/dev/background-information/telemetry), any collected data is only sent to Sourcegraph.com in aggregate form.
214+
As with other Sourcegraph telemetry, any collected data is only sent to Sourcegraph.com in aggregate form.
211215

212216
## Development
213217

‎cmd/src/batch.go‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ Use "src batch [command] -h" for more information about a command.
3737

3838
// Register the command.
3939
commands = append(commands, &command{
40-
flagSet: flagSet,
40+
flagSet: flagSet,
41+
description: "manages batch changes",
4142
aliases: []string{
4243
"batchchange",
4344
"batch-change",

0 commit comments

Comments
 (0)