mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-19 06:26:44 +00:00
Replace github.com/pkg/errors by github.com/cockroachdb/errors
Change errors.Cause to errors.Is, because github.com/cockroachdb/errors New() function create a error with error stack with depth 1, but github.com/pkg/errors's New() function create error with no depth. Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
This commit is contained in:
@@ -17,7 +17,7 @@ limitations under the License.
|
||||
package framework
|
||||
|
||||
import (
|
||||
"github.com/pkg/errors"
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
|
||||
"context"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/cockroachdb/errors"
|
||||
"google.golang.org/grpc"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
|
||||
"context"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/cockroachdb/errors"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
|
||||
api "github.com/vmware-tanzu/velero/pkg/apis/velero/v1"
|
||||
|
||||
@@ -20,7 +20,7 @@ import (
|
||||
"encoding/json"
|
||||
"testing"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
|
||||
"context"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/cockroachdb/errors"
|
||||
"google.golang.org/grpc"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
|
||||
"context"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/cockroachdb/errors"
|
||||
"google.golang.org/protobuf/types/known/emptypb"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import (
|
||||
"encoding/json"
|
||||
"testing"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
|
||||
@@ -19,7 +19,7 @@ package common
|
||||
import (
|
||||
"runtime/debug"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/cockroachdb/errors"
|
||||
"google.golang.org/grpc/codes"
|
||||
)
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/cockroachdb/errors"
|
||||
corev1api "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
corev1client "k8s.io/client-go/kubernetes/typed/core/v1"
|
||||
|
||||
@@ -17,7 +17,7 @@ limitations under the License.
|
||||
package common
|
||||
|
||||
import (
|
||||
"github.com/pkg/errors"
|
||||
"github.com/cockroachdb/errors/errbase"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/protoadapt"
|
||||
@@ -81,5 +81,5 @@ func ErrorStack(err error) *proto.Stack {
|
||||
}
|
||||
|
||||
type StackTracer interface {
|
||||
StackTrace() errors.StackTrace
|
||||
StackTrace() errbase.StackTrace
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ package common
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
"k8s.io/apimachinery/pkg/util/sets"
|
||||
"k8s.io/apimachinery/pkg/util/validation"
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
|
||||
"context"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/cockroachdb/errors"
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"github.com/vmware-tanzu/velero/pkg/plugin/framework/common"
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
|
||||
"context"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/cockroachdb/errors"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
|
||||
api "github.com/vmware-tanzu/velero/pkg/apis/velero/v1"
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
|
||||
"context"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/cockroachdb/errors"
|
||||
"google.golang.org/grpc"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
|
||||
"context"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/cockroachdb/errors"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
|
||||
api "github.com/vmware-tanzu/velero/pkg/apis/velero/v1"
|
||||
|
||||
@@ -20,7 +20,7 @@ import (
|
||||
"encoding/json"
|
||||
"testing"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
|
||||
@@ -22,7 +22,7 @@ import (
|
||||
|
||||
"context"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/cockroachdb/errors"
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"github.com/vmware-tanzu/velero/pkg/plugin/framework/common"
|
||||
|
||||
@@ -22,7 +22,7 @@ import (
|
||||
|
||||
"context"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/cockroachdb/errors"
|
||||
|
||||
"github.com/vmware-tanzu/velero/pkg/plugin/framework/common"
|
||||
proto "github.com/vmware-tanzu/velero/pkg/plugin/generated"
|
||||
|
||||
@@ -19,8 +19,8 @@ package framework
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/cockroachdb/errors"
|
||||
plugin "github.com/hashicorp/go-plugin"
|
||||
"github.com/pkg/errors"
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"github.com/vmware-tanzu/velero/pkg/plugin/framework/common"
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
|
||||
"context"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/cockroachdb/errors"
|
||||
"google.golang.org/grpc"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
|
||||
"context"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/cockroachdb/errors"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
|
||||
api "github.com/vmware-tanzu/velero/pkg/apis/velero/v1"
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
|
||||
"context"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/cockroachdb/errors"
|
||||
"google.golang.org/grpc"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
|
||||
"context"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/cockroachdb/errors"
|
||||
"google.golang.org/protobuf/types/known/durationpb"
|
||||
"google.golang.org/protobuf/types/known/emptypb"
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
|
||||
@@ -17,7 +17,7 @@ limitations under the License.
|
||||
package framework
|
||||
|
||||
import (
|
||||
"github.com/pkg/errors"
|
||||
"github.com/cockroachdb/errors"
|
||||
"k8s.io/apimachinery/pkg/util/sets"
|
||||
)
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
|
||||
"context"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/cockroachdb/errors"
|
||||
"google.golang.org/grpc"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
|
||||
"context"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/cockroachdb/errors"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
|
||||
"github.com/vmware-tanzu/velero/pkg/plugin/framework/common"
|
||||
|
||||
Reference in New Issue
Block a user