vscode-dvc
vscode-dvc copied to clipboard
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.
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:
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).
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:
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?)
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.
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.
If
dvc status -cis 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.
@mattseddon is it possible to put a comment in the section? :) may be we can just explain this for now?
How about adding a refresh button that'll run dvc status -c on demand?
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?
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?