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

kubelet: extract multiple ignore errors validate logic to isExpectedError #106041

Merged

Conversation

jonyhy96
Copy link
Contributor

@jonyhy96 jonyhy96 commented Nov 1, 2021

What type of PR is this?

/kind cleanup
/kind feature

What this PR does / why we need it:

Same error validate logic and comment has appeared multiple times

	if err != nil &&
		!nestedpendingoperations.IsAlreadyExists(err) &&
		!exponentialbackoff.IsExponentialBackoff(err) {
		// Ignore nestedpendingoperations.IsAlreadyExists and exponentialbackoff.IsExponentialBackoff errors, they are expected.
		// Log all other errors.

Better extract them into a public function call

Special notes for your reviewer:

None

@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. kind/feature Categorizes issue or PR as related to a new feature. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. 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. labels Nov 1, 2021
@jonyhy96
Copy link
Contributor Author

jonyhy96 commented Nov 1, 2021

/release-note-none

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Nov 1, 2021
@k8s-ci-robot k8s-ci-robot added area/kubelet sig/node Categorizes an issue or PR as relevant to SIG Node. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Nov 1, 2021
@jonyhy96
Copy link
Contributor Author

jonyhy96 commented Nov 1, 2021

maybe /sig-storage

@jonyhy96 jonyhy96 force-pushed the volumemanager-reconciler-codefmt branch from abd69da to a945419 Compare November 1, 2021 09:37
@jonyhy96
Copy link
Contributor Author

jonyhy96 commented Nov 1, 2021

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Nov 1, 2021
@ehashman ehashman added this to Triage in SIG Node PR Triage Nov 1, 2021
@wgahnagl
Copy link
Contributor

wgahnagl commented Nov 3, 2021

/triage accepted
/priority backlog

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. priority/backlog Higher priority than priority/awaiting-more-evidence. and removed 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. labels Nov 3, 2021
@wgahnagl wgahnagl moved this from Triage to Needs Reviewer in SIG Node PR Triage Nov 3, 2021
@jonyhy96
Copy link
Contributor Author

jonyhy96 commented Nov 4, 2021

/cc @jingxu97 PTAL

Signed-off-by: haoyun <yun.hao@daocloud.io>
@jonyhy96 jonyhy96 force-pushed the volumemanager-reconciler-codefmt branch from a945419 to b5409ad Compare November 16, 2021 12:43
Copy link
Member

@endocrimes endocrimes left a comment

Choose a reason for hiding this comment

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

/lgtm

@endocrimes endocrimes moved this from Needs Reviewer to Needs Approver in SIG Node PR Triage Nov 16, 2021
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 16, 2021
@jonyhy96 jonyhy96 changed the title kubelet: extract multiple ignore errors validate logic to ignoreError kubelet: extract multiple ignore errors validate logic to isExpectedError Nov 17, 2021
@jonyhy96
Copy link
Contributor Author

/assign @jsafrane for approve

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 17, 2021
@k8s-ci-robot
Copy link
Contributor

@jonyhy96: You must be a member of the kubernetes/milestone-maintainers GitHub team to set the milestone. If you believe you should be able to issue the /milestone command, please contact your and have them propose you as an additional delegate for this responsibility.

In response to this:

/milestone v1.23

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.

@jingxu97
Copy link
Contributor

/approve
/lgtm

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: endocrimes, jingxu97, jonyhy96, mrunalp

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

@jingxu97 jingxu97 added this to the v1.23 milestone Nov 17, 2021
@k8s-ci-robot k8s-ci-robot merged commit 6c357f9 into kubernetes:master Nov 17, 2021
SIG Node PR Triage automation moved this from Needs Approver to Done Nov 17, 2021
@jonyhy96 jonyhy96 deleted the volumemanager-reconciler-codefmt branch November 17, 2021 07:00
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. area/kubelet cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", 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. priority/backlog Higher priority than priority/awaiting-more-evidence. release-note-none Denotes a PR that doesn't merit a release note. sig/node Categorizes an issue or PR as relevant to SIG Node. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

6 participants