FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat: warn when src-cli is older than the instance's recommended version by Montana · Pull Request #1338 · sourcegraph/src-cli · GitHub

feat: warn when src-cli is older than the instance's recommended version - #1338

Open
Montana wants to merge 1 commit into
sourcegraph:mainfrom
Montana:patch-1
Open

feat: warn when src-cli is older than the instance's recommended version#1338
Montana wants to merge 1 commit into
sourcegraph:mainfrom
Montana:patch-1

Conversation

Montana commented Jun 30, 2026
edited
Loading

Copy link
Copy Markdown

Before running any command, src now does a best-effort check of the running version against the version recommended by the configured Sourcegraph instance (the existing /.api/src-cli/version endpoint) and prints a single warning to stderr when it is behind.

The check is fail-open:

  • Missing config, network errors, an unreachable instance, or an unparseable
    version all result in no warning.
  • A 3s timeout ensures it never noticeably delays the command.
  • It writes to stderr, so --json output is unaffected.
  • It skips version/help/no-arg invocations, dev builds, and any run with
    SRC_SKIP_VERSION_CHECK set.
  • Comparison is limited to major/minor/patch, so prereleases do not produce
    spurious warnings.

Closes #930

burmudar commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

@Montana thanks for your contribution!

I think there are some missing parts here. None of the methods added here are used anywhere?

burmudar commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

@Montana as mentioned in your other PR. Please add your tests and functionality to this PR.

I will close the other two PRs.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Warn on any command if not on latest version

2 participants


Back | FazBrowse Home | New Git URL