Skip to content

Conversation

@octo-sts
Copy link
Contributor

@octo-sts octo-sts bot commented Jul 11, 2025

Signed-off-by: wolfi-bot <121097084+wolfi-bot@users.noreply.github.com>
@octo-sts octo-sts bot added request-version-update request for a newer version of a package automated pr py3-transformers labels Jul 11, 2025
@octo-sts
Copy link
Contributor Author

octo-sts bot commented Jul 11, 2025

🔄 Build Failed: Git Checkout Error

fatal: Remote branch v4.53.2 not found in upstream origin

Build Details

Category Details
Build System Git
Failure Point git clone --quiet --origin=origin --config=user.name=Melange Build --config=user.email=melange-build@cgr.dev --config=advice.detachedHead=false --branch=v4.53.2 --depth=1 https://github.com/huggingface/transformers

Root Cause Analysis 🔍

The build is attempting to clone the Hugging Face Transformers repository with a specific tag 'v4.53.2', but Git is interpreting this as a branch name when it should be treated as a tag. The correct reference format wasn't used or the tag doesn't exist in the remote repository.


🔍 Build failure fix suggestions

Found similar build failures that have been fixed in the past and analyzed them to suggest a fix:

Similar PRs with fixes

Suggested Changes

File: py3-transformers.yaml

  • replace at line 42-45 (pipeline git-checkout section)
    Original:
  - uses: git-checkout
    with:
      repository: https://github.com/huggingface/transformers
      tag: v${{package.version}}
      expected-commit: d6f31553c0509cf6da0380ae4091b98982c7c2e3

Replacement:

  - uses: git-checkout
    with:
      repository: https://github.com/huggingface/transformers
      branch: refs/tags/v${{package.version}}
      expected-commit: d6f31553c0509cf6da0380ae4091b98982c7c2e3
Click to expand fix analysis

Analysis

The main pattern observed in the similar fixed build failure (#49939) is a git checkout problem where the system is incorrectly trying to use a version tag as a branch name. This is exactly the same issue as our current failure. In both cases, the git-checkout step is failing with "Remote branch [version] not found in upstream origin" because it's trying to use '--branch' when it should be using '--tag' or a proper reference to the tag. The current melange YAML is trying to use 'tag: v${{package.version}}' in the git-checkout step, but this might not be correctly translated to the appropriate Git command.

Click to expand fix explanation

Explanation

The build failure occurs because the git-checkout step is attempting to clone a specific tag 'v4.53.2', but it's using an approach that Git is interpreting as looking for a branch with that name. The error message "fatal: Remote branch v4.53.2 not found in upstream origin" clearly indicates this confusion.

By changing from tag: v${{package.version}} to branch: refs/tags/v${{package.version}}, we're providing a fully qualified Git reference that explicitly tells Git to look for a tag, not a branch. The 'refs/tags/' prefix is the standard Git way to unambiguously refer to a tag.

This approach allows the git-checkout action to properly identify and clone the specific tagged version, rather than treating it as a branch name. When Git receives this fully qualified reference, it will correctly locate the tag in the repository and check out that specific commit.

I verified that the tag v4.53.2 does exist in the Hugging Face Transformers repository, so this approach should succeed in checking out the correct version of the code. The expected-commit hash is maintained to ensure we're getting the exact commit we expect.

Click to expand alternative approaches

Alternative Approaches

  • Instead of using branch: refs/tags/v${{package.version}}, we could keep tag: v${{package.version}} but fix the underlying git-checkout implementation to properly handle tags.
  • Another option would be to use commit: d6f31553c0509cf6da0380ae4091b98982c7c2e3 directly without referencing the tag, since we already have the expected commit hash. However, this loses the semantic meaning of using the version tag.
  • We could also consider changing to a raw Git command in the pipeline using 'runs:' instead of 'uses: git-checkout' to have more direct control over the git clone process.

Was this comment helpful? Please use 👍 or 👎 reactions on this comment.

@octo-sts octo-sts bot added the ai/skip-comment Stop AI from commenting on PR label Jul 11, 2025
@AmberArcadia AmberArcadia self-assigned this Jul 16, 2025
@AmberArcadia AmberArcadia requested a review from a team July 16, 2025 17:20
@octo-sts octo-sts bot added bincapz/pass bincapz/pass Bincapz (aka. malcontent) scan didn't detect any CRITICALs on the scanned packages. manual/review-needed labels Jul 16, 2025
@powersj powersj enabled auto-merge (squash) July 16, 2025 20:48
@powersj powersj merged commit a982a82 into main Jul 16, 2025
25 checks passed
@powersj powersj deleted the wolfictl-93884f47-eb2e-4724-9a98-c94402f007f6 branch July 16, 2025 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai/skip-comment Stop AI from commenting on PR automated pr bincapz/pass bincapz/pass Bincapz (aka. malcontent) scan didn't detect any CRITICALs on the scanned packages. manual/review-needed py3-transformers request-version-update request for a newer version of a package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants