Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

status: check if target is missing both in cache and remote #4398

Merged
merged 2 commits into from
Aug 17, 2020

Conversation

nik123
Copy link
Contributor

@nik123 nik123 commented Aug 15, 2020

Fixes #4383

iterative/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
Member

@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 iterative/dvc.org/issues/1701.

From iterative/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

self._log_missing_caches(dict(dir_status, **file_status))

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