-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[chore] delete code to set a version and date, as it it not used #10715
Conversation
@@ -123,7 +123,7 @@ configuration is provided, ocb will generate a default Collector. | |||
|
|||
func initConfig(flags *flag.FlagSet) error { | |||
cfg.Logger.Info("OpenTelemetry Collector Builder", | |||
zap.String("version", version), zap.String("date", date)) |
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.
date is never set.
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.
I believe it was set by ldflags in goreleaser.yml, which was now moved to opentelemetry-collector-releases. Dealing with issue open-telemetry/opentelemetry-collector-releases#664 now and am trying to narrow down why adding the ldflags back doesn't work, wondering if it has to do with version.go below
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.
yes, it wasn't used, so it had to go. If it's in usage, let's make sure it has tests and is exercised in this repository, and then it will be maintained and we can use it in the -releases repository. This might deserve its own issue in this repository.
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.
I wrote some tests for it and opened a PR, happy to open an issue to mirror the one in releases
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #10715 +/- ##
==========================================
+ Coverage 92.24% 92.28% +0.04%
==========================================
Files 403 403
Lines 18720 18714 -6
==========================================
+ Hits 17268 17271 +3
+ Misses 1097 1088 -9
Partials 355 355 ☔ View full report in Codecov by Sentry. |
…sed (open-telemetry#10715)" This reverts commit b53f57d.
Revert "[chore] delete code to set a version and date, as it it not used (#10715)" Remove date string but re-add functions that check for version number This (mostly) reverts commit b53f57d. <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description This re-enables the functionality to set a version number for ocb binary (cmd/builder). It was erroneously removed. It also adds unit tests for this functionality, as a warning is given on CI with no code coverage. <!-- Issue number if applicable --> #### Link to tracking issue Relates to open-telemetry/opentelemetry-collector-releases#664. Closes #11220 along with open-telemetry/opentelemetry-collector-releases#665 <!--Describe what testing was performed and which tests were added.--> #### Testing ran build and release cycles inside personal fork repositories (jackgopack4/opentelemetry-collector and jackgopack4/opentelemetry-collector-releases) <!--Describe the documentation added.--> #### Documentation .chloggen file <!--Please delete paragraphs that you did not use before submitting.-->
No description provided.