Skip to content

Conversation

@Suor
Copy link
Contributor

@Suor Suor commented Dec 27, 2019

Fixes #2386

@Suor
Copy link
Contributor Author

Suor commented Dec 27, 2019

Actually this is still wrong. Working tree might be clean but some .gitignored files changed.

@Suor
Copy link
Contributor Author

Suor commented Dec 27, 2019

So we can't know whether working tree is clean unless we check both git status and dvc status, which might make dvc metrics show <some-metric> considerably slower. The solution might be:

  • perform the collection for both working tree and everything, then don't show if it's the same as current branch/head (will need to dup this in dvc status/dvc metrics show)
  • let brancher know what we are looking for to limit dvc status to specific file(s)
  • pass dirty=... to brancher by some code, which knows what we are looking for

All of those don't look too nice. Ideas?

@efiop
Copy link
Contributor

efiop commented Dec 27, 2019

So we can't know whether working tree is clean unless we check both git status and dvc status

@Suor Not sure I follow. If git is clean, then it means that there are no new files (untracked too, right?) in the repo. I don't quite understand why dvc status would matter there?

@Suor
Copy link
Contributor Author

Suor commented Dec 27, 2019

If metric is handled by dvc then it is in .gitignore, git will be clean, but metric might be changed, need to check that it corresponds to checksum.

@efiop
Copy link
Contributor

efiop commented Dec 27, 2019

@Suor Got it. Good one. And with dvc status, it would only need to be checked for the current branch once, right? Seems like it is not that bad, but it indeed might take some time for big directories. Limiting it to specific files (e.g. metrics) would only complicate it, and I'm not sure if it is worth it. Maybe the smartest thing here is to not overcomplicate this and leave it as is. Showing working tree is not that bad after all.

@Suor
Copy link
Contributor Author

Suor commented Dec 27, 2019

@efiop I am considering filtering output for metrics show, people usually have issue with that.

@efiop
Copy link
Contributor

efiop commented Dec 27, 2019

@Suor Feels weird to make brancher know about specific files that we want to check. Maybe

perform the collection for both working tree and everything, then don't show if it's the same as current branch/head (will need to dup this in dvc status/dvc metrics show)

Would be better? Btw, not sure why we need it for dvc status, as it doesn't care about branches really.

@Suor
Copy link
Contributor Author

Suor commented Dec 28, 2019

@efiop I thought dvc status --all-branches will show status for all branches or whatever. Looked at the code and realized those flags are simply ignored.

@Suor
Copy link
Contributor Author

Suor commented Dec 31, 2019

Closing in favor of #3025.

@Suor Suor closed this Dec 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

brancher: yields working tree on clean state

2 participants