vscode-dvc icon indicating copy to clipboard operation
vscode-dvc copied to clipboard

SCM doesn't reflect remote status.

Open daavoo opened this issue 3 years ago • 8 comments

The SCM section contains action for dvc push but it doesn't reflect the remote status, only workspace status.

I believe showing the remote status is relevant and the lack of it might cause confusion and incorrect workflows for users unfamiliar with DVC.

VSCode could use dvc status -c to query for remote status

Example workflow:


1. Start from nothing changed

2. I run an experiment.

Captura de Pantalla 2022-05-25 a las 17 22 29

I see changes to dvc-tracked files and git-tracked files.

3. Used to my regular workflow, I stage and commit the git-tracked files.

I get a clear signal by Git SCM that my workspace and remote are out of sync:

Captura de Pantalla 2022-05-25 a las 17 26 59

However, the DVC SCM is empty. As I am familiar with Git SCM, I interpret this as there is nothing else to do with dvc.

4. I click on the big sync changes button.


At this point, if someone clones the repo, it will receive a broken state (regarding DVC tracked files).

daavoo avatar May 25 '22 15:05 daavoo

Side note about step 2. Might be just me, but I find it confusing that the DVC section contains a title and actions/buttons that affect the Git section and don't have any effect or reflect any updates on the DVC section. Referring to:

Captura de Pantalla 2022-05-25 a las 17 33 37

daavoo avatar May 25 '22 15:05 daavoo

Based on support duty frequency, this workflow pitfall is commonly encountered by (usually new) dvc users, without the extension.

My worry is that the extension doesn't prevent it, but rather contributes.

If dvc status -c is too expensive and optimization can't be in time for release, a "hotfix" could be to have some UI around the pre-push git-hook . For example, recommend dvc install at setup time or even install, at least the pre-push, by default (might be too aggressive?)

daavoo avatar May 25 '22 15:05 daavoo

Related to https://github.com/iterative/vscode-dvc/issues/922.

Unfortunately, we cannot current access the native button because it is only in the proposed API. I will look again and see if anything has changed since the last time I checked.

mattseddon avatar May 25 '22 20:05 mattseddon

I'll also check in with a few people in the VS Code community to see if there is anything that can be done to get the action button into the stable API.

mattseddon avatar May 25 '22 20:05 mattseddon

If dvc status -c is too expensive

I don't think it makes sense to check the remote constantly, but doing it once after each git commit could make sense.

dberenbaum avatar May 27 '22 18:05 dberenbaum

@mattseddon is it possible to put a comment in the section? :) may be we can just explain this for now?

shcheklein avatar Jun 02 '22 02:06 shcheklein

How about adding a refresh button that'll run dvc status -c on demand?

alex000kim avatar Jun 02 '22 02:06 alex000kim

Discussed this with the team. One idea to consider initially is to have a single notification / button / status from which people can understand that some files are missing in the remote storage. Initially it can be even outside the SCM panel. Can be in the status bar?

shcheklein avatar Sep 20 '22 23:09 shcheklein

I don't use the sync button, but some indicator that the DVC remote is not in sync with the local status would be helpful. Maybe also which files, but currently I can't think of a solution except to add a tab like Commits/Branches etc. where you can see the differences between local and remote maybe?

alkatar21 avatar Nov 17 '22 18:11 alkatar21