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

sandbox: replace github.com/pkg/errors with native errors #6937

Merged
merged 1 commit into from
May 26, 2022

Conversation

mythi
Copy link
Contributor

@mythi mythi commented May 12, 2022

PR #6366 implemented a tree-wide change to replace github.com/pkg/errors
to errors. The new sandbox API PR #6703 had few errors.Wrap*() leftovers
and pulled github.com/pkg/errors back. This commit replaces those
leftovers by following the pattern in #6366.

Signed-off-by: Mikko Ylinen [email protected]

PR containerd#6366 implemented a tree-wide change to replace github.com/pkg/errors
to errors. The new sandbox API PR containerd#6703 had few errors.Wrap*() leftovers
and pulled github.com/pkg/errors back. This commit replaces those
leftovers by following the pattern in containerd#6366.

Signed-off-by: Mikko Ylinen <[email protected]>
@k8s-ci-robot
Copy link

Hi @mythi. Thanks for your PR.

I'm waiting for a containerd 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.

@thaJeztah
Copy link
Member

FWIW (perhaps "orthogonal" to this change) There was still some discussion about the removal of pkg/errors, as Golang's native errors don't include the stack; as a result, tracing information is lost since it was removed.

@dmcgowan @tonistiigi I recall you both had a conversation on this; I don't recall what the outcome was on that though.

@dmcgowan
Copy link
Member

@thaJeztah we had a discussion about reintroducing an error with a stack specifically to the remotes packages which clients may import. Daemon side error stacks never got exposed anywhere, but some clients may have used the stacks.

@thaJeztah
Copy link
Member

Thanks! Would that involve changing back to pkg/errors (or some other approach?).

Anyway, I don't want to derail this PR; I did ask @tonistiigi if there's a tracking issue for that (and if not, if he could open one).

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

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

LGTM

@mikebrow
Copy link
Member

mikebrow commented May 12, 2022

@MikeZappa87 FYI seeing this connect error again..

• Failure [66.270 seconds]
[2558](https://github.com/containerd/containerd/runs/6409709348?check_suite_focus=true#step:12:2558)
[k8s.io] Streaming
[2559](https://github.com/containerd/containerd/runs/6409709348?check_suite_focus=true#step:12:2559)
github.com/kubernetes-sigs/cri-tools/pkg/framework/framework.go:72
[2560](https://github.com/containerd/containerd/runs/6409709348?check_suite_focus=true#step:12:2560)
  runtime should support streaming interfaces
[2561](https://github.com/containerd/containerd/runs/6409709348?check_suite_focus=true#step:12:2561)
  github.com/kubernetes-sigs/cri-tools/pkg/validate/streaming_linux.go:38
[2562](https://github.com/containerd/containerd/runs/6409709348?check_suite_focus=true#step:12:2562)
    runtime should support portforward in host network [It]
[2563](https://github.com/containerd/containerd/runs/6409709348?check_suite_focus=true#step:12:2563)
    github.com/kubernetes-sigs/cri-tools/pkg/validate/streaming_linux.go:48
[2564](https://github.com/containerd/containerd/runs/6409709348?check_suite_focus=true#step:12:2564)

[2565](https://github.com/containerd/containerd/runs/6409709348?check_suite_focus=true#step:12:2565)
    Timed out after 60.000s.
[2566](https://github.com/containerd/containerd/runs/6409709348?check_suite_focus=true#step:12:2566)
    Expected
[2567](https://github.com/containerd/containerd/runs/6409709348?check_suite_focus=true#step:12:2567)
        <*url.Error | 0xc00027f170>: {
[2568](https://github.com/containerd/containerd/runs/6409709348?check_suite_focus=true#step:12:2568)
            Op: "Get",
[2569](https://github.com/containerd/containerd/runs/6409709348?check_suite_focus=true#step:12:2569)
            URL: "http://127.0.0.1:12002/",
[2570](https://github.com/containerd/containerd/runs/6409709348?check_suite_focus=true#step:12:2570)
            Err: <*net.OpError | 0xc000100320>{
[2571](https://github.com/containerd/containerd/runs/6409709348?check_suite_focus=true#step:12:2571)
                Op: "dial",
[2572](https://github.com/containerd/containerd/runs/6409709348?check_suite_focus=true#step:12:2572)
                Net: "tcp",
[2573](https://github.com/containerd/containerd/runs/6409709348?check_suite_focus=true#step:12:2573)
                Source: nil,
[2574](https://github.com/containerd/containerd/runs/6409709348?check_suite_focus=true#step:12:2574)
                Addr: <*net.TCPAddr | 0xc00027f140>{
[2575](https://github.com/containerd/containerd/runs/6409709348?check_suite_focus=true#step:12:2575)
                    IP: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 127, 0, 0, 1],
[2576](https://github.com/containerd/containerd/runs/6409709348?check_suite_focus=true#step:12:2576)
                    Port: 12002,
[2577](https://github.com/containerd/containerd/runs/6409709348?check_suite_focus=true#step:12:2577)
                    Zone: "",
[2578](https://github.com/containerd/containerd/runs/6409709348?check_suite_focus=true#step:12:2578)
                },
[2579](https://github.com/containerd/containerd/runs/6409709348?check_suite_focus=true#step:12:2579)
                Err: <*os.SyscallError | 0xc00015c820>{
[2580](https://github.com/containerd/containerd/runs/6409709348?check_suite_focus=true#step:12:2580)
                    Syscall: "connect",
[2581](https://github.com/containerd/containerd/runs/6409709348?check_suite_focus=true#step:12:2581)
                    Err: <syscall.Errno>0x6f,
[2582](https://github.com/containerd/containerd/runs/6409709348?check_suite_focus=true#step:12:2582)
                },
[2583](https://github.com/containerd/containerd/runs/6409709348?check_suite_focus=true#step:12:2583)
            },
[2584](https://github.com/containerd/containerd/runs/6409709348?check_suite_focus=true#step:12:2584)
        }
[2585](https://github.com/containerd/containerd/runs/6409709348?check_suite_focus=true#step:12:2585)
    to be nil
[2586](https://github.com/containerd/containerd/runs/6409709348?check_suite_focus=true#step:12:2586)

[2587](https://github.com/containerd/containerd/runs/6409709348?check_suite_focus=true#step:12:2587)
    github.com/kubernetes-sigs/cri-tools/pkg/validate/networking.go:253

ECONNREFUSED -- A connect() on a stream socket found no one listening on
the remote address.

@tonistiigi
Copy link
Member

we had a discussion about reintroducing an error with a stack specifically to the remotes packages which clients may import. Daemon side error stacks never got exposed anywhere, but some clients may have used the stacks.

Both of the packages this PR changes are imported by buildkit (therefore losing stack support for such errors in docker). One of the packages is the main client package.

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.

7 participants