Skip to content
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

user-guide: add troubleshooting entry for dvc-exp in shallow clones #3577

Merged
merged 8 commits into from
Jun 11, 2022
36 changes: 36 additions & 0 deletions content/docs/user-guide/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,39 @@ and retry the DVC command. Specifically, one of:

[internal directories]:
https://dvc.org/doc/user-guide/project-structure/internal-files

## DVC experiments may fail in shallow Git repositories {#git-shallow}
jorgeorpinel marked this conversation as resolved.
Show resolved Hide resolved

DVC experiments rely on Git features which may not work properly in shallow Git
jorgeorpinel marked this conversation as resolved.
Show resolved Hide resolved
repositories. This error commonly occurs in certain CI environments which use
jorgeorpinel marked this conversation as resolved.
Show resolved Hide resolved
shallow git clones by default. When this error is encountered, try unshallowing
the Git repository and then retry the DVC command.

Local Git repositories can be unshallowed by using:

```
$ git fetch --unshallow
```
jorgeorpinel marked this conversation as resolved.
Show resolved Hide resolved

When using [CML](https://cml.dev/doc), repositories can be unshallowed by using:
jorgeorpinel marked this conversation as resolved.
Show resolved Hide resolved

```
$ cml ci --unshallow
```

In GitHub Actions, repositories can be unshallowed by setting `fetch-depth` in
jorgeorpinel marked this conversation as resolved.
Show resolved Hide resolved
the `actions/checkout` action.

```
- uses: actions/checkout@v3
with:
fetch-depth: 0
```

In GitLab CI/CD, repositories can be unshallowed by setting the `GIT_DEPTH`
environment variable:

```
variables:
GIT_DEPTH: "0"
```
jorgeorpinel marked this conversation as resolved.
Show resolved Hide resolved