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

ocb/otelcol_version 0.95.0: build complains about wrong builder API 0.94.0 #9626

Closed
cforce opened this issue Feb 22, 2024 · 5 comments · Fixed by #9638
Closed

ocb/otelcol_version 0.95.0: build complains about wrong builder API 0.94.0 #9626

cforce opened this issue Feb 22, 2024 · 5 comments · Fixed by #9638
Labels
bug Something isn't working

Comments

@cforce
Copy link
Contributor

cforce commented Feb 22, 2024

The rrror message "Compilation may fail due to API changes. Please upgrade your builder or API {"builder-version": "0.94.0"}" shall not come when i use ocb 0.95.0 and as well defined otel collector version to the same

build.yaml

dist:
  name: otelcollector
  description: XXXX
  version: 0.95.0
  otelcol_version: 0.95.0
  module: XXX.com/XXXX/XXX/XXXX
  include_core: true
  output_path: bin/collector
  #go: "/usr/bin/go"
  debug_compilation: false

receivers:
  - gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.95.0
  - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver  v0.95.0 # beta
  - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.95.0 # alpha
  - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/podmanreceiver v0.95.0 # development    
  - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/collectdreceiver v0.95.0 # alpha

processors:
  - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.95.0 # beta  
  - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.95.0 # beta  
  - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.95.0 # beta  
  - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.95.0 # alpha
  - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.95.0 # beta
  - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.95.0 # beta
  - gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.95.0 # stable
  - gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.95.0 # stable

exporters:
  - gomod: go.opentelemetry.io/collector/exporter/otlphttpexporter v0.95.0 # stable
extensions:
  - gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.95.0 # beta 
  - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.95.0 # beta
  - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.95.0 # beta

build error message

Using architecture amd64
Using operation system  linux
go version go1.21.7 linux/amd64
Using /usr/local/go/bin//go to compile the distributions.
Using builder config cta/builder-prod.yaml
2024-02-22T12:54:28.978Z	INFO	internal/command.go:123	OpenTelemetry Collector Builder	{"version": "0.95.0", "date": "2024-02-20T17:40:58Z"}
2024-02-22T12:54:28.981Z	INFO	internal/command.go:159	Using config file	{"path": "cta/builder-prod.yaml"}
2024-02-22T12:54:28.981Z	INFO	builder/config.go:109	Using go	{"go-executable": "/usr/local/go/bin/go"}
2024-02-22T12:54:28.981Z	INFO	builder/main.go:67	You're building a distribution with non-aligned version of the builder. Compilation may fail due to API changes. Please upgrade your builder or API	{"builder-version": "0.94.0"}
2024-02-22T12:54:28.982Z	INFO	builder/main.go:91	Sources created	{"path": "bin/collector"}
2024-02-22T12:54:28.982Z	INFO	builder/main.go:25	Running go subcommand.	{"arguments": ["get", "cloud.google.com/go"]}
2024-02-22T12:54:29.369Z	INFO	builder/main.go:25	Running go subcommand.	{"arguments": ["mod", "tidy", "-compat=1.21"]}
2024-02-22T12:54:55.590Z	INFO	builder/main.go:142	Getting go modules
2024-02-22T12:54:55.590Z	INFO	builder/main.go:25	Running go subcommand.	{"arguments": ["mod", "download"]}
2024-02-22T12:54:56.142Z	INFO	builder/main.go:102	Compiling
2024-02-22T12:54:56.142Z	INFO	builder/main.go:25	Running go subcommand.	{"arguments": ["build", "-trimpath", "-o", "otelcollector", "-ldflags=-s -w"]}
  
@cforce cforce added the bug Something isn't working label Feb 22, 2024
@TylerHelmuth
Copy link
Member

What do you get if you do ocb version?

@cforce
Copy link
Contributor Author

cforce commented Feb 22, 2024

There is a log from ocb already above which says 0.95.0

@TylerHelmuth
Copy link
Member

I see the issue,

const defaultOtelColVersion = "0.94.0"
did not get updated with the 0.95.0 release.

@TylerHelmuth
Copy link
Member

I believe this should not have a real impact. I don't believe any of the APIs ocb depends on to build a collector were changed between 0.94.0 and 0.95.0.

I see the warning in your log but not an error. Did a binary get created successfully and did it work as expected?

@evantorrie
Copy link

const defaultOtelColVersion = "0.94.0"

did not get updated with the 0.95.0 release.

The relevant command run to generate the 0.95.0 release was

make prepare-release PREVIOUS_VERSION=0.94.1 RELEASE_CANDIDATE=0.95.0 MODSET=beta

However, the prior v0.94.1 release #9521 did not change the corresponding defaultOtelColVersion here:

const defaultOtelColVersion = "0.94.0"

dmitryax pushed a commit that referenced this issue Feb 26, 2024
Fix #9626 by aligning the ocb version with Collector's.

Signed-off-by: Juraci Paixão Kröhling <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants