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

Feature Request: dvc status should only show "update available" for imported files if the md5 has changed #10542

Open
evatt-harvey-salinger opened this issue Aug 27, 2024 · 0 comments
Labels
A: status Related to the dvc diff/list/status feature request Requesting a new feature

Comments

@evatt-harvey-salinger
Copy link

evatt-harvey-salinger commented Aug 27, 2024

I've imported a file from another DVC project using dvc import <repo url> <file/path> --rev <branch> . Whenever I make another commit to the source repo (even if I don't change the imported file), and then I call dvc status there is always an update available for that file.

$ cd import-project/
$ dvc update test_data.txt --rev main
Importing 'test_data.txt (../source-project)' -> test_data.txt
$ dvc status
Data and pipelines are up to date.  
$ cd ../source-project/
$ touch new_random_file.txt
$ git commit -a -m "no changes to the dvc tracked file were made"
$ cd ../import-project/
$ dvc status                                        
test_data.txt.dvc:                                                            
        changed deps:
                update available:  test_data.txt (../source-project)

I understand that the revision I'm tracking is just the head of the branch, so the "update" is to bring the file.dvc's "rev_lock" field to the latest commit. However, the underlying md5 hash hasn't change... it would be really nice if there was a way to call dvc status such that it only checked if the hash had changed in the most recent commit. All it would have to do is verify the outs.md5 values are the same.

I know that I can specify a particular commit hash as the --rev when i do the import/update. However, I really do want to know if the file actually changed when i do dvc status. If i make the --rev a particular commit hash, it won't ever tell me if that file changes in a later commit.

As of now, there's no way to tell the difference between: 1) has the HEAD of the source repo changed 2) is the actually a new version of my imported file.

@dberenbaum dberenbaum added feature request Requesting a new feature A: status Related to the dvc diff/list/status labels Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: status Related to the dvc diff/list/status feature request Requesting a new feature
Projects
None yet
Development

No branches or pull requests

2 participants