opentelemetry-collector
opentelemetry-collector copied to clipboard
[builder] more information for missing gomod error
Description
Fixing a bug - a missing gomod field would be reported but without informing where in the config the field is missing.
Link to tracking issue
Fixes #10474
Testing
Unit tests pass, added some tests for missing cases, manually tested
new error looks like:
../../bin/ocb_darwin_amd64 --config=./default.yaml
2024-06-27T11:39:10.316-0700 INFO internal/command.go:125 OpenTelemetry Collector Builder {"version": "", "date": "unknown"}
2024-06-27T11:39:10.319-0700 INFO internal/command.go:161 Using config file {"path": "./default.yaml"}
Error: invalid configuration: receiver module at index 0: missing gomod specification for module; provider module at index 2: missing gomod specification for module
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 92.33%. Comparing base (
4a11a3e) to head (ea4a38a).
Additional details and impacted files
@@ Coverage Diff @@
## main #10475 +/- ##
=======================================
Coverage 92.33% 92.33%
=======================================
Files 393 393
Lines 18647 18647
=======================================
Hits 17218 17218
Misses 1069 1069
Partials 360 360
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.