-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
If dbt deps can't git clone, it doesn't give the error message encountered by git #3167
Comments
Thanks for the detailed write-up @tpilewicz! I'm all for clearer error handling. I'm going to mark this a good first issue, and I'd welcome a contribution. I will say two things in advance:
I think you've hit the nail on the head: The message should make it clear-as-can-be that the error was encountered during a Again, it's worth saying that the full error message should be available in the debug logs. In this example, I'm trying to clone a non-existing package,
So the question here is not whether to make that information available at all, but when to surface it more directly to the user because it matches an expected error pattern—or to include a message to the effect of, we have no idea what this error is, please check the debug logs to find out. dbt already does a decent job of returning the git-provided error message, if the error occurs during the remote/fetch steps (e.g. because of a fake We could call that same exception, or a similar one, in the As an example, here's some pseudo-code for simple handling and a clearer exception in the case where the repository does not exist:
packages:
- git: https://github.com/fishtown-analytics/does-not-exist.git
revision: fake-branch Before:
After:
|
Thanks for your feedback @jtcohen6 :) Alright then I'll try to do both these things you suggested:
|
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue, or it will be closed in 7 days. |
@jtcohen6 if this is still an issue and @tpilewicz is no longer working on it, I'm happy to give it a look. |
@Gitznik I think it's fair game! |
@Gitznik go for it! I don't have time for working on this right now 👍 |
Describe the bug
When running
dbt deps
, if thegit clone
encounters an issue, the error message is:In my case the situation was that I had updated OSX, which had messed up my XCode command line tools (and thus my install of git). To get the real error message encountered by git and understand my issue, I had to manually run the git command. I suggest giving the error message returned by git to the user, so that they can more easily know what happened. Also users that are not used to the terminal won't think of copying the
git clone
command and trying it out to see the message.Steps To Reproduce
Make your
git clone
command fail during adbt deps
. For example how I did it was I added in my development version of dbt, in file/core/dbt/clients/git.py
, right before therun_cmd
of the clone function:Normally the output you'll get is just:
Expected behavior
I expected the output of
dbt deps
to forward the error message from git. For example if you added something to the clone_cmd like I did you should see:System information
Which database are you using dbt with?
The output of
dbt --version
:The operating system you're using: Mac OSX
The output of
python --version
: Python 3.6.8Additional context
Happy to contribute if this is recognized as an issue!
The text was updated successfully, but these errors were encountered: