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

Replace viper with koanf in builder #4757

Merged
merged 4 commits into from
Feb 23, 2022

Conversation

rleungx
Copy link
Contributor

@rleungx rleungx commented Jan 27, 2022

Description:
Just as the title says and also clean up the dependencies.

Link to tracking Issue: #4732

Testing: < Describe what testing was performed and which tests were added.>
Not sure if needed

@rleungx rleungx marked this pull request as ready for review January 28, 2022 02:47
@rleungx rleungx requested review from a team and bogdandrutu January 28, 2022 02:47
Copy link
Member

@bogdandrutu bogdandrutu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jpkrohling are you ok with this change?

Copy link
Member

@jpkrohling jpkrohling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently, there's no change in the user-visible behavior, confirmed by comparing the output of go run ./ --help. I'm fine with this change.

@codecov
Copy link

codecov bot commented Jan 31, 2022

Codecov Report

Merging #4757 (b8b1076) into main (89016d2) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #4757   +/-   ##
=======================================
  Coverage   90.69%   90.69%           
=======================================
  Files         181      181           
  Lines       10616    10616           
=======================================
  Hits         9628     9628           
  Misses        772      772           
  Partials      216      216           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 89016d2...b8b1076. Read the comment docs.

@jpkrohling
Copy link
Member

jpkrohling commented Jan 31, 2022

The tests seem to be failing, I just sent in a PR fixing them: #4771. Once that one is merged, I'll rebase this.

@bogdandrutu
Copy link
Member

Please rebase :) Maybe see how to fix the tests.

@jpkrohling jpkrohling force-pushed the replace-viper branch 2 times, most recently from 52a7b3b to 9a8a40b Compare February 3, 2022 11:10
@jpkrohling
Copy link
Member

PR rebased

@jpkrohling
Copy link
Member

There's something wrong: running make otelcorecol yields changes to the generates sources, which isn't expected. Here's the diff:

diff --git a/cmd/otelcorecol/main.go b/cmd/otelcorecol/main.go
index 8f4124d6..b0885d17 100644
--- a/cmd/otelcorecol/main.go
+++ b/cmd/otelcorecol/main.go
@@ -19,9 +19,9 @@ func main() {
        }
 
        info := component.BuildInfo{
-               Command:     "otelcorecol",
-               Description: "Local OpenTelemetry Collector binary, testing only.",
-               Version:     "0.43.1-dev",
+               Command:     "otelcol-custom",
+               Description: "Custom OpenTelemetry Collector distribution",
+               Version:     "1.0.0",
        }
 
        if err := run(service.CollectorSettings{BuildInfo: info, Factories: factories}); err != nil {

Copy link
Member

@jpkrohling jpkrohling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm blocking this, as the generated resources seem to have been affected when they shouldn't.

@jpkrohling
Copy link
Member

@rleungx, are you still interested in this one?

@rleungx rleungx requested a review from jpkrohling February 15, 2022 03:09
@jpkrohling jpkrohling added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Feb 15, 2022
Copy link
Member

@jpkrohling jpkrohling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make otelcorecol, and the code looks sane. If the tests are passing as well, this is good to do.

@rleungx rleungx force-pushed the replace-viper branch 2 times, most recently from 812e125 to 2863718 Compare February 16, 2022 03:34
@rleungx
Copy link
Contributor Author

rleungx commented Feb 16, 2022

There's something wrong: running make otelcorecol yields changes to the generates sources, which isn't expected. Here's the diff:

diff --git a/cmd/otelcorecol/main.go b/cmd/otelcorecol/main.go
index 8f4124d6..b0885d17 100644
--- a/cmd/otelcorecol/main.go
+++ b/cmd/otelcorecol/main.go
@@ -19,9 +19,9 @@ func main() {
        }
 
        info := component.BuildInfo{
-               Command:     "otelcorecol",
-               Description: "Local OpenTelemetry Collector binary, testing only.",
-               Version:     "0.43.1-dev",
+               Command:     "otelcol-custom",
+               Description: "Custom OpenTelemetry Collector distribution",
+               Version:     "1.0.0",
        }
 
        if err := run(service.CollectorSettings{BuildInfo: info, Factories: factories}); err != nil {

Fixed, PTAL.

Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please resolve the conflicts, the change looks good otherwise

Signed-off-by: Ryan Leung <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants