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

Stop using github.com/pkg/errors #103043

Closed
dims opened this issue Jun 21, 2021 · 44 comments
Closed

Stop using github.com/pkg/errors #103043

dims opened this issue Jun 21, 2021 · 44 comments
Assignees
Labels
area/code-organization Issues or PRs related to kubernetes code organization kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@dims
Copy link
Member

dims commented Jun 21, 2021

We should be using Go native error wrapping (available since Go 1.13) (similar to what was done in containerd/console#54)

NOTE : Please do not submit PRs for cmd/kubeadm/app though it is listed below.

code search : https://cs.k8s.io/?q=%22github.com%2Fpkg%2Ferrors%22&i=nope&files=&excludeFiles=vendor%2F&repos=kubernetes/kubernetes
ripgrep search :

[dims@dims-a01 06:29] ~/go/src/k8s.io/kubernetes ⟩ rg '"github.com/pkg/errors"' | grep -v vendor/ | cut -f 1 -d ':' | cut -d '/' -f 1-3 | sort | uniq -c | sort
   1 cmd/kube-proxy/app
   1 cmd/kubeadm/test
   1 hack/conformance/check_conformance_test_requirements.go
   1 pkg/kubelet/pluginmanager
   1 pkg/kubelet/server
   1 pkg/util/ipvs
   1 pkg/util/netsh
   1 test/utils/deployment.go
   1 test/utils/pki_helpers.go
   2 pkg/kubelet/kubeletconfig
   2 staging/src/k8s.io
   2 test/e2e/windows
   3 cluster/images/conformance
   3 test/e2e/framework
   3 test/e2e/network
   4 test/e2e/storage
 120 cmd/kubeadm/app

If folks can pick up one line each and submit a PR, that would help get this turned around quickly. thanks!

BONUS: if someone can reuse one of the existing verify scripts under hack to ensure we don't regress, that would be awesome!

@dims dims added the kind/bug Categorizes issue or PR as related to a bug. label Jun 21, 2021
@k8s-ci-robot k8s-ci-robot added 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. labels Jun 21, 2021
@dims
Copy link
Member Author

dims commented Jun 21, 2021

/area code-organization

@k8s-ci-robot k8s-ci-robot added the area/code-organization Issues or PRs related to kubernetes code organization label Jun 21, 2021
@mcbenjemaa
Copy link
Member

/assign

@dims
Copy link
Member Author

dims commented Jun 21, 2021

@mcbenjemaa since you have contributed to k8s before and are in the github org, may be you can tackle the BONUS one? leave the easy stuff to new folks?

@mcbenjemaa
Copy link
Member

@dims For sure!

@gdsoumya
Copy link
Contributor

@dims would like to take this up

@neolit123
Copy link
Member

neolit123 commented Jun 21, 2021

Makes sense to cleanup sparse usage across the code base. But usage in kubeadm is intentional and %w is just not the same. We rather not touch kubeadm for the time being.

@MadhavJivrajani
Copy link
Contributor

/assign @gdsoumya

@krak7602
Copy link
Contributor

Pardon me for working on an assigned issue. I forgot to assign the issue . Also I have only finished one section. There are many remaining so the assigned person might not face issues.

@gdsoumya
Copy link
Contributor

gdsoumya commented Jun 21, 2021

Taking up files :

   1 pkg/util/ipvs
   1 pkg/util/netsh

@mcbenjemaa
Copy link
Member

If folks can pick up one line each and submit a PR, that would help get this turned around quickly. thanks!

@gdsoumya allow the others to submit their first PR.

@gdsoumya
Copy link
Contributor

@mcbenjemaa each of these directories have a single file with 1/2 line changes mostly so I thought of taking up these in one go.

@Rahul-D78
Copy link

Hi I would like to pick
kubernetes/cluster/images/conformance/go-runner/main.go

@Rahul-D78
Copy link

Hi @dims
return fmt.Errorf(err, "failed to find absolute path for %v", resultsTarball)
what about %v is it ok to replace with return fmt.Errorof("failed to find absolute path for: %w", err, resultsTarball)

@rajaSahil
Copy link
Contributor

rajaSahil commented Jun 21, 2021

Hi, I would like to take up

   1 pkg/kubelet/pluginmanager
   1 pkg/kubelet/server
   2 pkg/kubelet/kubeletconfig

@Haleygo
Copy link

Haleygo commented Jun 21, 2021

Hi, I would like to take those under cmd without cmd/kubeadm/app :)
taking up :
cmd/kube-proxy/app
cmd/kubeadm/test

@rahulii
Copy link

rahulii commented Jun 21, 2021

Folks working on this issue, should not mention Fixes in their PR , it will close this issue once that PR is merged, instead use Part of

@youhonglian
Copy link
Contributor

youhonglian commented Jun 21, 2021

Hi, I would like to take those :)
taking up :
pkg/kubelet/kubeletconfig
staging/src/k8s.io

@neolit123
Copy link
Member

@Haleygo

cmd/kubeadm/test

we should not change kubeadm for the time being.

@Haleygo
Copy link

Haleygo commented Jun 21, 2021

@Haleygo

cmd/kubeadm/test

we should not change kubeadm for the time being.

@neolit123 Sorry about that, I saw the conversation above says don't change files under cmd/kubeadm/app, but cmd/kubeadm/test is not under it, so I changed it.
I will change it back.

@ehashman
Copy link
Member

ehashman commented Jun 21, 2021

Taking up files :

   1 pkg/kubelet/server
   1 pkg/util/ipvs
   1 pkg/util/netsh

@gdsoumya Hi, please don't mix and match files between SIGs if possible. If you want to do node files, do

   1 pkg/kubelet/pluginmanager
   1 pkg/kubelet/server
   2 pkg/kubelet/kubeletconfig

If you want to do network, do

   1 cmd/kube-proxy/app
   1 pkg/util/ipvs
   1 pkg/util/netsh
   3 test/e2e/network

I will be closing PRs to SIG Node that only touch one or two files and split reviews between PRs. Just do them all in one go.

@RinkiyaKeDad
Copy link
Member

/sig architecture

@k8s-ci-robot k8s-ci-robot added sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jul 19, 2021
@ishangupta-ds
Copy link
Contributor

ishangupta-ds commented Sep 13, 2021

Hi @dims @MadhavJivrajani

Taking up files:
1 test/conformance/image/go-runner/main.go
1 test/conformance/image/go-runner/tar.go
1 test/conformance/image/go-runner/tar_test.go

from https://cs.k8s.io/?q=%22github.com%2Fpkg%2Ferrors%22&i=nope&files=&excludeFiles=vendor%2F&repos=kubernetes/kubernetes

PR: #104948

@ishangupta-ds
Copy link
Contributor

@dims I am taking up the last file from -

https://cs.k8s.io/?q=%22github.com%2Fpkg%2Ferrors%22&i=nope&files=&excludeFiles=vendor%2F&repos=kubernetes/kubernetes

1 file - test/e2e/network/netopol/test_helper.go

all others are under cmd/kubeadm/app

PR #105250

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 25, 2021
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jan 24, 2022
@mcbenjemaa
Copy link
Member

/remove-lifecycle rotten

@k8s-ci-robot k8s-ci-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Jan 24, 2022
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 24, 2022
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels May 24, 2022
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closing this issue.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/code-organization Issues or PRs related to kubernetes code organization kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.