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

Fix deprecated use of watch API #6437

Merged
merged 1 commit into from Oct 5, 2021

Conversation

VirrageS
Copy link
Contributor

@VirrageS VirrageS commented Sep 20, 2021

What this PR does / why we need it: This MR fixes a problem that leads to reporting incorrect metrics in Kubernetes. The problem is that watchFunc uses deprecated (since K8s v1.12) API call which seems to be incorrectly interpreted by apiserver. My fix is simply replacing old, deprecated method of indicating WATCH operation by a new one. After the fix the apiserver_request_duration_seconds metrics for LIST operation drop to normal levels:
Screen Shot 2021-09-20 at 15 16 52

Which issue(s) this PR fixes:
Fixes #6436

Special notes for your reviewer: None

Release note:

Fix deprecated use of watch API to prevent reporting incorrect metrics.

Signed-off-by: Janusz Marcinkiewicz <januszm@nvidia.com>
@kubevirt-bot kubevirt-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Sep 20, 2021
@kubevirt-bot kubevirt-bot added size/XS needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 20, 2021
@kubevirt-bot
Copy link
Contributor

Hi @VirrageS. Thanks for your PR.

I'm waiting for a kubevirt member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@rthallisey
Copy link
Contributor

/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Sep 20, 2021
@rthallisey
Copy link
Contributor

/ok-to-test

@kubevirt-bot kubevirt-bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 20, 2021
@rthallisey
Copy link
Contributor

/retest

1 similar comment
@rthallisey
Copy link
Contributor

/retest

@rmohr
Copy link
Member

rmohr commented Oct 4, 2021

/approve

Nice small change.

@rmohr
Copy link
Member

rmohr commented Oct 4, 2021

/retest

@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rmohr

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

The pull request process is described 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

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 4, 2021
@kubevirt-commenter-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs.
Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

1 similar comment
@kubevirt-commenter-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs.
Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@kubevirt-bot kubevirt-bot merged commit 1a91fda into kubevirt:main Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Usage of deprecated API leads to reporting incorrect metrics
5 participants