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

[builder] more descriptive empty gomod error #10474

Closed
kristinapathak opened this issue Jun 27, 2024 · 0 comments · Fixed by #10475
Closed

[builder] more descriptive empty gomod error #10474

kristinapathak opened this issue Jun 27, 2024 · 0 comments · Fixed by #10475
Labels
bug Something isn't working

Comments

@kristinapathak
Copy link
Contributor

kristinapathak commented Jun 27, 2024

Describe the bug
Providing an empty gomod value in the builder configuration leads to an opaque error.

Steps to reproduce

  1. Specify a provider, extension, receiver, exporter, processor, or connector without a gomod value
  2. Try to build
  3. build fails with error module "": invalid gomod specification for module

What did you expect to see?
An error with a better explanation of where the problem is in the configuration

What did you see instead?

../../bin/ocb_darwin_amd64 --config=./default.yaml
2024-06-27T11:41:54.047-0700	INFO	internal/command.go:125	OpenTelemetry Collector Builder	{"version": "", "date": "unknown"}
2024-06-27T11:41:54.048-0700	INFO	internal/command.go:161	Using config file	{"path": "./default.yaml"}
Error: invalid configuration: module "": invalid gomod specification for module; module "": invalid gomod specification for module

Sample Config

dist:
  module: go.opentelemetry.io/collector/cmd/otelcorecol
  name: otelcorecol
  description: Local OpenTelemetry Collector binary, testing only.
  version: 0.103.0-dev
  otelcol_version: 0.103.0

receivers:
  -
  - gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.103.0
providers:
  - gomod: go.opentelemetry.io/collector/confmap/provider/envprovider v0.103.0
  - gomod: go.opentelemetry.io/collector/confmap/provider/fileprovider v0.103.0
  - gomod:
  - gomod: go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.103.0
  - gomod: go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.103.0
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.

1 participant