-
Notifications
You must be signed in to change notification settings - Fork 30
Conversation
|
cmd/root.go
Outdated
@@ -61,12 +62,12 @@ func Execute() { | |||
// the distribution parameters, which we accept as CLI flags as well | |||
cmd.Flags().StringVar(&cfg.Distribution.ExeName, "name", "otelcol-custom", "The executable name for the OpenTelemetry Collector distribution") | |||
cmd.Flags().StringVar(&cfg.Distribution.LongName, "description", "Custom OpenTelemetry Collector distribution", "A descriptive name for the OpenTelemetry Collector distribution") | |||
cmd.Flags().StringVar(&cfg.Distribution.Version, "version", "1.0.0", "The version for the OpenTelemetry Collector distribution") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This field is about the version to use for the underlying build. Instead of removing, this needs to have a new name, which will cause a breaking change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is confusing and I somehow thought otelcol-version
is the version of the underlying collector binary. I am still confused. what are the version
and otelcol-version
fields referring to ? We would need to give them better nomenclature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This repository builds custom distributions of the OpenTelemetry Collector, and the distribution itself might have its own version. Imagining that Jaeger would be such a distribution, version
would be Jaeger's version (like 2.0.0-alpha1), and otelcol-version
is which version of OpenTelemetry Collector version to base on (0.22.0, for instance)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you Juraci for the explanation. I think I get it now. This means we have to deal with 3 versions variables in total. In order to prevent making breaking change, I opted to go ahead with a subcommand:
$ ./opentelemetry-collector-builder version
dev
Let me know in case you think we should do it in some other way.
5dad776
to
3976fed
Compare
Signed-off-by: Ashmita Bohara <[email protected]>
5c0f449
to
6b08d7e
Compare
Signed-off-by: Ashmita Bohara [email protected]
Closes: #5
Done as per cobra documentation: https://github.com/spf13/cobra#version-flag
After this fix: