-
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
rwlock: include actionable in error message #3270
Conversation
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.
please, check some comments
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.
Some dedup is needed. We also have similar message in dvc.lock
.
I will handle the duplication in another pull request, as agreed on planning. |
@efiop , I already had the patch for it, since this PR isn't closed yet, I will upload it here. |
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.
Looks great! Thanks!
blockers = [ | ||
info | ||
for path, infos in lock[mode].items() | ||
if path_info.overlaps(path) | ||
if info not in (infos if type(infos) is list else [infos]) | ||
] |
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.
This logic is broken now. We create a list of info
passed as param repeated 0 to several times, while in previous logic we were listing infos we've got from lock.
The right logic I guess is:
blockers = [
blocker
for path, infos in lock[mode].items()
if path_info.overlaps(path)
for blocker in (infos if isinstance(infos, list) else [infos])
if blocker != info
]
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.
Fixed in #3285.
Fix: #3164