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

ignore register already exist error for metrics #105223

Closed
wants to merge 1 commit into from

Conversation

pacoxu
Copy link
Member

@pacoxu pacoxu commented Sep 24, 2021

/kind bug

xref #104940

The problem is similar to prometheus/client_golang#716 (comment).

I tried to fix 104940 by ignoring AlreadyRegisteredError in the implementation of MustRegister. (I am inspired by https://github.com/weaveworks/promrus/pull/9/files)

func (r *Registry) MustRegister(cs ...Collector) {
for _, c := range cs {
if err := r.Register(c); err != nil {
panic(err)
}
}
}

None

@k8s-ci-robot
Copy link
Contributor

@pacoxu: The label(s) sig/instrumention cannot be applied, because the repository doesn't have them.

In response to this:

/kind bug

xref #104940

The problem is similar to prometheus/client_golang#716 (comment).

I tried to fix 104940 by ignore AlreadyRegisteredError in the implementation of MustRegister.
/sig instrumention

None

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 24, 2021
@k8s-ci-robot
Copy link
Contributor

@pacoxu: This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Sep 24, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: pacoxu
To complete the pull request process, please assign brancz after the PR has been reviewed.
You can assign the PR to them by writing /assign @brancz in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@pacoxu
Copy link
Member Author

pacoxu commented Sep 24, 2021

/sig instrumentation

A simple way to reproduce it using GOFLAGS=-count=10 to run the TestSample case.

 make test KUBE_RACE=-race KUBE_TIMEOUT=--timeout=600s GOFLAGS=-count=10 WHAT=./vendor/k8s.io/apiserver/pkg/util/flowcontrol/metrics/

@pacoxu
Copy link
Member Author

pacoxu commented Sep 24, 2021

/assign @dashpole @ehashman

@k8s-ci-robot
Copy link
Contributor

@pacoxu: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubernetes-unit 64a507b link true /test pull-kubernetes-unit

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@pacoxu pacoxu marked this pull request as draft September 24, 2021 07:29
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 24, 2021
@fedebongio
Copy link
Contributor

/remove-sig api-machinery

@k8s-ci-robot k8s-ci-robot removed the sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. label Sep 28, 2021
@dashpole
Copy link
Contributor

dashpole commented Oct 4, 2021

Is this ready for review?

@pacoxu
Copy link
Member Author

pacoxu commented Oct 4, 2021

Is this ready for review?

This can fix the dup registed error, but it can not fix the failure with “-count=10”(the metrics can not be reset during the unit test)

@pacoxu pacoxu closed this Nov 1, 2021
@pacoxu
Copy link
Member Author

pacoxu commented Nov 1, 2021

See #105809

@pacoxu pacoxu deleted the dup-metrics-collector branch May 10, 2022 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/bug Categorizes issue or PR as related to a bug. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants