Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Tags no longer fetch with Git v2.48.0 #2041

Open
sethrj opened this issue Jan 14, 2025 · 5 comments
Open

Tags no longer fetch with Git v2.48.0 #2041

sethrj opened this issue Jan 14, 2025 · 5 comments

Comments

@sethrj
Copy link

sethrj commented Jan 14, 2025

It's not clear whether this is a problem with my expectations of the fetch-tags option, a bug in checkout, or a bug in Git 2.48.0, but ancestral tags are no longer fetched as of Git 2.48.0 for shallow (but not too shallow) builds.

Here, v0.6.0-dev is a nearish ancestor of the branch backports/v0.5 being tested. With 2.47, tags within the fetch depth are fetched. With 2.48, only the ref is fetched: no tags.

Full run output with git 2.47.1
Run actions/checkout@v4
  with:
    fetch-depth: 383
    fetch-tags: true
    repository: celeritas-project/celeritas
    token: ***
    ssh-strict: true
    ssh-user: git
    persist-credentials: true
    clean: true
    sparse-checkout-cone-mode: true
    show-progress: true
    lfs: false
    submodules: false
    set-safe-directory: true
  env:
    SPACK_REF: 866785bd74964142e4b47bf71bee68d7426c84ee
    CCACHE_DIR: /home/runner/work/celeritas/celeritas/.ccache
    CCACHE_MAXSIZE: 100Mi
    CMAKE_PRESET: reldeb-vecgeom
    SPACK_VIEW: /opt/spack-view
    SPACK_BUILDCACHE: celer-buildcache
    CC: clang-18
    CXX: clang++-18
    CLANG_TIDY: clang-tidy-18
    CXXSTD: 17
Syncing repository: celeritas-project/celeritas
Getting Git version info
  Working directory is '/home/runner/work/celeritas/celeritas'
  /usr/bin/git version
  git version 2.47.1
Temporarily overriding HOME='/home/runner/work/_temp/7af84466-ea8b-4c97-9ce1-a234a016c05d' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
/usr/bin/git config --global --add safe.directory /home/runner/work/celeritas/celeritas
Deleting the contents of '/home/runner/work/celeritas/celeritas'
Initializing the repository
  /usr/bin/git init /home/runner/work/celeritas/celeritas
  hint: Using 'master' as the name for the initial branch. This default branch name
  hint: is subject to change. To configure the initial branch name to use in all
  hint: of your new repositories, which will suppress this warning, call:
  hint:
  hint: 	git config --global init.defaultBranch 
  hint:
  hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
  hint: 'development'. The just-created branch can be renamed via this command:
  hint:
  hint: 	git branch -m 
  Initialized empty Git repository in /home/runner/work/celeritas/celeritas/.git/
  /usr/bin/git remote add origin https://github.com/celeritas-project/celeritas
Disabling automatic garbage collection
  /usr/bin/git config --local gc.auto 0
Setting up auth
  /usr/bin/git config --local --name-only --get-regexp core\.sshCommand
  /usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
  /usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
  /usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
  /usr/bin/git config --local http.https://github.com/.extraheader AUTHORIZATION: basic ***
Fetching the repository
  /usr/bin/git -c protocol.version=2 fetch --prune --no-recurse-submodules --depth=383 origin +8e7ea3919c1b60a9e0e616fba355c7010c458f99:refs/remotes/origin/backports/v0.5
  From https://github.com/celeritas-project/celeritas
   * [new ref]         8e7ea3919c1b60a9e0e616fba355c7010c458f99 -> origin/backports/v0.5
   * [new tag]         v0.4.1     -> v0.4.1
   * [new tag]         v0.4.1-rc.1 -> v0.4.1-rc.1
   * [new tag]         v0.5.0     -> v0.5.0
   * [new tag]         v0.5.0-dev -> v0.5.0-dev
   * [new tag]         v0.5.0-rc.1 -> v0.5.0-rc.1
   * [new tag]         v0.6.0-dev -> v0.6.0-dev
Determining the checkout info
/usr/bin/git sparse-checkout disable
/usr/bin/git config --local --unset-all extensions.worktreeConfig
Checking out the ref
  /usr/bin/git checkout --progress --force -B backports/v0.5 refs/remotes/origin/backports/v0.5
  Switched to a new branch 'backports/v0.5'
  branch 'backports/v0.5' set up to track 'origin/backports/v0.5'.
/usr/bin/git log -1 --format=%H
8e7ea3919c1b60a9e0e616fba355c7010c458f99
Full run output with git 2.48.0
Run actions/checkout@v4
  with:
    fetch-depth: 383
    fetch-tags: true
    repository: celeritas-project/celeritas
    token: ***
    ssh-strict: true
    ssh-user: git
    persist-credentials: true
    clean: true
    sparse-checkout-cone-mode: true
    show-progress: true
    lfs: false
    submodules: false
    set-safe-directory: true
  env:
    SPACK_REF: 866785bd74964142e4b47bf71bee68d7426c84ee
    CCACHE_DIR: /home/runner/work/celeritas/celeritas/.ccache
    CCACHE_MAXSIZE: 100Mi
    CMAKE_PRESET: reldeb-vecgeom
    SPACK_VIEW: /opt/spack-view
    SPACK_BUILDCACHE: celer-buildcache
    CC: clang-18
    CXX: clang++-18
    CLANG_TIDY: clang-tidy-18
    CXXSTD: 17
