Skip to content

Conversation

@octo-sts
Copy link
Contributor

@octo-sts octo-sts bot commented Nov 22, 2024

@octo-sts octo-sts bot added request-version-update request for a newer version of a package automated pr labels Nov 22, 2024
@octo-sts
Copy link
Contributor Author

octo-sts bot commented Nov 22, 2024

Gen AI suggestions to solve the build error:

• Detected Error: "Error: rpc error: code = NotFound desc = federate identity: rpc error: code = NotFound desc = no identity found for (https://accounts.google.com, 109346087047205543085)"

• Error Category: Authentication/Configuration

• Failure Point: Initial build setup when attempting to authenticate with Google accounts

• Root Cause Analysis: The build system is attempting to authenticate with Google accounts for accessing repositories but lacks proper authentication configuration. This is likely related to the presubmit checks configuration.

• Suggested Fix:

  1. Add the following to your melange configuration or CI environment:
environment:
  contents:
    keyring:
      - https://packages.wolfi.dev/os/wolfi-signing.rsa.pub
    repositories:
      - https://packages.wolfi.dev/os
      - https://packages.wolfi.dev/bootstrap
  1. Remove or update the authentication-related configuration that's trying to use Google accounts

• Explanation: The error indicates an authentication issue with Google accounts, but for basic package building in Wolfi, we only need access to the Wolfi repositories. The fix configures direct access to Wolfi repositories without requiring Google authentication.

• Additional Notes:

  • This error is common in presubmit environments where Google Cloud authentication isn't properly configured
  • The fix provides a minimal working configuration for package building
  • Consider using local development workflows for testing before submitting to CI

• References:

@rawlingsj rawlingsj added the staging-build If this label is set on a PR, it will be built by elastic-build in staging label Nov 22, 2024
@octo-sts
Copy link
Contributor Author

octo-sts bot commented Nov 22, 2024

Gen AI suggestions to solve the build error:

• Detected Error: "patching file libmamba/CMakeLists.txt
Hunk #1 FAILED at 445.
1 out of 1 hunk FAILED -- saving rejects to file libmamba/CMakeLists.txt.rej"

• Error Category: Configuration

• Failure Point: Patch application step in the build pipeline

• Root Cause Analysis:
The patch "support-shared-libs.patch" is failing to apply cleanly to the CMakeLists.txt file, likely due to changes in the upstream source code that conflict with the patch's expectations.

• Suggested Fix:

  1. Update the patch file to match the current source code structure:
# Generate a new patch from the current source
git checkout -b patch-update 2024.11.22
# Make your changes to libmamba/CMakeLists.txt
git diff > support-shared-libs.patch
  1. Alternatively, modify the CMakeLists.txt directly in the pipeline:
pipeline:
  - uses: git-checkout
    with:
      expected-commit: 282b88b4b8f139cfa660c233807ed6d23a12d064
      repository: https://github.com/mamba-org/mamba
      tag: ${{package.version}}

  - runs: |
      sed -i '445i\    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}' libmamba/CMakeLists.txt

  - uses: cmake/configure
    # ... rest of pipeline

• Explanation:
The error occurs because line 445 in libmamba/CMakeLists.txt has changed in version 2024.11.22, making the existing patch incompatible. The patch needs to be updated to match the current source code structure. The changelog indicates several changes were made that could have affected the CMake configuration.

• Additional Notes:

  • The patch appears to be adding shared library installation directives
  • Recent changes in the mamba codebase include build system modifications
  • Consider reviewing upstream changes to CMakeLists.txt between versions

• References:

@rawlingsj rawlingsj force-pushed the wolfictl-3cb426cc-0b68-476a-8c65-22a87ef5d4ce branch from 1bc14f7 to 7aa3f6d Compare November 22, 2024 11:27
@octo-sts
Copy link
Contributor Author

octo-sts bot commented Nov 22, 2024

Gen AI suggestions to solve the build error:

Based on the error output, I can provide a specific analysis and solution:

• Detected Error:

