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

feature: change the function name about prometheus registry #2436

Merged
merged 1 commit into from
Nov 6, 2018

Conversation

fengzixu
Copy link
Contributor

@fengzixu fengzixu commented Nov 6, 2018

Signed-off-by: fengzixu hnustphoenix@gmail.com

Ⅰ. Describe what this PR did

  1. change function name GetCustomPrometheusRegistry to GetPrometheusRegistry

Ⅱ. Does this pull request fix one issue?

#2429 (comment)

Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@codecov
Copy link

codecov bot commented Nov 6, 2018

Codecov Report

Merging #2436 into master will increase coverage by 0.17%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2436      +/-   ##
==========================================
+ Coverage    68.6%   68.77%   +0.17%     
==========================================
  Files         272      272              
  Lines       18179    18179              
==========================================
+ Hits        12471    12502      +31     
+ Misses       4279     4257      -22     
+ Partials     1429     1420       -9
Flag Coverage Δ
#criv1alpha1test 31.58% <100%> (+0.03%) ⬆️
#criv1alpha2test 35.54% <100%> (+0.1%) ⬆️
#integrationtest 40.15% <100%> (+0.2%) ⬆️
#nodee2etest 33.05% <100%> (+0.1%) ⬆️
#unittest 26.51% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pkg/utils/metrics/metrics.go 100% <100%> (ø) ⬆️
apis/metrics/metrics.go 100% <100%> (ø) ⬆️
cri/metrics/metrics.go 100% <100%> (ø) ⬆️
apis/server/utils.go 71.15% <0%> (-3.85%) ⬇️
cri/v1alpha2/cri_wrapper.go 61.2% <0%> (-1.2%) ⬇️
cri/v1alpha2/cri.go 67.63% <0%> (+0.12%) ⬆️
cri/v1alpha2/cri_utils.go 91.5% <0%> (+0.29%) ⬆️
cri/v1alpha1/cri.go 60.92% <0%> (+0.33%) ⬆️
ctrd/container.go 59.28% <0%> (+0.39%) ⬆️
daemon/mgr/container_utils.go 86.7% <0%> (+0.63%) ⬆️
... and 7 more

@fengzixu
Copy link
Contributor Author

fengzixu commented Nov 6, 2018

@fuweid Please review it.

@fengzixu
Copy link
Contributor Author

fengzixu commented Nov 6, 2018

@fuweid Ping :)

// GetCustomPrometheusRegistry create a custom resigtry of Prometheus.
func GetCustomPrometheusRegistry() *prometheus.Registry {
return customPrometheusRegistry
// GetPrometheusRegistry create a custom resigtry of Prometheus.
Copy link
Contributor

Choose a reason for hiding this comment

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

return the registry of Prometheus? How do you think

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, I don't know your mean. Do you think that returning the resigry of prometheus is wrong ? Or the comment should be writtern as "GetPrometheusRegistry return a resigtry of Prometheus"

Copy link
Contributor

Choose a reason for hiding this comment

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

sorry. Yes. I was saying that the comment should be changed to GetPrometheusRegistry return a resigtry of Prometheus. 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK. I fix it at once.

Copy link
Contributor

@fuweid fuweid Nov 6, 2018

Choose a reason for hiding this comment

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

forgot to remove custom. @fengzixu

feature: modify the function name about prometheus registry

1. change function name `GetCustomPrometheusRegistry` to `GetPrometheusRegistry`

Related to: AliyunContainerService#2429
@fengzixu
Copy link
Contributor Author

fengzixu commented Nov 6, 2018

@fuweid All done.

Copy link
Contributor

@fuweid fuweid left a comment

Choose a reason for hiding this comment

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

LGTM

@fuweid fuweid merged commit 26b6d5f into AliyunContainerService:master Nov 6, 2018
@fuweid
Copy link
Contributor

fuweid commented Nov 6, 2018

@fengzixu thank you!

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

Successfully merging this pull request may close these issues.

3 participants