Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use 3.2.62 version with newrelic-infrastructure-bundle package #38577

Merged
merged 3 commits into from
Jan 4, 2025

Conversation

octo-sts[bot]
Copy link
Contributor

@octo-sts octo-sts bot commented Jan 1, 2025

Upstream removed v3.2.63 tag. Separate PR to clean up: #38749

@octo-sts octo-sts bot added request-version-update request for a newer version of a package automated pr labels Jan 1, 2025
Copy link
Contributor Author

octo-sts bot commented Jan 1, 2025

Gen AI suggestions to solve the build error:

Based on the error log and the melange YAML file, I'll analyze and provide a solution:

• Detected Error: The build is failing during Git checkout stage, though the specific error isn't shown in the logs

• Error Category: Version/Commit

• Failure Point: git-checkout pipeline step

• Root Cause Analysis: The expected commit hash (9885fc554171f891869b1a30e09789ef2f63ffb2) likely doesn't match the commit at tag v3.2.63, causing the checkout to fail

• Suggested Fix:

  1. Update the expected-commit hash in the YAML file:
  - uses: git-checkout
    with:
      repository: https://github.com/newrelic/infrastructure-bundle
      tag: v${{package.version}}
      # Remove or update expected-commit field
      destination: ${{package.name}}

• Explanation:

  • The expected-commit field is causing validation failure because it's trying to enforce a specific commit hash
  • Since this is a version bump package, the commit hash needs to match the new version tag
  • Removing the expected-commit allows the checkout to use the commit referenced by the tag

• Additional Notes:

  • The expected-commit field is optional in melange git-checkout
  • For security-sensitive packages, you can re-add the correct commit hash after verifying it
  • You can find the correct commit hash by running:
    git ls-remote https://github.com/newrelic/infrastructure-bundle v3.2.63

• References:

@kranurag7
Copy link
Member

I think upstream deleted one of the tags/releases because the package we've for now is 3.2.63 but that doesn't exist anymore upstream.

https://github.com/newrelic/infrastructure-bundle/tags

If we go back to 3.2.62 then we'll need to withdraw 3.2.63 version so that apk add can pull in the 3.2.62 version.

@kranurag7
Copy link
Member

looking more, I think I would like to remove this version and bump the epoch for the 3.2.62 tag.

@kranurag7
Copy link
Member

use 3.2.62 version and bump the epoch

this is being done because 3.2.63 version doesn't exist upstream.

newrelic-infrastructure-bundle-3.2.62-r0.apk is the apk that exists in
wolfi as of now for 3.2.62 version. So bumping the epoch to 1 and
setting the version to 3.2.62 works here.

there's another PR to remove 3.2.63 version from wolfi
#38749

Signed-off-by: kranurag7 [email protected]

@kranurag7 kranurag7 changed the title newrelic-infrastructure-bundle/3.2.63 package update use 3.2.62 version with newrelic-infrastructure-bundle package Jan 4, 2025
Copy link
Contributor Author

octo-sts bot commented Jan 4, 2025

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: No explicit error message, but the build appears to stop after dependency installation without completing the package build

• Error Category: Configuration

• Failure Point: After dependency installation, before package assembly

• Root Cause Analysis: The pipeline section is essentially empty except for git-checkout and strip. There's no actual build or package assembly steps defined. The strip step is marked as "NO-OP" in comments.

• Suggested Fix:
Add a minimal pipeline step to create the bundle package:

pipeline:
  - uses: git-checkout
    with:
      repository: https://github.com/newrelic/infrastructure-bundle
      tag: v${{package.version}}
      expected-commit: 9885fc554171f891869b1a30e09789ef2f63ffb2
      destination: ${{package.name}}

  - uses: mkdir
    with:
      path: /empty

  - uses: virtual-package

• Explanation:

  • Since this is a bundle package that only declares runtime dependencies, it needs minimal pipeline steps to create a valid package
  • The virtual-package step will create a package with just the dependencies
  • The mkdir step ensures there's a valid filesystem structure
  • This approach matches the intention of the package to be a pure dependency bundle

• Additional Notes:

  • The current YAML tries to be a meta-package but doesn't properly create the package structure
  • The strip step alone isn't sufficient to create a valid package
  • This is a common pattern for meta-packages that just bundle dependencies

• References:

wolfi-bot and others added 2 commits January 4, 2025 10:30
this is being done because 3.2.63 version doesn't exist upstream.

newrelic-infrastructure-bundle-3.2.62-r0.apk is the apk that exists in
wolfi as of now for 3.2.62 version. So bumping the epoch to 1 and
setting the version to 3.2.62 works here.

there's another PR to remove 3.2.63 version from wolfi
#38749

Signed-off-by: kranurag7 <[email protected]>
@kranurag7 kranurag7 force-pushed the wolfictl-fadbad36-50fa-4efa-ba6d-ce2f7865725a branch from d7b2b09 to 9f5a8a3 Compare January 4, 2025 05:00
Copy link
Contributor Author

octo-sts bot commented Jan 4, 2025

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: No explicit error message, but the build stops after setting up the build environment. This indicates the pipeline is failing silently after the git-checkout step.

• Error Category: Configuration

• Failure Point: After git-checkout step, before the strip step

• Root Cause Analysis: The melange file is attempting to build a bundle package but doesn't actually perform any meaningful build steps. The strip step is marked as NO-OP and there's no actual package assembly happening.

• Suggested Fix:
Add a pipeline step to assemble the bundle:

pipeline:
  - uses: git-checkout
    with:
      repository: https://github.com/newrelic/infrastructure-bundle
      tag: v${{package.version}}
      expected-commit: 9885fc554171f891869b1a30e09789ef2f63ffb2
      destination: ${{package.name}}
      
  - uses: mkdir
    with:
      path: ${{targets.destdir}}/usr/bin

  # Create empty package to satisfy dependencies
  - runs: |
      touch ${{targets.destdir}}/.keep

• Explanation:

  • The current YAML is missing steps to create the actual package structure
  • Since this is a bundle package that only depends on other packages, it needs minimal file structure
  • The .keep file ensures the package can be built while only serving as a dependency container
  • The mkdir step ensures proper filesystem hierarchy standards

• Additional Notes:

  • Bundle packages typically don't need build steps but do need minimal filesystem structure
  • The current NO-OP strip comment indicates a transition from binary distribution to package dependencies
  • All actual functionality comes from the runtime dependencies listed

• References:

@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 Jan 4, 2025
@kranurag7 kranurag7 requested a review from a team January 4, 2025 05:12
@kranurag7
Copy link
Member

once this is merged we can merge #38749 and run this https://github.com/wolfi-dev/os/actions/workflows/withdraw-packages.yaml workflow from main branch

Copy link
Member

@mamccorm mamccorm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fun one. Thank-you for handling this, agree on the approach

@mamccorm mamccorm merged commit 2d4a64e into main Jan 4, 2025
14 checks passed
@mamccorm mamccorm deleted the wolfictl-fadbad36-50fa-4efa-ba6d-ce2f7865725a branch January 4, 2025 20:40
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants