Skip to content

Conversation

@octo-sts
Copy link
Contributor

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

@octo-sts octo-sts bot added request-version-update request for a newer version of a package automated pr ruby-3.3 labels Jul 24, 2025
@octo-sts
Copy link
Contributor Author

octo-sts bot commented Jul 24, 2025

🔄 Build Failed: Git Checkout Error

FAIL Expected commit b200bad6cd40d08e9f33b93e1a85c270b337867c for v3_3_9, found f5c772fc7cbe9f5b58d962939fcb1c7e3fb1cfa6

Build Details

Category Details
Build System git
Failure Point git checkout stage during the Melange build process

Root Cause Analysis 🔍

The build expects a specific Git commit hash (b200bad6cd40d08e9f33b93e1a85c270b337867c) for the Ruby v3_3_9 tag, but found a different commit hash (f5c772fc7cbe9f5b58d962939fcb1c7e3fb1cfa6). This mismatch caused the build to fail as the expected commit validation check failed.


🔍 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: ruby-3.3.yaml

  • replace at line 71 (pipeline git-checkout section)
    Original:
      expected-commit: b200bad6cd40d08e9f33b93e1a85c270b337867c

Replacement:

      expected-commit: f5c772fc7cbe9f5b58d962939fcb1c7e3fb1cfa6
Click to expand fix analysis

Analysis

The pattern in the similar fixed build failures is clear: in all three examples, the build failed because the expected Git commit hash in the Melange YAML file didn't match the actual commit hash for the specified tag in the repository. This mismatch occurs because the upstream repository's tags may have been updated or moved since the package definition was created.

Each fix involved updating the expected-commit value in the git-checkout section of the Melange YAML file to match the current commit hash that the tag points to. In some cases, this was accompanied by version bumps or epoch updates, but the core fix was always updating the expected commit hash.

Click to expand fix explanation

Explanation

The build is failing because the expected Git commit hash in the Melange YAML file (b200bad6cd40d08e9f33b93e1a85c270b337867c) doesn't match the actual commit hash that the v3_3_9 tag points to in the Ruby repository (f5c772fc7cbe9f5b58d962939fcb1c7e3fb1cfa6).

This mismatch can occur for several reasons:

  1. The upstream repository may have moved the tag to a different commit
  2. The tag might have been force-updated with new changes
  3. The original commit hash might have been incorrectly specified

The error message explicitly states that the build expects commit b200bad6cd40d08e9f33b93e1a85c270b337867c for the v3_3_9 tag, but found f5c772fc7cbe9f5b58d962939fcb1c7e3fb1cfa6. The simplest solution is to update the expected-commit value to match the current commit hash that the tag points to.

The upstream change log confirms that there have been numerous bug fixes between versions, which explains why the commit hash might have changed. By updating the expected-commit value, we're acknowledging these changes and allowing the build to proceed with the current state of the upstream repository.

Click to expand alternative approaches

Alternative Approaches

  • We could remove the 'expected-commit' check entirely by removing that line, which would allow the build to proceed with whatever commit the tag points to. However, this would reduce security as the expected-commit check helps ensure that the code being built is what was expected and reviewed.
  • Another approach would be to pin to a specific commit instead of using a tag, but this would make future updates more difficult and wouldn't align with Wolfi's principle of keeping packages updated with upstream releases.
  • We could fork the upstream repository and maintain our own tagged versions with stable commit hashes, but this adds maintenance overhead and diverges from the upstream source.

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 24, 2025
@debasishbsws debasishbsws self-assigned this Jul 28, 2025
…version` for proper commit bumpin

* Melange now only updates `expected-commit` in `git-checkout` when tags match either `${{package.version}}` or `${{vars.mangled-package-version}}` ([melange#2008](chainguard-dev/melange#2008))
* Previously we used a custom var `underscore-package-version`, which is no longer recognized by the updater logic
* This change renames `underscore-package-version` to `mangled-package-version` so it integrates correctly with Melange's update mechanism and enables automatic commit updates 
* fix the commit SHA

Signed-off-by: Debasish Biswas <[email protected]>
@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 28, 2025
@debasishbsws debasishbsws requested a review from a team July 28, 2025 15:23
@AmberArcadia AmberArcadia merged commit 9706d6e into main Jul 28, 2025
18 checks passed
@AmberArcadia AmberArcadia deleted the wolfictl-8183e960-a9bc-4799-9a96-fc406af881a7 branch July 28, 2025 15:34
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 request-version-update request for a newer version of a package ruby-3.3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants