Merge branch 'main' into merge_csi

Signed-off-by: Xun Jiang/Bruce Jiang <59276555+blackpiglet@users.noreply.github.com>
This commit is contained in:
Xun Jiang/Bruce Jiang
2024-04-10 18:54:16 +08:00
committed by GitHub
20 changed files with 22 additions and 21 deletions

View File

@@ -24,7 +24,7 @@ jobs:
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
with:
version: latest

View File

@@ -43,7 +43,7 @@ jobs:
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
with:
version: latest

View File

@@ -0,0 +1 @@
build(deps): bump json-patch to v5.8.0

4
go.mod
View File

@@ -24,7 +24,7 @@ require (
github.com/aws/aws-sdk-go-v2/service/s3 v1.48.0
github.com/aws/aws-sdk-go-v2/service/sts v1.26.7
github.com/bombsimon/logrusr/v3 v3.0.0
github.com/evanphx/json-patch v5.6.0+incompatible
github.com/evanphx/json-patch/v5 v5.8.0
github.com/fatih/color v1.16.0
github.com/gobwas/glob v0.2.3
github.com/golang/protobuf v1.5.4
@@ -105,7 +105,7 @@ require (
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/edsrzf/mmap-go v1.1.0 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/evanphx/json-patch/v5 v5.8.0 // indirect
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect

View File

@@ -3,7 +3,7 @@ package resourcemodifiers
import (
"fmt"
jsonpatch "github.com/evanphx/json-patch"
jsonpatch "github.com/evanphx/json-patch/v5"
"github.com/sirupsen/logrus"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"sigs.k8s.io/yaml"

View File

@@ -6,7 +6,7 @@ import (
"strconv"
"strings"
jsonpatch "github.com/evanphx/json-patch"
jsonpatch "github.com/evanphx/json-patch/v5"
"github.com/sirupsen/logrus"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
)

View File

@@ -19,7 +19,7 @@ import (
"fmt"
"regexp"
jsonpatch "github.com/evanphx/json-patch"
jsonpatch "github.com/evanphx/json-patch/v5"
"github.com/gobwas/glob"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"

View File

@@ -164,7 +164,7 @@ func TestBackupProgressIsUpdated(t *testing.T) {
assert.Len(t, req.BackedUpItems, req.Status.Progress.ItemsBackedUp)
}
// TestBackupResourceFiltering runs backups with different combinations
// TestBackupOldResourceFiltering runs backups with different combinations
// of resource filters (included/excluded resources, included/excluded
// namespaces, label selectors, "include cluster resources" flag), and
// verifies that the set of items written to the backup tarball are
@@ -1430,7 +1430,7 @@ func TestBackupItemActionsForSkippedPV(t *testing.T) {
}
}
// TestBackupActionsRunsForCorrectItems runs backups with backup item actions, and
// TestBackupActionsRunForCorrectItems runs backups with backup item actions, and
// verifies that each backup item action is run for the correct set of resources based on its
// AppliesTo() resource selector. Verification is done by using the recordResourcesAction struct,
// which records which resources it's executed for.

View File

@@ -78,7 +78,7 @@ type V1CustomResourceDefinitionConditionBuilder struct {
object apiextv1.CustomResourceDefinitionCondition
}
// ForV1V1CustomResourceDefinitionConditionBuilder is the constructor for a V1CustomResourceDefinitionConditionBuilder.
// ForV1CustomResourceDefinitionCondition is the constructor for a V1CustomResourceDefinitionConditionBuilder.
func ForV1CustomResourceDefinitionCondition() *V1CustomResourceDefinitionConditionBuilder {
return &V1CustomResourceDefinitionConditionBuilder{
object: apiextv1.CustomResourceDefinitionCondition{},

View File

@@ -22,7 +22,7 @@ import (
"fmt"
"strings"
jsonpatch "github.com/evanphx/json-patch"
jsonpatch "github.com/evanphx/json-patch/v5"
"github.com/pkg/errors"
"github.com/spf13/cobra"
corev1api "k8s.io/api/core/v1"

View File

@@ -20,7 +20,7 @@ import (
"context"
"encoding/json"
jsonpatch "github.com/evanphx/json-patch"
jsonpatch "github.com/evanphx/json-patch/v5"
"github.com/pkg/errors"
"github.com/spf13/cobra"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

View File

@@ -410,7 +410,7 @@ func describeCSISnapshotInSF(details bool, info *volume.VolumeInfo, snapshotDeta
snapshotDetails[fmt.Sprintf("%s/%s", info.PVCNamespace, info.PVCName)] = snapshotDetail
}
// describeVSCInSF describes CSI volume snapshot contents in structured format.
// describeLocalSnapshotInSF describes CSI volume snapshot contents in structured format.
func describeLocalSnapshotInSF(details bool, info *volume.VolumeInfo, snapshotDetail map[string]interface{}) {
if !info.PreserveLocalSnapshot {
return

View File

@@ -22,7 +22,7 @@ import (
"fmt"
"time"
jsonpatch "github.com/evanphx/json-patch"
jsonpatch "github.com/evanphx/json-patch/v5"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
corev1 "k8s.io/api/core/v1"

View File

@@ -33,7 +33,7 @@ import (
"github.com/vmware-tanzu/velero/pkg/plugin/velero"
)
// TestChangeImageNameActionExecute runs the ChangeImageNameAction's Execute
// TestChangeImageRepositoryActionExecute runs the ChangeImageNameAction's Execute
// method and validates that the item's image name is modified (or not) as expected.
// Validation is done by comparing the result of the Execute method to the test case's
// desired result.

View File

@@ -19,7 +19,7 @@ package restore
import (
"encoding/json"
jsonpatch "github.com/evanphx/json-patch"
jsonpatch "github.com/evanphx/json-patch/v5"
"github.com/pkg/errors"
corev1api "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/equality"

View File

@@ -1491,7 +1491,7 @@ func (a *recordResourcesAction) WithAdditionalItems(items []velero.ResourceIdent
return a
}
// TestRestoreActionsRunsForCorrectItems runs restores with restore item actions, and
// TestRestoreActionsRunForCorrectItems runs restores with restore item actions, and
// verifies that each restore item action is run for the correct set of resources based on its
// AppliesTo() resource selector. Verification is done by using the recordResourcesAction struct,
// which records which resources it's executed for.

View File

@@ -39,7 +39,7 @@ func (f *fakeCredentialsFileStore) Path(*corev1api.SecretKeySelector) (string, e
return f.path, f.err
}
// NewFakeCredentialFileStore creates a FileStore which will return the given path
// NewFakeCredentialsFileStore creates a FileStore which will return the given path
// and error when Path is called.
func NewFakeCredentialsFileStore(path string, err error) FileStore {
return &fakeCredentialsFileStore{

View File

@@ -95,7 +95,7 @@ func (sr *shimRepository) FindManifests(ctx context.Context, labels map[string]s
return GetKopiaManifestEntries(metadata), nil
}
// GetKopiaManifestEntries get metadata from specific ManifestEntryMetadata
// GetKopiaManifestEntry get metadata from specific ManifestEntryMetadata
func GetKopiaManifestEntry(uMani *udmrepo.ManifestEntryMetadata) *manifest.EntryMetadata {
var ret manifest.EntryMetadata

View File

@@ -23,7 +23,7 @@ import (
"strings"
"time"
jsonpatch "github.com/evanphx/json-patch"
jsonpatch "github.com/evanphx/json-patch/v5"
snapshotv1api "github.com/kubernetes-csi/external-snapshotter/client/v7/apis/volumesnapshot/v1"
snapshotter "github.com/kubernetes-csi/external-snapshotter/client/v7/clientset/versioned/typed/volumesnapshot/v1"
"github.com/pkg/errors"

View File

@@ -22,7 +22,7 @@ import (
"fmt"
"time"
jsonpatch "github.com/evanphx/json-patch"
jsonpatch "github.com/evanphx/json-patch/v5"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
corev1api "k8s.io/api/core/v1"