Skip to content

chore: Remove deprecated src teams commands - #1376

Open
marcleblanc2 wants to merge 2 commits into
fix/doc-legacy-groupsfrom
remove-teams-command
Open

chore: Remove deprecated src teams commands#1376
marcleblanc2 wants to merge 2 commits into
fix/doc-legacy-groupsfrom
remove-teams-command

Conversation

@marcleblanc2

@marcleblanc2 marcleblanc2 commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Part of FE-502. #1377 is stacked on this. Stacked on #1375 (base branch is fix/doc-legacy-groups; retarget to main once #1375 merges — the diff shown is only this PR's commit).

Why

Teams were removed in Sourcegraph 7.0. #1257 (shipped in src-cli 7.0.0, 2026-02-25) made src teams refuse to run against 7.x instances (checkTeamsAvailability: "the 'src teams' commands are not available for Sourcegraph versions 7.0 and later ... Teams have been removed"). Six months later the command only works against instances that are no longer supported, yet it still appears in src help and has a reference page on https://sourcegraph.com/docs/cli/references/teams.

While fixing src doc in #1375 I had to special-case teams so the generator wouldn't expand it into 9 new pages for a removed feature. Removing the command is the cleaner answer.

What

  • Delete cmd/src/teams*.go and cmd/src/team_members_list.go (9 files, teamsCommands + teamMembersCommands, the team alias, checkTeamsAvailability).

  • Drop the teams,team manages teams line from the src usage text in main.go.

  • doc_test.go: remove teams.md from expectedDocFiles; legacyGroupsWithoutSubcommandPages is now empty, so every remaining legacy group is expanded into subcommand pages.

  • CHANGELOG entry under Unreleased → Removed.

  • Remove the Sourcegraph70 feature flag from internal/features/features.go; the teams gate was its only user.

  • Also drop extensions,ext and gateway from the src usage text — those commands were removed long ago (chore: Remove deprecated extensions commands #1173 etc.) but were still listed.

Downstream

The generated teams.md disappears from src doc output, so after the next release:

Test plan

$ go build ./... && go vet ./cmd/src/ ./internal/features/
$ go test ./cmd/src/... -count=1
ok
$ go test ./cmd/src -run TestDoc -v
--- PASS: TestDocGeneratesExpectedFiles      (77 files, no teams.md)
--- PASS: TestDocLegacyGroupsHaveSubcommandPages
--- PASS: TestDocRootIndexListsAllCommands
$ go run ./cmd/src teams -h
src: unknown subcommand "teams"
$ go run ./cmd/src team
src: unknown subcommand "team"
$ go run ./cmd/src doc -o /tmp/out && find /tmp/out -name '*team*'
(nothing)

rg -i '\bteams?\b' cmd internal finds no remaining references outside search test fixtures (where "team" is repository content). rg 'Sourcegraph70|extensions|gateway' cmd internal is empty. src (no args) now lists only commands that exist.

Teams were removed in Sourcegraph 7.0. Since #1257 (src-cli 7.0.0) the
command has refused to run against 7.x instances, so it only works against
instances that are no longer supported. Remove it and its reference page.

Drops the "teams.md" entry from the doc golden list and the
legacyGroupsWithoutSubcommandPages exemption added in #1375, so every
remaining legacy group is now expanded into subcommand pages.

Part of https://linear.app/sourcegraph/issue/FE-502

Amp-Thread-ID: https://ampcode.com/threads/T-01a08410-86ca-72be-9928-2810e837fae1
Co-authored-by: Amp <amp@ampcode.com>
…ntries

Sourcegraph70 was only used by the teams version gate. The `extensions` and
`gateway` commands were removed in #1173 and earlier but were still listed in
`src help`.

Part of https://linear.app/sourcegraph/issue/FE-502

Amp-Thread-ID: https://ampcode.com/threads/T-01a08410-86ca-72be-9928-2810e837fae1
Co-authored-by: Amp <amp@ampcode.com>
@marcleblanc2 marcleblanc2 changed the title remove: src teams commands chore/remove: src teams commands Sep 9, 2026
@marcleblanc2 marcleblanc2 changed the title chore/remove: src teams commands chore: Remove deprecated src teams commands Sep 9, 2026
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