Syncing repository: celeritas-project/celeritas
Getting Git version info
  Working directory is '/home/runner/work/celeritas/celeritas'
  /usr/bin/git version
  git version 2.48.0
Temporarily overriding HOME='/home/runner/work/_temp/8b79ca34-cc4e-479d-94c7-49fec4fb5080' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
/usr/bin/git config --global --add safe.directory /home/runner/work/celeritas/celeritas
Deleting the contents of '/home/runner/work/celeritas/celeritas'
Initializing the repository
  /usr/bin/git init /home/runner/work/celeritas/celeritas
  hint: Using 'master' as the name for the initial branch. This default branch name
  hint: is subject to change. To configure the initial branch name to use in all
  hint: of your new repositories, which will suppress this warning, call:
  hint:
  hint: 	git config --global init.defaultBranch 
  hint:
  hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
  hint: 'development'. The just-created branch can be renamed via this command:
  hint:
  hint: 	git branch -m 
  Initialized empty Git repository in /home/runner/work/celeritas/celeritas/.git/
  /usr/bin/git remote add origin https://github.com/celeritas-project/celeritas
Disabling automatic garbage collection
  /usr/bin/git config --local gc.auto 0
Setting up auth
  /usr/bin/git config --local --name-only --get-regexp core\.sshCommand
  /usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
  /usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
  /usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
  /usr/bin/git config --local http.https://github.com/.extraheader AUTHORIZATION: basic ***
Fetching the repository
  /usr/bin/git -c protocol.version=2 fetch --prune --no-recurse-submodules --depth=383 origin +8e7ea3919c1b60a9e0e616fba355c7010c458f99:refs/remotes/origin/backports/v0.5
  From https://github.com/celeritas-project/celeritas
   * [new ref]         8e7ea3919c1b60a9e0e616fba355c7010c458f99 -> origin/backports/v0.5
Determining the checkout info
/usr/bin/git sparse-checkout disable
/usr/bin/git config --local --unset-all extensions.worktreeConfig
Checking out the ref
  /usr/bin/git checkout --progress --force -B backports/v0.5 refs/remotes/origin/backports/v0.5
  Switched to a new branch 'backports/v0.5'
  branch 'backports/v0.5' set up to track 'origin/backports/v0.5'.
/usr/bin/git log -1 --format=%H
8e7ea3919c1b60a9e0e616fba355c7010c458f99

This issue first appeared when the GHA ubuntu-24.04 runner image updated from 20250105.1.0 to 20250113.1.0 .

@sethrj
Copy link
Author

sethrj commented Jan 14, 2025

...looking at #2039 which hopefully fixes this: I presume the difference is that with 2.47, tags in the fetch depth are fetched by default, and with 2.48 they're not?

@glatterf42
Copy link

Same here, but the issue only appears on the macos runners for us. There, also the install path changed between git versions: /opt/homebrew/bin/git for 2.47.1, but /usr/local/bin/git for 2.48.0 (which was updated by the same runner image update from 20250106 to 20250113).

@khaeru
Copy link

khaeru commented Jan 20, 2025

This appears to have been reported to the git@vger.kernel.org mailing list; see here for the entire thread. AFAICT, there does not appear to be any fix yet in 2.48.1 or on master.

khaeru added a commit to iiasa/ixmp that referenced this issue Jan 20, 2025
khaeru added a commit to iiasa/ixmp that referenced this issue Jan 20, 2025
khaeru added a commit to iiasa/ixmp that referenced this issue Jan 20, 2025
khaeru added a commit to iiasa/ixmp that referenced this issue Jan 20, 2025
Matyrobbrt added a commit to neoforged/actions that referenced this issue Jan 23, 2025
The Git version on Ubuntu runners was updated 2 hours ago causing all of our builds to fail
Jonathing added a commit to Jonathing/SharedActions that referenced this issue Jan 27, 2025
LexManos pushed a commit to MinecraftForge/SharedActions that referenced this issue Jan 27, 2025
sethrj added a commit to sethrj/celeritas that referenced this issue Jan 27, 2025
sethrj added a commit to celeritas-project/celeritas that referenced this issue Jan 27, 2025
* Remove Demarteau and Romano

* Add a note recommending reevaluating at the beginning of the year

* Work around actions/checkout#2041
@TingluoHuang
Copy link
Member

Thanks for reporting this.
We are working on rollback the git version on those hosted runner images. 🙇

@topdawg3030
Copy link

So an NAI has my immediate attention now that it's been announced that it will have the best possible future for the team as well as a new product that I believe will make the best possible market for this project as well as the future. Meeting this milestone

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants