Skip to content

kyverno-notation-aws package build#36210

Merged
developer-guy merged 1 commit into
wolfi-dev:mainfrom
developer-guy:kyerno-notation-aws
Dec 10, 2024
Merged

kyverno-notation-aws package build#36210
developer-guy merged 1 commit into
wolfi-dev:mainfrom
developer-guy:kyerno-notation-aws

Conversation

@developer-guy
Copy link
Copy Markdown
Member

Fixes:

Related:

Pre-review Checklist

For new package PRs only

  • This PR is marked as fixing a pre-existing package request bug
    • Alternatively, the PR is marked as related to a pre-existing package request bug, such as a dependency
  • REQUIRED - The package is available under an OSI-approved or FSF-approved license
  • REQUIRED - The version of the package is still receiving security updates
  • This PR links to the upstream project's support policy (e.g. endoflife.date)

@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 Dec 10, 2024
@developer-guy developer-guy force-pushed the kyerno-notation-aws branch 3 times, most recently from c010982 to 320f156 Compare December 10, 2024 10:07
@octo-sts
Copy link
Copy Markdown
Contributor

octo-sts Bot commented Dec 10, 2024

Gen AI suggestions to solve the build error:

• Detected Error:

cannot use (*meter)(nil) (value of type *meter) as "go.opentelemetry.io/otel/metric".Meter value in variable declaration: *meter does not implement "go.opentelemetry.io/otel/metric".Meter (missing method Float64Gauge)

• Error Category: Dependency/Version

• Failure Point: Go build step failing due to OpenTelemetry SDK incompatibility

• Root Cause Analysis: There's a version mismatch between OpenTelemetry packages where the metric interface has changed to require a Float64Gauge method that isn't implemented in the current version

• Suggested Fix:
Add the following to the go/bump step to pin the OpenTelemetry versions:

  - uses: go/bump
    with:
      deps: |
        github.com/docker/docker@v26.1.5 
        github.com/golang-jwt/jwt/v4@v4.5.1 
        github.com/open-policy-agent/opa@v0.68.0
        go.opentelemetry.io/otel@v1.22.0
        go.opentelemetry.io/otel/sdk@v1.22.0
        go.opentelemetry.io/otel/metric@v1.22.0

• Explanation: The error occurs because newer versions of OpenTelemetry introduced breaking changes in the metric interface. Pinning to v1.22.0 ensures compatibility across the OpenTelemetry packages as this version predates the interface change that requires Float64Gauge.

• Additional Notes:

  • OpenTelemetry frequently introduces breaking changes between versions
  • The Float64Gauge method was added in a recent version
  • All OpenTelemetry packages should be aligned to the same version

• References:

@octo-sts
Copy link
Copy Markdown
Contributor

octo-sts Bot commented Dec 10, 2024

Gen AI suggestions to solve the build error:

• Detected Error:

cannot use (*meter)(nil) (value of type *meter) as "go.opentelemetry.io/otel/metric".Meter value in variable declaration: *meter does not implement "go.opentelemetry.io/otel/metric".Meter (missing method Float64Gauge)

• Error Category: Dependency/Version

• Failure Point: Go build step after dependency bump

• Root Cause Analysis:
There's a version mismatch between OpenTelemetry SDK dependencies. The error indicates an interface incompatibility where the meter implementation is missing a required method (Float64Gauge).

• Suggested Fix:
Add specific version constraints for OpenTelemetry dependencies in the go/bump step:

  - uses: go/bump
    with:
      deps: |
        github.com/docker/docker@v26.1.5 
        github.com/golang-jwt/jwt/v4@v4.5.1 
        github.com/open-policy-agent/opa@v0.68.0
        go.opentelemetry.io/otel@v1.23.1
        go.opentelemetry.io/otel/metric@v1.23.1
        go.opentelemetry.io/otel/sdk@v1.23.1

• Explanation:
The error occurs because of mismatched OpenTelemetry component versions. By explicitly specifying compatible versions of all OpenTelemetry components, we ensure API compatibility between the SDK and metric interfaces.

• Additional Notes:

  • OpenTelemetry made breaking changes to their metrics API
  • All OpenTelemetry components should be upgraded together
  • The Float64Gauge method was added in a recent version

• References:

@octo-sts
Copy link
Copy Markdown
Contributor

octo-sts Bot commented Dec 10, 2024

Gen AI suggestions to solve the build error:

• Detected Error:

# go.opentelemetry.io/otel/sdk/metric
cannot use (*meter)(nil) (value of type *meter) as "go.opentelemetry.io/otel/metric".Meter value in variable declaration: *meter does not implement "go.opentelemetry.io/otel/metric".Meter (missing method Float64Gauge)

• Error Category: Dependency/Version Conflict

• Failure Point: Go build step failing due to OpenTelemetry SDK interface incompatibility

• Root Cause Analysis: There's a version mismatch between OpenTelemetry packages. The SDK version being used requires a Float64Gauge method that isn't present in the interface implementation.

• Suggested Fix:
Add the following to the go/bump step to pin compatible versions:

  - uses: go/bump
    with:
      deps: |
        github.com/docker/docker@v26.1.5 
        github.com/golang-jwt/jwt/v4@v4.5.1 
        github.com/open-policy-agent/opa@v0.68.0
        go.opentelemetry.io/otel@v1.21.0
        go.opentelemetry.io/otel/sdk@v1.21.0
        go.opentelemetry.io/otel/metric@v1.21.0

• Explanation: The error occurs because newer versions of OpenTelemetry SDK (v1.23.1) have breaking changes in the metrics API. Pinning to v1.21.0 ensures compatibility across the OpenTelemetry packages as this version has a consistent API surface.

• Additional Notes:

  • OpenTelemetry made breaking changes to their metrics API in recent versions
  • Version 1.21.0 is known to have compatible interfaces across packages
  • This is a common issue when dealing with OpenTelemetry version mismatches

• References:

@developer-guy developer-guy force-pushed the kyerno-notation-aws branch 5 times, most recently from 64484ae to de0b7bc Compare December 10, 2024 11:40
Comment thread kyverno-notation-aws.yaml Outdated
Comment thread kyverno-notation-aws.yaml
Signed-off-by: Batuhan Apaydin <batuhan.apaydin@chainguard.dev>
Copy link
Copy Markdown
Member

@kranurag7 kranurag7 left a comment

Choose a reason for hiding this comment

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

thanks for being patient with reviews. Looks good.

@developer-guy developer-guy enabled auto-merge (squash) December 10, 2024 16:38
@developer-guy developer-guy merged commit d785f9f into wolfi-dev:main Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bincapz/pass bincapz/pass Bincapz (aka. malcontent) scan didn't detect any CRITICALs on the scanned packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants