Skip to content

Conversation

@octo-sts
Copy link
Contributor

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

No description provided.

@octo-sts
Copy link
Contributor Author

octo-sts bot commented Jul 20, 2025

🔄 Build Failed: Git Checkout Error

FAIL Expected commit a475da5c8822e4a5bda5c69bb4cfa6dd44310c2a for v18.2.0, found ff26d676ba9908ab5fb2e027c08438804816511e

Build Details

Category Details
Build System git
Failure Point git checkout step for Gitaly source code

Root Cause Analysis 🔍

The build process attempted to checkout a specific commit with hash a475da5c8822e4a5bda5c69bb4cfa6dd44310c2a for tag v18.2.0, but the actual commit found with that tag was ff26d676ba9908ab5fb2e027c08438804816511e. This indicates that the expected commit hash in the build configuration doesn't match the actual commit hash for the specified tag in the 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: gitaly-18.2.yaml

  • replace at line 44 (pipeline.git-checkout.expected-commit)
    Original:
      expected-commit: a475da5c8822e4a5bda5c69bb4cfa6dd44310c2a

Replacement:

      expected-commit: ff26d676ba9908ab5fb2e027c08438804816511e
Click to expand fix analysis

Analysis

The common pattern across all three similar fixed build failures is the mismatch between the expected commit hash and the actual commit hash for a specific tag. In each case, the fix involved updating the expected-commit value in the git-checkout step to match the actual commit hash that the tag points to. This pattern suggests that when tags are updated or modified in the upstream repository, the commit they reference can change, causing this type of build failure.

Specifically:

  1. In Fix Example #0, they updated the expected commit hash for gitlab-runner v17.11.0 from an incorrect value to the actual commit the tag pointed to: 0f67ff190a5f069ef1e46f2a8950e1319e71d6e4
  2. In Fix Example Add binutils-2.39 configuration #1, they updated the expected commit for Trino tag 475 to fd2b81e86ba1c288684746d0842c0ffc3a709598 (which was the actual commit hash found)
  3. In Fix Example Add pax-utils into the OS. #2, they updated the expected commit for TruffleHog v3.88.17 to 12164e38f0f1b673ab0594c7d94daf71b0be6823 (which was the actual commit hash found)
Click to expand fix explanation

Explanation

The build failure occurs because the Gitaly git repository tag v18.2.0 is actually pointing to commit ff26d676ba9908ab5fb2e027c08438804816511e, but the build configuration expects it to point to commit a475da5c8822e4a5bda5c69bb4cfa6dd44310c2a.

This mismatch causes the git-checkout step to fail with the error message: "FAIL Expected commit a475da5c8822e4a5bda5c69bb4cfa6dd44310c2a for v18.2.0, found ff26d676ba9908ab5fb2e027c08438804816511e".

The fix is straightforward: update the expected-commit value in the git-checkout step to match the actual commit hash that the v18.2.0 tag currently points to. This allows the build process to continue without errors while still ensuring that a specific, known commit is being used (which is important for reproducibility and security).

This solution directly addresses the root cause of the error and aligns with the fixes applied to similar issues in the past. By updating the expected commit hash, we maintain the integrity check while accommodating the actual state of the upstream repository.

Click to expand alternative approaches

Alternative Approaches

  • Instead of updating the expected commit hash, we could specify a specific commit directly rather than using a tag. This would be more stable but would make it harder to track upstream versioning.
  • Another approach would be to implement a verification step that checks both the tag and the commit hash separately, allowing the build to continue but warning about the mismatch. However, this would be more complex and wouldn't align with Wolfi's security principles.
  • We could investigate why the tag points to a different commit than expected - it could be that the tag was moved in the upstream repository, which might indicate a potential security concern. However, for immediate fix purposes, updating the expected commit is sufficient.

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 20, 2025
@OddBloke OddBloke self-assigned this Jul 21, 2025
@octo-sts octo-sts bot added the bincapz/pass bincapz/pass Bincapz (aka. malcontent) scan didn't detect any CRITICALs on the scanned packages. label Jul 21, 2025
@OddBloke OddBloke requested a review from a team July 21, 2025 14:07
@AmberArcadia AmberArcadia merged commit bd94063 into main Jul 21, 2025
18 checks passed
@AmberArcadia AmberArcadia deleted the gitaly-18.2 branch July 21, 2025 16:23
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. service:version-stream

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants