Skip to content

test: add unit tests for version-check comparison and skip logic#1343

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

test: add unit tests for version-check comparison and skip logic#1343
Montana wants to merge 1 commit into
sourcegraph:mainfrom
Montana:patch-4

Conversation

@Montana

@Montana Montana commented Jul 1, 2026

Copy link
Copy Markdown

Covers parseVersion, isOlderVersion, and skipVersionCheck: prerelease handling, fail-open on unparseable input, and the dev-build, SRC_SKIP_VERSION_CHECK, and version/help/no-arg skip paths.

Covers `parseVersion`, `isOlderVersion`, and `skipVersionCheck`: prerelease handling, fail-open on unparseable input, and the dev-build, `SRC_SKIP_VERSION_CHECK`, and `version/help/no-arg skip` paths.
@burmudar

burmudar commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

@Montana please follow the guidance of adding this to your original PR

@burmudar burmudar closed this Jul 1, 2026
Montana added a commit to Montana/src-cli that referenced this pull request Jul 1, 2026
Before running a command, src does a best-effort check of the running version against the version recommended by the configured instance (/.api/src-cli/version) and prints a single stderr warning when behind. Fail-open, 3s timeout, stderr only so --json is unaffected. Skips version/help/no-arg, dev builds, and SRC_SKIP_VERSION_CHECK. Compares major/minor/patch only. Adds unit tests. Closes sourcegraph#930. Supersedes sourcegraph#1339, sourcegraph#1343.
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.

2 participants