vscode-dvc: SCM doesn't reflect remote status.

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).

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 3
  • Comments: 17 (15 by maintainers)

Most upvoted comments

For the record, for this issue, we’re trying to solve a targeted use case where a user has just run some experiment which has generated some new artefacts. These will initially show up at “not in remote” but after dvc push or dvc exp push origin <exp-name> it would be good to drop the data from the “not in remote” status. This would enable us to let users know that their remote is not currently up to date.

@mattseddon Yeah, that’s expected. Remote index is currently only automatically updated by push/pull/fetch for cloud versioning. We are ready to do that for regular clouds in fetch(and pull), but push needs some work https://github.com/iterative/dvc/issues/9333

Could we use data status --json --granular --unchanged --not-in-remote --no-remote-refresh for this?

For the initial implementation, we could let users trigger the remote refresh on demand but ideally, the information would be “auto-updated” whenever the CLI interacted with the remote. E.g. on exp push/push or pull (I could be doing something wrong but it doesn’t seem like this is the case).

Is this something that we should start looking at @dberenbaum? We can talk about it tomorrow if that works for you.

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?

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

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.

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.

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.

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