Skip to content

Conversation

@octo-sts
Copy link
Contributor

@octo-sts octo-sts bot commented Jul 18, 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 drupal-11 labels Jul 18, 2025
@octo-sts
Copy link
Contributor Author

octo-sts bot commented Jul 18, 2025

🔄 Build Failed: Git Checkout Error

FAIL Expected commit 4a1db0db3b144a42daa0887e904f942a55fe5b6b for 11.2.2, found 965123445745f50c7fc001c72a96650518c267d2

Build Details

Category Details
Build System git
Failure Point git checkout origin/tags/11.2.2

Root Cause Analysis 🔍

The build fails because the actual commit hash for Drupal tag 11.2.2 doesn't match the expected commit hash specified in the build configuration. The expected commit was 4a1db0db3b144a42daa0887e904f942a55fe5b6b, but the actual commit when checking out tag 11.2.2 was 965123445745f50c7fc001c72a96650518c267d2.


🔍 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: drupal-11.yaml

  • replace at line 74 (pipeline.uses: git-checkout.with.expected-commit)
    Original:
      expected-commit: 4a1db0db3b144a42daa0887e904f942a55fe5b6b

Replacement:

      expected-commit: 965123445745f50c7fc001c72a96650518c267d2
Click to expand fix analysis

Analysis

In both of the similar fixed issues, the build failure was caused by a mismatch between the expected commit hash and the actual commit hash when checking out a Git tag. This happens because the expected-commit in the configuration file was not updated to match the current commit that the tag points to. The pattern in the fixes shows that:

  1. In Fix Example #0 (trino.yaml), they updated the expected-commit value to match the actual commit hash found during checkout.
  2. In Fix Example Add binutils-2.39 configuration #1 (gitlab-runner), they also updated the expected-commit to match the actual commit hash that the tag points to.

This pattern indicates that when Git tags are updated or moved in the upstream repository, the expected-commit value in the build configuration needs to be updated accordingly.

Click to expand fix explanation

Explanation

The build failure occurs because the expected commit hash for Drupal tag 11.2.2 (4a1db0db3b144a42daa0887e904f942a55fe5b6b) doesn't match the actual commit hash (965123445745f50c7fc001c72a96650518c267d2) found when checking out this tag.

This mismatch can happen for several reasons:

  1. The tag was moved to point to a different commit by the upstream repository maintainers
  2. There was a force push that changed the commit history
  3. The tag might be pointing to a tag object rather than directly to a commit

By updating the expected-commit value to match the actual commit hash, we're telling the build system to expect the correct commit when checking out the tag. The system performs this validation to ensure reproducible builds and detect potential issues like moved tags or unexpected changes in the repository.

The error message clearly indicates the actual commit hash that was found (965123445745f50c7fc001c72a96650518c267d2), which is what we should use to update the expected-commit field in the configuration.

Click to expand alternative approaches

Alternative Approaches

  • Instead of updating the expected-commit, we could pin to a specific commit rather than a tag by removing the tag parameter and using only the commit hash. However, this approach would make future updates more difficult as we'd lose the connection to upstream versioning.
  • Another approach would be to add a verification step in the pipeline that retrieves the actual commit hash for a tag first, then uses that hash for checkout. This would make the build more resilient to tag changes but adds complexity.
  • For a more comprehensive solution, we could implement a pre-build script that automatically updates the expected-commit hash in the YAML file whenever a version bump occurs, ensuring the hash is always current.

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 18, 2025
Signed-off-by: Batuhan Apaydin <batuhan.apaydin@chainguard.dev>
@developer-guy developer-guy self-assigned this Jul 20, 2025
@developer-guy developer-guy requested a review from a team July 20, 2025 15:42
@vishal-chdhry vishal-chdhry merged commit 53e508a into main Jul 21, 2025
17 checks passed
@vishal-chdhry vishal-chdhry deleted the wolfictl-b6768641-0243-472e-ac70-adad5c2617ca branch July 21, 2025 02:18
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 drupal-11 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