-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix DVC setup showing false info on incompatible global DVC #3961
Conversation
* keeps section (and extension status) showing accurate information when extension auto selects a global version of DVC
@@ -485,8 +485,9 @@ describe('run', () => { | |||
await flushPromises() | |||
expect(mockedWarnWithOptions).toHaveBeenCalledTimes(1) | |||
expect(mockedWarnWithOptions).toHaveBeenCalledWith( | |||
'The extension cannot initialize because the DVC CLI version is incompatible.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This bug and incorrectly written test was introduced in #3784 when I simplified the discovery.ts
logic.
} | ||
|
||
setup.unsetPythonBinPath() | ||
|
||
return processVersionDetails( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We only set DVC as global if the found version is compatible so we shouldn't be processing global DVC version details unless we're setting DVC as global. Else we need to process python environment details.
Code Climate has analyzed commit 3c24d4d and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (85% is the threshold). This pull request will bring the total coverage in the repository to 95.0% (0.0% change). View more on Code Climate. |
Demo
Demo environment details: I have a
MIN_CLI_VERSION
of2.58.0
(updated for test so I could easily test global DVC incompatibility), a global DVC installation of2.57.0
, and a selected python environment with no DVC.main
PR
Part of #3878