Skip to content

Commit

Permalink
Merge branch 'main' into merge_csi
Browse files Browse the repository at this point in the history
Signed-off-by: Xun Jiang/Bruce Jiang <[email protected]>
  • Loading branch information
blackpiglet authored Apr 10, 2024
2 parents 31e1409 + b91b907 commit 8df4e6a
Show file tree
Hide file tree
Showing 20 changed files with 22 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions changelogs/unreleased/7584-mmorel-35
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build(deps): bump json-patch to v5.8.0
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion internal/resourcemodifiers/json_merge_patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion internal/resourcemodifiers/json_patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/resourcemodifiers/resource_modifiers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions pkg/backup/backup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion pkg/builder/v1_customresourcedefinition_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{},
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/cli/plugin/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/cli/plugin/remove.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/util/output/backup_structured_describer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/backup_deletion_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion pkg/restore/actions/change_image_name_action_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion pkg/restore/merge_service_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion pkg/restore/restore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion pkg/test/fake_credential_file_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
2 changes: 1 addition & 1 deletion pkg/uploader/kopia/shim.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion pkg/util/csi/volume_snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion pkg/util/kube/pvc_pv.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 8df4e6a

Please sign in to comment.