Skip to content

Conversation

@nik123
Copy link
Contributor

@nik123 nik123 commented Aug 15, 2020

Fixes #4383

treeverse/dvc.org#1701

P.S.: I have also updated tests to make sure if targets missing both in cache and remote are handled properly bit these updates are dirty. So please inform me if there is a better way to implement them.

@pared pared self-requested a review August 17, 2020 11:37
Copy link
Contributor

@efiop efiop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @nik123 ! πŸ™

@jorgeorpinel
Copy link
Contributor

Thanks for this contribution @nik123. Coming to comment here before deciding how to address treeverse/dvc.org/issues/1701.

From treeverse/dvc.org#1701:

Here as an example output for dvc status -c dvc 1.6.0+adce62 the missing state looks like this:

$ dvc status -c -R .
WARNING: Some of the cache files do not exist neither locally nor on remote. Missing cache files:
name: data-in-cache2-not-in-remote.txt, md5: 599b9eea7a2c4f97be18c077d2df4789
	new:                data-in-cache-1-not-in-remote.txt
	missing:            data-in-cache-2-not-in-remote.txt

If missing is now an expected status, the WARNING is probably no longer needed. So it could just output something like:

$ dvc status -c  # Assumes default remote exists, otherwise -r myremote
new:                data-in-cache-1-not-in-remote.txt
missing:            data-in-cache2-not-in-remote.txt

@nik123
Copy link
Contributor Author

nik123 commented Aug 23, 2020

@jorgeorpinel I think you are right, there should be no "warning" message. However, this warning should stay in other commands (push, pull, fetch, gc).

I think I can achieve it by adding log_missing=True param into dvc.data_cloud.DataCloud.status and passing it all the way down to https://github.com/iterative/dvc/blob/adce620621230da180c184d5b295ad3129560251/dvc/cache/local.py#L202

I'm not sure there should be separate issue. Probably just reopen #4383. @efiop what do you think?

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.

status: ignoring cache that is not in local cache nor in remote

3 participants