-
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
exception text: clarify error message #4339
Conversation
I guess I will admit this does not "solve" the original issue. This error message always really bothered me though :) |
I edited this to print a link to the troubleshooting page, edited in iterative/dvc.org#1671 with a short explanation of common problems. |
"Checkout failed for following targets:\n{}\nIs your " | ||
"cache up to date?\n{}".format( |
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.
The cache question seems unclear, how about just:
"Checkout failed for following targets:\n{}\nIs your " | |
"cache up to date?\n{}".format( | |
"Checkout failed for following targets:\n{}\n" | |
"Visit {} for more info.".format( |
?
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.
"Visit {} for more info." sounds like holding a user hostage. We do need better exception message, which can be done by making _fetch
and _checkout
collaborate with each other, but making CheckoutError
message generic is not a solution, it only adds confusion.
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.
@skshetry Good point. Maybe for a lack of better message (because a more advanced approach is needed), let's just append "Vinit {} for more info"(or someting like that) to the old message? Just in the interest of time, since the proper-proper solution will require quite a bit more effort.
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.
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.
@efiop, yeah, that sounds good. But let's keep the issue open.
I suppose the errors provided during fetch are pretty clear. I mainly did not like the 'did you forget to fetch?' message. I can change this one I get near a terminal again. |
@efiop Okay, made that exact change. I agree that since we're linking to the troubleshooting page we don't need anything more than the above error messages in the context. |
Should checkout be called automatically from `dvc pull` even if fetch
fails? If it stops there, fetch and checkout can just have proper error
messages for themselves. Otherwise, yes they will need to collaborate.
…On Mon, 10 Aug 2020 at 10:45, Saugat Pachhai ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In dvc/exceptions.py
<#4339 (comment)>:
> + "Checkout failed for following targets:\n{}\nIs your "
+ "cache up to date?\n{}".format(
"Visit {} for more info." sounds like holding a user hostage. We do need
better exception message, which can be done by making _fetch and _checkout
collaborate with each other, but making CheckoutError message generic is
not a solution, it only adds confusion.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#4339 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGWHGPZ3RTWPDNGMFPELB3SAAIZXANCNFSM4PU6GRVA>
.
|
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.
Thanks @bobertlo !
The default error message is often invoked from running
dvc pull
andin this case it is generally caused by not pushing to the remote. I
spent some time thinking about a replacement message and this seems to
be the most appropriate text I could think of.
Fixes #4316
❗ I have followed the Contributing to DVC checklist.
📖 If this PR requires documentation updates, I have created a separate PR (or issue, at least) in dvc.org and linked it here.
pull: add troubleshooting hints for failed command dvc.org#1660
Thank you for the contribution - we'll try to review it as soon as possible. 🙏