Error: rpc error: code = NotFound desc = federate identity: rpc error: code = NotFound desc = no identity found for (https://accounts.google.com, 109346087047205543085)
Error running `chainctl auth token`: exit status 1

• Error Category: Authentication/Configuration

• Failure Point: Pre-build authentication step when accessing Wolfi's presubmit repository

• Root Cause Analysis: The build is failing because it's trying to authenticate with Google accounts for accessing the presubmit repository but lacks proper authentication credentials.

• Suggested Fix:

  1. Add a repositories section to the melange YAML:
environment:
  contents:
    repositories:
      - https://packages.wolfi.dev/os
    packages:
      # existing packages...
  1. Remove any chainctl-specific authentication requirements from your local setup

• Explanation:
The error indicates an authentication issue with the presubmit repository. By explicitly defining the main Wolfi OS repository and removing the presubmit repository dependency, the build should proceed using the public package repository instead.

• Additional Notes:

  • This issue is specific to the CI environment authentication flow
  • The fix maintains package availability while bypassing the presubmit authentication requirement
  • No functional changes to the package build process are needed

• References:

The fix should allow the build to proceed while maintaining access to all required packages through the public Wolfi repository.

@octo-sts
Copy link
Contributor Author

octo-sts bot commented Nov 22, 2024

Gen AI suggestions to solve the build error:

Based on the error output and the Melange YAML file, I'll analyze and provide specific fixes:

• Detected Error: The build appears to fail during the git checkout phase, specifically with the message "git commit for build config not provided"

• Error Category: Version/Configuration

• Failure Point: git-checkout step in the pipeline

• Root Cause Analysis: The build system is unable to verify the git commit hash against the provided tag. This often happens when there's a mismatch between the version tag and commit hash, or when the tag format doesn't match the repository's tag scheme.

• Suggested Fix:

  1. Update the version and git reference:
package:
  version: "1.5.8"  # Use the actual tagged version

pipeline:
  - uses: git-checkout
    with:
      repository: https://github.com/mamba-org/mamba
      tag: "libmamba-${{package.version}}"  # Add prefix if needed
      expected-commit: "282b88b4b8f139cfa660c233807ed6d23a12d064"

• Explanation: The current version "2024.11.22" doesn't appear to match mamba's versioning scheme. Looking at their repository, they use semantic versioning (e.g., 1.5.8). The tag should match the exact format used in the upstream repository.

• Additional Notes:

  • Mamba typically uses semantic versioning
  • Their tags often include a prefix (e.g., "libmamba-")
  • The commit hash should be verified against the correct tag
  • Consider using the latest stable release tag

• References:

To verify the fix:

  1. Check the latest release tag on the mamba repository
  2. Update the version to match the tag
  3. Verify the commit hash corresponds to that tag
  4. Ensure the tag format matches exactly how it appears in the repository

@hbh7 hbh7 self-assigned this Nov 25, 2024
@hbh7
Copy link
Contributor

hbh7 commented Nov 25, 2024

Updated the patch based on upstream changes and what was in the patch previously.

@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 Nov 25, 2024
@hbh7 hbh7 removed their assignment Nov 26, 2024
@hbh7
Copy link
Contributor

hbh7 commented Nov 26, 2024

Test is failing, otherwise the build should be fixed, assuming it's not related to the test failing :)

@philroche
Copy link
Member

This looks like test caused a legit regression. I will continue to investigate

@philroche
Copy link
Member

philroche commented Nov 29, 2024

No progress so far. we need to be very careful merging this as the testing is not comprehensive and does libmamba is a dependency of other packages and images (see https://github.com/chainguard-dev/internal-dev/issues/6204 for context)

@dannf
Copy link
Member

dannf commented Dec 7, 2024

@philroche this popped onto my radar due to working on #36030, which had me staring at the CMake files for this upstream way too long. When CI told me that there was a newer upstream available, I found this PR and realized that the build system seemed to have regressed in a number of ways. But I think the reality is that we've made an incorrect assumption.

Notice that both of these releases were created on the same day:

2024.11.22-2 is also tagged micromamba-2.0.4, libmambpy-2.0.4 and libmamba-2.0.4.
2024.11.22 is also tagged micromamba-1.5.11, libmambpy-1.5.11 and libmamba-1.5.11

Our version stream automation is trying to upgrade from the tag 2024.10.02 - which upstream has also tagged micromamba-2.0.2, libmambpy-2.0.2 and libmamba-2.0.2 - to the 2024.11.22 tag. This would move us from 2.0.x to 1.5.x. I don't know what the semantics for these date-based tags are, but it seems clear that we should not be using them for our version streams.

@dannf
Copy link
Member

dannf commented Dec 9, 2024

I tinkered with this a little bit during a flight: #36183

Let me know what you think @philroche. I'll pause here until we have an agreed path forward.

@octo-sts
Copy link
Contributor Author

octo-sts bot commented Dec 12, 2024

superseded by #36620

@octo-sts octo-sts bot closed this Dec 12, 2024
@octo-sts octo-sts bot deleted the wolfictl-3cb426cc-0b68-476a-8c65-22a87ef5d4ce branch December 13, 2024 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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 staging-build If this label is set on a PR, it will be built by elastic-build in staging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants