-
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
Incorrect package duplicate error when using/missing .git extension #1084
Comments
Thanks for the report @DylanBaker! |
There are a couple ways we can fix this:
Part of the issue here is that github (and probably other hosted git services?) are pretty permissive about what URLs map to the same resources! It's not clear to me how dbt should resolve problems like that. Or if it should at all - maybe we should have just recognized immediately that they were the same package name and allowed one to "win"? |
I think the problem with no text munging at all is that you could two different packages that use different syntaxes of a shared package's URL and it wouldn't be in your control to change it unless you forked the repo. i.e. I use Package A and Package B in my project. Package A uses dbt-utils with a trailing I appreciate the scenario I'm describing is probably the minority of cases though. |
@DylanBaker check out the discussion in the PR too: #1428 I think that rather than text munging, we might be able to identify when two stated git urls point to the same repo, and then just pick one of them. The effectively does some amount of "munging" for us, but it changes the paradigm from "dbt will remove your .git suffix" to "dbt will resolve conflicts by picking a winner". I'm just not 100% certain that every git server out there supports cloning git urls both with and without a |
…ng-dotgit On mostly-duplicate git urls, pick whichever came first (#1084)
Incorrect package duplicate error when using/missing .git extension
Issue description
dbt seems to treat packages as not identical (but with duplicate name) if one reference has the
.git
file extension and another does not. This is problematic when adding a dependency that uses a package a project already includes.Results
I had a project that was pulling the
dbt-utils
package. When I set up thedbt-event-logging
package, despite pulling the same version/release, dbt returned the following error:My
packages.yml
looked like:The
package.yml
file in dbt-event-logging looks like:The problem was resolved by adding the
.git
suffix to the dbt-utils package in my project.System information
The output of
dbt --version
:The operating system you're running on: Windows
The python version you're using: 3.6.0
The text was updated successfully, but these errors were encountered: