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

override reporter config only when agent host or port was set in env #513

Merged
merged 3 commits into from May 14, 2020

Conversation

ilylia
Copy link
Contributor

@ilylia ilylia commented May 13, 2020

Which problem is this PR solving?

Short description of the changes

  • In ReporterConfig.reporterConfigFromEnv(), override reporter agent config only when agent host or port was set in env.

Signed-off-by: ilylia <ilylia@126.com>
@codecov
Copy link

codecov bot commented May 13, 2020

Codecov Report

Merging #513 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #513      +/-   ##
==========================================
+ Coverage   88.74%   88.75%   +0.01%     
==========================================
  Files          60       60              
  Lines        3786     3790       +4     
==========================================
+ Hits         3360     3364       +4     
  Misses        309      309              
  Partials      117      117              
Impacted Files Coverage Δ
config/config_env.go 100.00% <100.00%> (ø)

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 4293012...f10fbc2. Read the comment docs.

@@ -252,6 +252,55 @@ func TestReporter(t *testing.T) {
assert.Equal(t, "user", cfg.User)
assert.Equal(t, "password", cfg.Password)

//
Copy link
Member

Choose a reason for hiding this comment

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

Could you please split these into separate, appropriately named tests? There's no reason to keep everything in one function, and it makes it hard to read.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Signed-off-by: ilylia <ilylia@126.com>
@yurishkuro yurishkuro merged commit c6853b8 into jaegertracing:master May 14, 2020
@yurishkuro
Copy link
Member

thanks!

@ilylia ilylia deleted the bugfix-reporter-from-env branch May 14, 2020 10:09
@marefr
Copy link

marefr commented Jun 12, 2020

@yurishkuro any plans to tag a new version including this fix?

@yurishkuro
Copy link
Member

Would you like to create a "Preparing Release" PR as described in RELEASE.md ?

@yurishkuro
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AgentHostPort is overwritten by default value even though the env not set
3 participants