Skip to content

Conversation

@octo-sts
Copy link
Contributor

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

@octo-sts octo-sts bot added request-version-update request for a newer version of a package automated pr confluent-kafka P1 This label indicates our scanning found High, Medium or Low CVEs for these packages. labels Jul 4, 2025
@octo-sts
Copy link
Contributor Author

octo-sts bot commented Jul 4, 2025

🔄 Build Failed: Git Checkout Error

fatal: Remote branch v8.1.0-27-ccs not found in upstream origin

Build Details

Category Details
Build System melange
Failure Point git clone --quiet --origin=origin --config=user.name=Melange Build --config=user.email=[email protected] --config=advice.detachedHead=false --branch=v8.1.0-27-ccs --depth=1 https://github.com/confluentinc/kafka /tmp/tmp.HXFJJU

Root Cause Analysis 🔍

The build is attempting to clone a specific branch (v8.1.0-27-ccs) from the Confluent Kafka repository, but this branch doesn't exist in the remote repository. The git checkout operation failed because it couldn't find the specified branch.


🔍 Build failure fix suggestions

Found similar build failures that have been fixed in the past and analyzed them to suggest a fix:

Suggested Changes

File: melange.yaml

  • replace at line around line 47-50 (pipeline git-checkout section)
    Original:
  - uses: git-checkout
    with:
      expected-commit: c93a7e60acda2f0e89fffcf8accb46f7f4033210
      repository: https://github.com/confluentinc/kafka
      tag: v${{vars.mangled-package-version}}

Replacement:

  - uses: git-checkout
    with:
      expected-commit: c93a7e60acda2f0e89fffcf8accb46f7f4033210
      repository: https://github.com/confluentinc/kafka
      branch: v${{vars.mangled-package-version}}
      depth: 1

File: melange.yaml

  • replace at line around line 110-119 (update section)
    Original:
  git:
    strip-prefix: v
    strip-suffix: -ccs

Replacement:

  git:
    strip-prefix: v
    strip-suffix: -ccs
    repository: https://github.com/confluentinc/kafka
Click to expand fix analysis

Analysis

The build failure is occurring because the Git checkout step is trying to fetch a branch named "v8.1.0-27-ccs" from the Confluent Kafka repository, but this branch doesn't exist. Looking at the Melange YAML file, I can see that the var-transforms section is creating a "mangled-package-version" variable that's being used in the git-checkout step as the tag parameter. This suggests that the repository likely uses tags rather than branches for versioning, but the current configuration is incorrectly specifying this as a branch parameter.

Click to expand fix explanation

Explanation

The main issue is that the git-checkout step is incorrectly configured. The error message indicates that the build is trying to find a remote branch named 'v8.1.0-27-ccs', but it's failing with "Remote branch v8.1.0-27-ccs not found in upstream origin".

Looking at the error message more closely, the command that's failing is:

git clone --quiet --origin=origin --config=user.name=Melange Build [email protected] --config=advice.detachedHead=false --branch=v8.1.0-27-ccs --depth=1 https://github.com/confluentinc/kafka /tmp/tmp.HXFJJU

The key issue is that the --branch parameter is being used, but the YAML file is setting the tag parameter, not the branch parameter. This suggests a discrepancy in how the Melange build tool is interpreting these parameters.

The fix changes the tag parameter to branch in the git-checkout step to match the actual command being executed. I've also added the depth: 1 parameter to match what's being used in the command.

Additionally, I've updated the update section to explicitly specify the repository URL for consistency, which can help ensure the version monitoring and updates work correctly.

This should address the core issue where the build system is trying to find a branch that doesn't exist, by ensuring the YAML configuration matches the expected command-line parameters.

Click to expand alternative approaches

Alternative Approaches

  • Use specific commit instead of branch/tag: We could modify the git-checkout to only use the expected-commit parameter and remove the branch/tag parameter entirely, which would bypass the branch/tag lookup issue.
  • Check if the version exists as a tag instead: It's possible that the version exists as a tag rather than a branch. We could try changing the git-checkout to use 'ref' instead of 'branch' or 'tag', which would allow it to check both tags and branches.
  • Explore other version formats: The current version transformation might not match what's available in the repository. We could investigate the actual tag/branch naming convention used by Confluent Kafka and adjust the var-transforms section accordingly.

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 4, 2025
@OddBloke OddBloke self-assigned this Jul 4, 2025
@OddBloke OddBloke removed their assignment Jul 4, 2025
@octo-sts octo-sts bot closed this Jul 5, 2025
@octo-sts
Copy link
Contributor Author

octo-sts bot commented Jul 5, 2025

superseded by #58404

@octo-sts octo-sts bot deleted the wolfictl-909461a1-2c17-4aed-a141-d326f94ea98f branch July 6, 2025 00: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 confluent-kafka P1 This label indicates our scanning found High, Medium or Low CVEs for these packages. request-version-update request for a newer version of a package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants