Skip to content

Conversation

@octo-sts
Copy link
Contributor

@octo-sts octo-sts bot commented Jun 26, 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 Jun 26, 2025
@octo-sts
Copy link
Contributor Author

octo-sts bot commented Jun 26, 2025

🔄 Build Failed: Git Checkout Error

FAIL Expected commit 4a1db0db3b144a42daa0887e904f942a55fe5b6b for 11.2.2, found 965123445745f50c7fc001c72a96650518c267d2

Build Details

Category Details
Build System melange
Failure Point git checkout step in melange build process

Root Cause Analysis 🔍

The build failed because the git checkout step encountered a commit hash mismatch. The expected commit hash for tag 11.2.2 (4a1db0db3b144a42daa0887e904f942a55fe5b6b) doesn't match the actual commit hash found in the repository (965123445745f50c7fc001c72a96650518c267d2). This could be due to the tag being moved in the upstream repository, or an incorrect expected commit hash in the build configuration.


🔍 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

  • replacement at line 83 (pipeline.git-checkout.expected-commit)
    Original:
expected-commit: 4a1db0db3b144a42daa0887e904f942a55fe5b6b

Replacement:

expected-commit: 965123445745f50c7fc001c72a96650518c267d2
  • replacement at line 91 (pipeline.git-checkout.expected-commit)
    Original:
expected-commit: 4a1db0db3b144a42daa0887e904f942a55fe5b6b

Replacement:

expected-commit: 965123445745f50c7fc001c72a96650518c267d2
Click to expand fix analysis

Analysis

After examining the build failure and similar fixed issues, a clear pattern emerges. In all three previous examples, the error was the same: a mismatch between the expected commit hash in the melange YAML file and the actual commit hash found in the repository for a specific tag. In each case, the fix was to update the expected-commit value in the git-checkout step to match the current commit hash that the tag points to. This is a common issue that occurs when tags in upstream repositories are rebased or otherwise moved to point to different commits than they originally did.

For the current Drupal 11.2.2 build failure, the expected commit hash (4a1db0db3b144a42daa0887e904f942a55fe5b6b) doesn't match the actual commit hash (965123445745f50c7fc001c72a96650518c267d2) for the 11.2.2 tag in the Drupal repository. The solution is to update the expected-commit value in the git-checkout step to match the current commit hash for the 11.2.2 tag.

Click to expand fix explanation

Explanation

The build failure is occurring because the git-checkout step expects a specific commit hash (4a1db0db3b144a42daa0887e904f942a55fe5b6b) for the 11.2.2 tag, but when it tries to check out that tag, it finds a different commit hash (965123445745f50c7fc001c72a96650518c267d2). This mismatch causes the build to fail.

The error message clearly indicates this mismatch: "FAIL Expected commit 4a1db0db3b144a42daa0887e904f942a55fe5b6b for 11.2.2, found 965123445745f50c7fc001c72a96650518c267d2".

This situation often happens in active repositories when tags are moved due to rebasing, amended commits, or other Git operations by the upstream maintainers. The fix is to update our expected commit hash to match the current reality.

I've updated both git-checkout steps in the pipeline to use the new commit hash. There are two separate git-checkout operations that need to be updated:

  1. The first one checks out the drupal/drupal.git repository with the 11.2.2 tag
  2. The second one checks out the drupal/recommended-project.git repository with the same tag

Both need to be updated to expect the new commit hash. This change allows the build to continue without failing the hash verification step.

Click to expand alternative approaches

Alternative Approaches

  • Instead of hardcoding the expected commit hash, it could be possible to configure the git-checkout step to skip commit verification by removing the expected-commit field entirely. However, this would remove an important safety check that ensures we're building exactly what we expect.
  • Another approach would be to pin the package to a specific commit hash instead of a tag. This would provide more stability but would make it harder to follow upstream version updates.
  • If this issue occurs frequently with this repository, we could implement a more dynamic approach that fetches the current commit hash for a tag before the build starts, but this would add complexity to the build 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 Jun 26, 2025
@AmberArcadia AmberArcadia self-assigned this Jun 27, 2025
@octo-sts octo-sts bot added the bincapz/blocking Bincapz (aka malcontent) scan results detected CRITICALs on the packages. label Jun 30, 2025
@AmberArcadia AmberArcadia requested a review from a team June 30, 2025 16:21
@egibs egibs added the malcontent/reviewed The malcontent findings in this PR have been manually reviewed by security. label Jul 2, 2025
@AmberArcadia AmberArcadia merged commit c7acade into main Jul 2, 2025
17 of 18 checks passed
@AmberArcadia AmberArcadia deleted the wolfictl-6d62234f-65fd-45bd-951e-52bed52d6665 branch July 2, 2025 14:03
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/blocking Bincapz (aka malcontent) scan results detected CRITICALs on the packages. drupal-11 malcontent/reviewed The malcontent findings in this PR have been manually reviewed by security. request-version-update request for a newer version of a package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants