Skip to content

Commit a02c707

Browse files
authored
Remove max version of CLI (3.0 release) (#4049)
1 parent dd7eac8 commit a02c707

File tree

3 files changed

+2
-29
lines changed

3 files changed

+2
-29
lines changed

extension/src/cli/dvc/contract.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { Plot } from '../../plots/webview/contract'
22

33
export const MIN_CLI_VERSION = '2.58.1'
44
export const LATEST_TESTED_CLI_VERSION = '2.58.2'
5-
export const MAX_CLI_VERSION = '3'
65

76
type ErrorContents = { type: string; msg: string }
87

extension/src/cli/dvc/version.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
import {
2-
LATEST_TESTED_CLI_VERSION,
3-
MAX_CLI_VERSION,
4-
MIN_CLI_VERSION
5-
} from './contract'
1+
import { LATEST_TESTED_CLI_VERSION, MIN_CLI_VERSION } from './contract'
62

73
export enum CliCompatible {
84
NO_CANNOT_VERIFY = 'no-cannot-verify',
@@ -38,13 +34,12 @@ const checkCLIVersion = (currentSemVer: {
3834
patch: minPatch
3935
} = extractSemver(MIN_CLI_VERSION) as ParsedSemver
4036

41-
const isAheadMaxVersion = currentMajor >= Number(MAX_CLI_VERSION)
4237
const isBehindMinVersion =
4338
currentMajor < minMajor ||
4439
currentMinor < minMinor ||
4540
(currentMinor === minMinor && currentPatch < Number(minPatch))
4641

47-
if (isAheadMaxVersion || isBehindMinVersion) {
42+
if (isBehindMinVersion) {
4843
return CliCompatible.NO_INCOMPATIBLE
4944
}
5045

extension/src/setup/runner.test.ts

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -514,27 +514,6 @@ describe('run', () => {
514514
expect(mockedInitialize).not.toHaveBeenCalled()
515515
})
516516

517-
it('should send a specific message to the user if the located CLI is a major version ahead', async () => {
518-
const MajorAhead = MIN_CLI_VERSION.split('.')
519-
.map(num => Number(num) + 100)
520-
.join('.')
521-
mockedGetFirstWorkspaceFolder.mockReturnValueOnce(mockedCwd)
522-
mockedShouldWarnUserIfCLIUnavailable.mockReturnValueOnce(true)
523-
mockedIsPythonExtensionUsed.mockResolvedValueOnce(true)
524-
mockedGetCliVersion.mockResolvedValueOnce(MajorAhead)
525-
526-
await run(setup)
527-
await flushPromises()
528-
expect(mockedWarnWithOptions).toHaveBeenCalledTimes(1)
529-
expect(mockedWarnWithOptions).toHaveBeenCalledWith(
530-
'The extension cannot initialize because the DVC CLI version is incompatible.',
531-
'Setup'
532-
)
533-
expect(mockedGetCliVersion).toHaveBeenCalledTimes(1)
534-
expect(mockedResetMembers).toHaveBeenCalledTimes(1)
535-
expect(mockedInitialize).not.toHaveBeenCalled()
536-
})
537-
538517
it('should send a specific message to the user if the Python extension is being used, the CLI is not available in the virtual environment and no cli is found globally', async () => {
539518
mockedGetFirstWorkspaceFolder.mockReturnValueOnce(mockedCwd)
540519
mockedHasRoots.mockReturnValueOnce(true)

0 commit comments

Comments
 (0)