-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
repo: allow_missing: Compare hash_info.value instead of hash_info #9839
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -314,7 +314,8 @@ def _changed_deps( | |
if status: | ||
if allow_missing and status[str(dep)] == "deleted": | ||
if upstream and any( | ||
dep.fs_path == out.fs_path and dep.hash_info != out.hash_info | ||
dep.fs_path == out.fs_path | ||
and dep.hash_info.value != out.hash_info.value | ||
Comment on lines
+317
to
+318
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should not look into There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I know the theory: Do we care in practice (today, not if we introduce different hashing algorithm)? I mean, isn't the same chance of a collision as today with 2 different There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Even without considering the collision, if I am understanding the branch of this code correctly, there is a chance of hashes being mismatched and returning There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @daavoo hash_info should be compared as a whole, comparing only values without name looks like a hack. Could you elaborate on why you need to do it this way? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess new output is getting hashed as There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems like it would be better to just ask to upgrade (e.g. with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
It doesn't look, it is a hack 😄
It is in the added test / linked issue. If there is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Not sure I follow, sorry. |
||
for stage in upstream | ||
for out in stage.outs | ||
): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pmrowla do you think it is ok?
See the added test / linked issue for the scenario, is there something different we should do for 2.X
.dvc
files that are tracked as deps in 3.Xdvc.lock
files?This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
Sorry, something went wrong.