Skip to content

ci: stop Dagger from shallow-cloning the working tree#947

Merged
leonardoce merged 1 commit into
mainfrom
dev/dagger-github-ref-shallow
Jun 8, 2026
Merged

ci: stop Dagger from shallow-cloning the working tree#947
leonardoce merged 1 commit into
mainfrom
dev/dagger-github-ref-shallow

Conversation

@mnencia
Copy link
Copy Markdown
Member

@mnencia mnencia commented Jun 7, 2026

In GitHub Actions pull request builds, Dagger's telemetry git-label collection runs git fetch --depth 1 against the working tree whenever GITHUB_REF is a refs/pull/ ref, which turns the checkout into a shallow clone. Once shallow, git merge-base origin/main HEAD finds no common ancestor and the commitlint task (--from=origin/main) fails on every pull request.

Most dagger invocations already prefix GITHUB_REF= to suppress this; a few were missing it. Prefix the remaining calls so Dagger never shallow-fetches the host repository.

Upstream Dagger bug: dagger/dagger#13351

In GitHub Actions pull request builds, Dagger's telemetry git-label
collection runs `git fetch --depth 1` against the working tree whenever
GITHUB_REF is a refs/pull/ ref, which turns the checkout into a shallow
clone. Once shallow, `git merge-base origin/main HEAD` finds no common
ancestor and the commitlint task (--from=origin/main) fails on every
pull request.

Most dagger invocations already prefix GITHUB_REF= to suppress this; a
few were missing it. Prefix the remaining calls so Dagger never
shallow-fetches the host repository.

Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
@mnencia mnencia requested a review from a team as a code owner June 7, 2026 09:44
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jun 7, 2026
@mnencia mnencia changed the title fix(ci): stop Dagger from shallow-cloning the working tree ci: stop Dagger from shallow-cloning the working tree Jun 7, 2026
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Jun 7, 2026
@leonardoce leonardoce merged commit 3efe655 into main Jun 8, 2026
8 of 9 checks passed
@leonardoce leonardoce deleted the dev/dagger-github-ref-shallow branch June 8, 2026 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants