in most of our repos, ci.yml fetches all git history #928

Closed
opened 2026-08-04 13:59:54 +00:00 by kparal · 4 comments
Owner

ci.yml usually contains:

      - uses: actions/checkout@hash
        with:
          fetch-depth: 0

That seems to mean Fetch all history for all tags and branches. For CI testing, only the last commit is necessary (it certainly works here). I believe the whole

        with:
          fetch-depth: 0

can be dropped.

Affected repos:

Must fetch all history because of diff-quality/diff-cover:

  • os-autoinst-distri-fedora
  • rmdepcheck
  • fedora_openqa (multiple times)
  • python-wikitcms
  • fedfind
  • relvalconsumer
  • resultsdb_conventions
  • releasestream
  • python-ci_messages
  • relval
  • resultsdb_api

@adamwill @jgroman Do you agree with the assessment? Should we start fixing the repos?

`ci.yml` usually contains: ``` - uses: actions/checkout@hash with: fetch-depth: 0 ``` That seems to mean [Fetch all history for all tags and branches](https://code.forgejo.org/actions/checkout#fetch-all-history-for-all-tags-and-branches). For CI testing, only the last commit is necessary (it certainly works [here](https://forge.fedoraproject.org/quality/issuebot/pulls/45)). I believe the whole ``` with: fetch-depth: 0 ``` can be dropped. Affected repos: - [x] testdays-web https://forge.fedoraproject.org/quality/testdays-web/pulls/138 - [x] blockerbugs https://forge.fedoraproject.org/quality/blockerbugs/pulls/321 - [x] stats https://forge.fedoraproject.org/quality/stats/pulls/10 Must fetch all history because of `diff-quality`/`diff-cover`: - [ ] ~os-autoinst-distri-fedora~ - [ ] ~rmdepcheck~ - [ ] ~fedora_openqa (multiple times)~ - [ ] ~python-wikitcms~ - [ ] ~fedfind~ - [ ] ~relvalconsumer~ - [ ] ~resultsdb_conventions~ - [ ] ~releasestream~ - [ ] ~python-ci_messages~ - [ ] ~relval~ - [ ] ~resultsdb_api~ @adamwill @jgroman Do you agree with the assessment? Should we start fixing the repos?
Author
Owner

(It might also be good to bump it all to uses: actions/checkout@v7 while we edit the files).

(It might also be good to bump it all to `uses: actions/checkout@v7` while we edit the files).
Owner

For repos where I designed the CI, at least, I believe I did this because it's unfortunately necessary for diff-quality to work (possibly also diff-cover). It needs both the PR branch and the main/master branch to be present. I could not find any other setting that ensures those two branches are present, unfortunately.

For repos where I designed the CI, at least, I believe I did this because it's unfortunately necessary for diff-quality to work (possibly also diff-cover). It needs both the PR branch and the main/master branch to be present. I could not find any other setting that ensures those two branches are present, unfortunately.
Author
Owner

Oh, interesting. One would think there should be a configuration that fetches the main and the PR branch up to the common ancestor. But the checkout docs don't list that use case.

Ok, I crossed out repos which use diff-quality/diff-cover. I'll update the rest, to make the checkout a little more efficient.

Oh, interesting. One would think there should be a configuration that fetches the main and the PR branch up to the common ancestor. But the checkout docs don't list that use case. Ok, I crossed out repos which use `diff-quality`/`diff-cover`. I'll update the rest, to make the checkout a little more efficient.
kparal self-assigned this 2026-08-05 07:20:42 +00:00
Author
Owner

All the PRs have been submitted and are ready, closing this.

All the PRs have been submitted and are ready, closing this.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
quality/tickets#928
No description provided.