fix(ingest): avoid git dependency in dbt (#9447)

This commit is contained in:
Harshal Sheth 2023-12-12 12:32:59 -05:00 committed by GitHub
parent ffccc65561
commit 66f90c7ffd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,7 +6,6 @@ from pydantic import Field, FilePath, SecretStr, validator
from datahub.configuration.common import ConfigModel
from datahub.configuration.validate_field_rename import pydantic_renamed_field
from datahub.ingestion.source.git.git_import import GitClone
_GITHUB_PREFIX = "https://github.com/"
_GITLAB_PREFIX = "https://gitlab.com/"
@ -151,6 +150,9 @@ class GitInfo(GitReference):
) -> pathlib.Path:
"""Clones the repo into a temporary directory and returns the path to the checkout."""
# We import this here to avoid a hard dependency on gitpython.
from datahub.ingestion.source.git.git_import import GitClone
assert self.repo_ssh_locator
git_clone = GitClone(str(tmp_path))