diff options
author | Fabricio Voznika <fvoznika@google.com> | 2021-06-29 10:53:10 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-06-29 10:56:17 -0700 |
commit | 5f2b3728fc1d71d32912c57d948ba4b15c886f2a (patch) | |
tree | 1697b8bf8238bf3dc3b795b9eec01d9a777a882e /pkg/shim/utils/BUILD | |
parent | 5b2afd24a7ed6d626ede2d06d04378f95c3b62f8 (diff) |
Redirect all calls from `errdefs.ToGRPC` to `utils.ErrToGRPC`
This is to ensure that Go 1.13 error wrapping is correctly
translated to gRPC errors before returning from the shim.
Updates #6225
PiperOrigin-RevId: 382120441
Diffstat (limited to 'pkg/shim/utils/BUILD')
-rw-r--r-- | pkg/shim/utils/BUILD | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/pkg/shim/utils/BUILD b/pkg/shim/utils/BUILD index 54a0aabb7..2eb82f63c 100644 --- a/pkg/shim/utils/BUILD +++ b/pkg/shim/utils/BUILD @@ -6,6 +6,7 @@ go_library( name = "utils", srcs = [ "annotations.go", + "errors.go", "utils.go", "volumes.go", ], @@ -14,14 +15,23 @@ go_library( "//shim:__subpackages__", ], deps = [ + "@com_github_containerd_containerd//errdefs:go_default_library", "@com_github_opencontainers_runtime_spec//specs-go:go_default_library", + "@org_golang_google_grpc//codes:go_default_library", + "@org_golang_google_grpc//status:go_default_library", ], ) go_test( name = "utils_test", size = "small", - srcs = ["volumes_test.go"], + srcs = [ + "errors_test.go", + "volumes_test.go", + ], library = ":utils", - deps = ["@com_github_opencontainers_runtime_spec//specs-go:go_default_library"], + deps = [ + "@com_github_containerd_containerd//errdefs:go_default_library", + "@com_github_opencontainers_runtime_spec//specs-go:go_default_library", + ], ) |