Skip to content

Conversation

@octo-sts
Copy link
Contributor

@octo-sts octo-sts bot commented Jun 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 gitlab-runner-18.0 labels Jun 11, 2025
@octo-sts
Copy link
Contributor Author

octo-sts bot commented Jun 11, 2025

🔄 Build Failed: Git Checkout Error

FAIL Expected commit 4e717029caf97ec9d98fb87cfa7cee462ac0f81c for v0.0.15, found 2387d5988168d327b3ae2fc176d01648e815437e

Build Details

Category Details
Build System Melange (Wolfi Linux package build system)
Failure Point git checkout step for base-images repository

Root Cause Analysis 🔍

The build is expecting a specific commit hash (4e717029caf97ec9d98fb87cfa7cee462ac0f81c) for tag v0.0.15 in the base-images repository, but found a different commit hash (2387d5988168d327b3ae2fc176d01648e815437e). This mismatch is causing the build to fail because the expected commit doesn't match the actual commit for the specified tag.


🔍 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: gitlab-runner-18.0.yaml

  • replacement at line 50-54 (pipeline section)
    Original:
  - uses: git-checkout
    with:
      repository: https://gitlab.com/gitlab-org/ci-cd/runner-tools/base-images
      tag: v${{vars.base-images-tag}}
      expected-commit: 4e717029caf97ec9d98fb87cfa7cee462ac0f81c
      destination: ./base-images

Replacement:

  - uses: git-checkout
    with:
      repository: https://gitlab.com/gitlab-org/ci-cd/runner-tools/base-images
      tag: v${{vars.base-images-tag}}
      expected-commit: ${{vars.base-images-commit}}
      destination: ./base-images
  • replacement at line 72-76 (pipeline section)
    Original:
  - uses: git-checkout
    with:
      repository: https://gitlab.com/gitlab-org/ci-cd/docker-machine
      tag: ${{vars.docker-machine-tag}}
      expected-commit: 4e717029caf97ec9d98fb87cfa7cee462ac0f81c
      destination: ./machine

Replacement:

  - uses: git-checkout
    with:
      repository: https://gitlab.com/gitlab-org/ci-cd/docker-machine
      tag: ${{vars.docker-machine-tag}}
      expected-commit: ${{vars.docker-machine-commit}}
      destination: ./machine
Click to expand fix analysis

Analysis

The pattern in the similar fixed build failures reveals a consistent issue where the expected commit hash for a specific tag doesn't match the actual commit hash found in the repository. In all three examples, the fix involved updating the expected-commit parameter in the YAML file to match the actual commit hash that exists in the repository for that specific tag.

Looking at the current failure, we see a similar pattern where the build expects commit 4e717029caf97ec9d98fb87cfa7cee462ac0f81c for tag v0.0.15 of the base-images repository, but it found commit 2387d5988168d327b3ae2fc176d01648e815437e instead.

Interestingly, the vars section at the top of the file already has the correct commit hash (2387d5988168d327b3ae2fc176d01648e815437e) for the base-images-tag (0.0.15), but this commit hash isn't being used in the git-checkout step for the base-images repository. Instead, an incorrect commit hash is hardcoded.

Click to expand fix explanation

Explanation

The build failure is occurring because the YAML file has a mismatch between the expected commit hash and the actual commit hash for the tag v0.0.15 of the base-images repository.

The fix is straightforward:

  1. The YAML file already correctly defines base-images-commit: 2387d5988168d327b3ae2fc176d01648e815437e in the vars section at the top.

  2. However, in the git-checkout step for the base-images repository, instead of using this variable, it hardcodes a different commit hash: expected-commit: 4e717029caf97ec9d98fb87cfa7cee462ac0f81c.

  3. Similarly, the git-checkout step for the docker-machine repository also uses the same hardcoded commit hash instead of using the already defined docker-machine-commit variable.

My fix changes both git-checkout steps to use the variable references (${{vars.base-images-commit}} and ${{vars.docker-machine-commit}}) instead of hardcoded commit hashes. This ensures consistency and makes sure that the expected commit hash matches what's defined in the vars section.

This approach aligns with the patterns seen in the successful fixes in the examples, where the expected-commit value was updated to match the actual commit hash for the tag. In our case, we're making a more robust fix by using the variables that are already defined in the YAML file rather than hardcoding the values directly in the git-checkout steps.

Click to expand alternative approaches

Alternative Approaches

  • An alternative approach would be to update the hardcoded expected-commit hash to the correct value (2387d5988168d327b3ae2fc176d01648e815437e) in the base-images git-checkout step. However, using the variable reference is a better practice as it maintains consistency and makes future updates easier.
  • Another approach would be to verify if the tag v0.0.15 has changed in the upstream repository and update both the base-images-tag and base-images-commit values in the vars section. However, since the error specifically shows that the tag exists with commit 2387d5988168d327b3ae2fc176d01648e815437e, it's most likely that the issue is with the expected-commit value in the YAML file rather than a change in the upstream repository.

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 11, 2025
@AmberArcadia AmberArcadia self-assigned this Jun 11, 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 Jun 11, 2025
@AmberArcadia AmberArcadia requested a review from a team June 11, 2025 22:46
@bentasker bentasker merged commit 62188db into main Jun 12, 2025
18 checks passed
@bentasker bentasker deleted the wolfictl-e2fc2217-8092-43ca-b5de-f7da3df9c719 branch June 12, 2025 09:19
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. gitlab-runner-18.0 manual/review-needed 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