From 3a42f325fadfbc397be2d0489fdf830fd6e4e56e Mon Sep 17 00:00:00 2001 From: Juan Manuel Parrilla Madrid Date: Mon, 18 May 2026 19:49:09 +0200 Subject: [PATCH] OCPBUGS-80948: update velero replace and align dep defaults for oadp-1.5 - Update velero replace to latest oadp-1.5 commit (e8ffd8d87b42, 2026-05-01) - Align Go file fallback defaults from "main" to "release-4.21" to match Makefile - Change dependency test to warn-only (t.Log) instead of failing (t.Error), consistent with main branch behavior Fixes: OCPBUGS-80948 Ref: https://redhat.atlassian.net/browse/OCPBUGS-80948 Co-Authored-By: Claude Opus 4.6 (1M context) Signed-off-by: Juan Manuel Parrilla Madrid --- go.mod | 6 +- go.sum | 4 +- konflux.Dockerfile | 2 +- scripts/update-dependencies.go | 4 +- .../dependencies/dependencies_test.go | 22 ++-- .../plugin/framework/backup_item_action.go | 3 +- .../framework/backup_item_action_client.go | 3 +- .../framework/backup_item_action_server.go | 3 +- .../backupitemaction/v2/backup_item_action.go | 3 +- .../v2/backup_item_action_client.go | 3 +- .../v2/backup_item_action_server.go | 3 +- .../plugin/framework/delete_item_action.go | 3 +- .../framework/delete_item_action_client.go | 3 +- .../framework/delete_item_action_server.go | 3 +- .../itemblockaction/v1/item_block_action.go | 3 +- .../v1/item_block_action_client.go | 3 +- .../v1/item_block_action_server.go | 3 +- .../pkg/plugin/framework/object_store.go | 3 +- .../plugin/framework/object_store_client.go | 3 +- .../plugin/framework/object_store_server.go | 3 +- .../pkg/plugin/framework/plugin_lister.go | 3 +- .../plugin/framework/restore_item_action.go | 3 +- .../framework/restore_item_action_client.go | 3 +- .../framework/restore_item_action_server.go | 3 +- .../v2/restore_item_action.go | 3 +- .../v2/restore_item_action_client.go | 3 +- .../v2/restore_item_action_server.go | 3 +- .../plugin/framework/volume_snapshotter.go | 3 +- .../framework/volume_snapshotter_client.go | 3 +- .../framework/volume_snapshotter_server.go | 3 +- .../vmware-tanzu/velero/pkg/util/kube/pod.go | 9 +- .../velero/pkg/util/kube/utils.go | 6 +- vendor/golang.org/x/net/context/context.go | 118 ------------------ vendor/modules.txt | 7 +- 34 files changed, 81 insertions(+), 172 deletions(-) delete mode 100644 vendor/golang.org/x/net/context/context.go diff --git a/go.mod b/go.mod index f651af5f7..80edc2679 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,6 @@ module github.com/openshift/hypershift-oadp-plugin -go 1.25.0 - -toolchain go1.25.8 +go 1.25.8 require ( github.com/kubernetes-csi/external-snapshotter/client/v8 v8.2.0 @@ -92,4 +90,4 @@ require ( sigs.k8s.io/yaml v1.6.0 // indirect ) -replace github.com/vmware-tanzu/velero => github.com/openshift/velero v0.10.2-0.20250514165055-8fbcf3a8da11 +replace github.com/vmware-tanzu/velero => github.com/openshift/velero v0.10.2-0.20260501155251-e8ffd8d87b42 diff --git a/go.sum b/go.sum index 4185634a4..682c66ec6 100644 --- a/go.sum +++ b/go.sum @@ -212,8 +212,8 @@ github.com/openshift/hive/apis v0.0.0-20241220022629-3f49f26197ff h1:6C1z4xMAruy github.com/openshift/hive/apis v0.0.0-20241220022629-3f49f26197ff/go.mod h1:1vBNCcWNpQyFCz83PWYT/lHUFJ9ost2t5FijHElh6gQ= github.com/openshift/hypershift/api v0.0.0-20260318164553-2d4aedcf7899 h1:Da2btnE0P0Y1y0VX0YYKns3vu0yIxTCcU5bYY+gqcTM= github.com/openshift/hypershift/api v0.0.0-20260318164553-2d4aedcf7899/go.mod h1:dN8V9JjUjvvJaF3SJFSkb5p2H3CkjwcFDMlABEkQyuU= -github.com/openshift/velero v0.10.2-0.20250514165055-8fbcf3a8da11 h1:/BjkW8HljIX96clCuv/V+PzShD3coVcNilCXd/Axlfo= -github.com/openshift/velero v0.10.2-0.20250514165055-8fbcf3a8da11/go.mod h1:+wInt9pLqlRiUZAWsO5eSxLZK9Q3jSV9MFaUrBfvGN0= +github.com/openshift/velero v0.10.2-0.20260501155251-e8ffd8d87b42 h1:pPH6ZdfNSRFHZKOWnYFK2zRF6PrBtUiKwZ42lg2nA+Q= +github.com/openshift/velero v0.10.2-0.20260501155251-e8ffd8d87b42/go.mod h1:KEpTfFgye9RJEXdq5BpYS2e07GEQiI/8IBKpnQp1X54= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= diff --git a/konflux.Dockerfile b/konflux.Dockerfile index e1179c81e..d8f2b6ce6 100644 --- a/konflux.Dockerfile +++ b/konflux.Dockerfile @@ -1,4 +1,4 @@ -FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_golang_1.24 AS builder +FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_golang_1.25 AS builder COPY . /workspace WORKDIR /workspace/ diff --git a/scripts/update-dependencies.go b/scripts/update-dependencies.go index 644b87bb7..7c722b4b3 100644 --- a/scripts/update-dependencies.go +++ b/scripts/update-dependencies.go @@ -20,10 +20,10 @@ var watchedDependencies = map[string]string{ } func main() { - // Read the target upstream branch from environment variable, defaulting to "main" + // Read the target upstream branch from environment variable, defaulting to "release-4.21" targetBranch := os.Getenv("DEPS_UPSTREAM_BRANCH") if targetBranch == "" { - targetBranch = "main" + targetBranch = "release-4.21" } fmt.Printf("🔄 Updating watched dependencies to latest %s branch versions...\n", targetBranch) diff --git a/tests/integration/dependencies/dependencies_test.go b/tests/integration/dependencies/dependencies_test.go index 0d18712b0..a2547292c 100644 --- a/tests/integration/dependencies/dependencies_test.go +++ b/tests/integration/dependencies/dependencies_test.go @@ -21,18 +21,18 @@ var watchedDependencies = []string{ } // getTargetBranch returns the upstream branch to check dependencies against. -// It reads the DEPS_UPSTREAM_BRANCH environment variable, defaulting to "main". +// It reads the DEPS_UPSTREAM_BRANCH environment variable, defaulting to "release-4.21". func getTargetBranch() string { branch := os.Getenv("DEPS_UPSTREAM_BRANCH") if branch == "" { - branch = "main" + branch = "release-4.21" } return branch } // TestWatchedDependenciesAreUpToDate validates that all watched dependencies // are up-to-date with the latest versions available from the target upstream branch. -// The target branch is controlled by the DEPS_UPSTREAM_BRANCH environment variable (default: "main"). +// The target branch is controlled by the DEPS_UPSTREAM_BRANCH environment variable (default: "release-4.21"). // This helps prevent scheme-related issues and compatibility problems. func TestWatchedDependenciesAreUpToDate(t *testing.T) { targetBranch := getTargetBranch() @@ -61,28 +61,28 @@ func TestWatchedDependenciesAreUpToDate(t *testing.T) { t.Logf("Latest available %s version: %s", module, latestVersion) - // Compare versions directly + // Compare versions - warn if outdated but do not fail the test if currentVersion != latestVersion { allDependenciesUpToDate = false - errorMsg := fmt.Sprintf("Dependency %s is not up-to-date with upstream %s branch.\n"+ + warnMsg := fmt.Sprintf("WARNING: Dependency %s is not up-to-date with upstream %s branch.\n"+ "Current version: %s\n"+ "Latest available: %s\n"+ "Consider running: go get %s@%s && go mod tidy && go mod vendor", module, targetBranch, currentVersion, latestVersion, module, targetBranch) - failureMessages = append(failureMessages, errorMsg) - t.Error(errorMsg) + failureMessages = append(failureMessages, warnMsg) + t.Log(warnMsg) } else { - t.Logf("✅ Dependency %s is up-to-date with upstream %s branch", module, targetBranch) + t.Logf("Dependency %s is up-to-date with upstream %s branch", module, targetBranch) } }) } - // If any dependency failed, fail the main test with a summary + // Log a summary warning if any dependency is outdated, but do not fail the test if !allDependenciesUpToDate { - t.Errorf("One or more dependencies are not up-to-date:\n%s", strings.Join(failureMessages, "\n\n")) + t.Logf("WARNING: One or more dependencies are not up-to-date:\n%s", strings.Join(failureMessages, "\n\n")) } else { - t.Logf("✅ All %d watched dependencies are up-to-date", len(watchedDependencies)) + t.Logf("All %d watched dependencies are up-to-date", len(watchedDependencies)) } } diff --git a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/backup_item_action.go b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/backup_item_action.go index 00f3cc0ea..9c1a5665d 100644 --- a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/backup_item_action.go +++ b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/backup_item_action.go @@ -17,8 +17,9 @@ limitations under the License. package framework import ( + "context" + plugin "github.com/hashicorp/go-plugin" - "golang.org/x/net/context" "google.golang.org/grpc" "github.com/vmware-tanzu/velero/pkg/plugin/framework/common" diff --git a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/backup_item_action_client.go b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/backup_item_action_client.go index 948cb3492..724737d01 100644 --- a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/backup_item_action_client.go +++ b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/backup_item_action_client.go @@ -19,8 +19,9 @@ package framework import ( "encoding/json" + "context" + "github.com/pkg/errors" - "golang.org/x/net/context" "google.golang.org/grpc" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" diff --git a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/backup_item_action_server.go b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/backup_item_action_server.go index 6511591a9..7c18b4ef6 100644 --- a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/backup_item_action_server.go +++ b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/backup_item_action_server.go @@ -19,8 +19,9 @@ package framework import ( "encoding/json" + "context" + "github.com/pkg/errors" - "golang.org/x/net/context" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" api "github.com/vmware-tanzu/velero/pkg/apis/velero/v1" diff --git a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/backupitemaction/v2/backup_item_action.go b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/backupitemaction/v2/backup_item_action.go index c1e2e5401..903ec378c 100644 --- a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/backupitemaction/v2/backup_item_action.go +++ b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/backupitemaction/v2/backup_item_action.go @@ -17,8 +17,9 @@ limitations under the License. package v2 import ( + "context" + plugin "github.com/hashicorp/go-plugin" - "golang.org/x/net/context" "google.golang.org/grpc" "github.com/vmware-tanzu/velero/pkg/plugin/framework/common" diff --git a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/backupitemaction/v2/backup_item_action_client.go b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/backupitemaction/v2/backup_item_action_client.go index 52733de2d..64695dbe3 100644 --- a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/backupitemaction/v2/backup_item_action_client.go +++ b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/backupitemaction/v2/backup_item_action_client.go @@ -19,8 +19,9 @@ package v2 import ( "encoding/json" + "context" + "github.com/pkg/errors" - "golang.org/x/net/context" "google.golang.org/grpc" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" diff --git a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/backupitemaction/v2/backup_item_action_server.go b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/backupitemaction/v2/backup_item_action_server.go index c622490e7..f8c894eba 100644 --- a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/backupitemaction/v2/backup_item_action_server.go +++ b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/backupitemaction/v2/backup_item_action_server.go @@ -19,8 +19,9 @@ package v2 import ( "encoding/json" + "context" + "github.com/pkg/errors" - "golang.org/x/net/context" "google.golang.org/protobuf/types/known/emptypb" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" diff --git a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/delete_item_action.go b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/delete_item_action.go index afc5d548e..db4329b7f 100644 --- a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/delete_item_action.go +++ b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/delete_item_action.go @@ -17,8 +17,9 @@ limitations under the License. package framework import ( + "context" + plugin "github.com/hashicorp/go-plugin" - "golang.org/x/net/context" "google.golang.org/grpc" "github.com/vmware-tanzu/velero/pkg/plugin/framework/common" diff --git a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/delete_item_action_client.go b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/delete_item_action_client.go index 088c42b51..bec5088db 100644 --- a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/delete_item_action_client.go +++ b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/delete_item_action_client.go @@ -19,8 +19,9 @@ package framework import ( "encoding/json" + "context" + "github.com/pkg/errors" - "golang.org/x/net/context" "google.golang.org/grpc" "github.com/vmware-tanzu/velero/pkg/plugin/framework/common" diff --git a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/delete_item_action_server.go b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/delete_item_action_server.go index e298969d1..01abe8dc3 100644 --- a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/delete_item_action_server.go +++ b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/delete_item_action_server.go @@ -19,8 +19,9 @@ package framework import ( "encoding/json" + "context" + "github.com/pkg/errors" - "golang.org/x/net/context" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" api "github.com/vmware-tanzu/velero/pkg/apis/velero/v1" diff --git a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/itemblockaction/v1/item_block_action.go b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/itemblockaction/v1/item_block_action.go index 9fb8094ee..2115d2ecf 100644 --- a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/itemblockaction/v1/item_block_action.go +++ b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/itemblockaction/v1/item_block_action.go @@ -17,8 +17,9 @@ limitations under the License. package v1 import ( + "context" + plugin "github.com/hashicorp/go-plugin" - "golang.org/x/net/context" "google.golang.org/grpc" "github.com/vmware-tanzu/velero/pkg/plugin/framework/common" diff --git a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/itemblockaction/v1/item_block_action_client.go b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/itemblockaction/v1/item_block_action_client.go index 612a14a6c..aa597c4af 100644 --- a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/itemblockaction/v1/item_block_action_client.go +++ b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/itemblockaction/v1/item_block_action_client.go @@ -19,8 +19,9 @@ package v1 import ( "encoding/json" + "context" + "github.com/pkg/errors" - "golang.org/x/net/context" "google.golang.org/grpc" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/itemblockaction/v1/item_block_action_server.go b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/itemblockaction/v1/item_block_action_server.go index ab9ad7485..2d940550c 100644 --- a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/itemblockaction/v1/item_block_action_server.go +++ b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/itemblockaction/v1/item_block_action_server.go @@ -19,8 +19,9 @@ package v1 import ( "encoding/json" + "context" + "github.com/pkg/errors" - "golang.org/x/net/context" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" api "github.com/vmware-tanzu/velero/pkg/apis/velero/v1" diff --git a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/object_store.go b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/object_store.go index d7c7b95e4..ea624da42 100644 --- a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/object_store.go +++ b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/object_store.go @@ -17,8 +17,9 @@ limitations under the License. package framework import ( + "context" + plugin "github.com/hashicorp/go-plugin" - "golang.org/x/net/context" "google.golang.org/grpc" "github.com/vmware-tanzu/velero/pkg/plugin/framework/common" diff --git a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/object_store_client.go b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/object_store_client.go index 725f8e934..b59f3d1b0 100644 --- a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/object_store_client.go +++ b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/object_store_client.go @@ -20,8 +20,9 @@ import ( "io" "time" + "context" + "github.com/pkg/errors" - "golang.org/x/net/context" "google.golang.org/grpc" "github.com/vmware-tanzu/velero/pkg/plugin/framework/common" diff --git a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/object_store_server.go b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/object_store_server.go index 2d3ef3658..fbed21ecf 100644 --- a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/object_store_server.go +++ b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/object_store_server.go @@ -20,8 +20,9 @@ import ( "io" "time" + "context" + "github.com/pkg/errors" - "golang.org/x/net/context" "github.com/vmware-tanzu/velero/pkg/plugin/framework/common" proto "github.com/vmware-tanzu/velero/pkg/plugin/generated" diff --git a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/plugin_lister.go b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/plugin_lister.go index 19e349007..6db81c66d 100644 --- a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/plugin_lister.go +++ b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/plugin_lister.go @@ -17,9 +17,10 @@ limitations under the License. package framework import ( + "context" + plugin "github.com/hashicorp/go-plugin" "github.com/pkg/errors" - "golang.org/x/net/context" "google.golang.org/grpc" "github.com/vmware-tanzu/velero/pkg/plugin/framework/common" diff --git a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/restore_item_action.go b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/restore_item_action.go index 0aaf2b47e..26cef3728 100644 --- a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/restore_item_action.go +++ b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/restore_item_action.go @@ -17,8 +17,9 @@ limitations under the License. package framework import ( + "context" + plugin "github.com/hashicorp/go-plugin" - "golang.org/x/net/context" "google.golang.org/grpc" "github.com/vmware-tanzu/velero/pkg/plugin/framework/common" diff --git a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/restore_item_action_client.go b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/restore_item_action_client.go index 8809e31c3..3a5a633f3 100644 --- a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/restore_item_action_client.go +++ b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/restore_item_action_client.go @@ -19,8 +19,9 @@ package framework import ( "encoding/json" + "context" + "github.com/pkg/errors" - "golang.org/x/net/context" "google.golang.org/grpc" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/restore_item_action_server.go b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/restore_item_action_server.go index bdc149c48..175a941bd 100644 --- a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/restore_item_action_server.go +++ b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/restore_item_action_server.go @@ -19,8 +19,9 @@ package framework import ( "encoding/json" + "context" + "github.com/pkg/errors" - "golang.org/x/net/context" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" api "github.com/vmware-tanzu/velero/pkg/apis/velero/v1" diff --git a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/restoreitemaction/v2/restore_item_action.go b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/restoreitemaction/v2/restore_item_action.go index 243e2fd67..00bb825b8 100644 --- a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/restoreitemaction/v2/restore_item_action.go +++ b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/restoreitemaction/v2/restore_item_action.go @@ -17,8 +17,9 @@ limitations under the License. package v2 import ( + "context" + plugin "github.com/hashicorp/go-plugin" - "golang.org/x/net/context" "google.golang.org/grpc" "github.com/vmware-tanzu/velero/pkg/plugin/framework/common" diff --git a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/restoreitemaction/v2/restore_item_action_client.go b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/restoreitemaction/v2/restore_item_action_client.go index b1d61fb75..5e2f01c37 100644 --- a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/restoreitemaction/v2/restore_item_action_client.go +++ b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/restoreitemaction/v2/restore_item_action_client.go @@ -19,8 +19,9 @@ package v2 import ( "encoding/json" + "context" + "github.com/pkg/errors" - "golang.org/x/net/context" "google.golang.org/grpc" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/restoreitemaction/v2/restore_item_action_server.go b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/restoreitemaction/v2/restore_item_action_server.go index 2795d787d..115961656 100644 --- a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/restoreitemaction/v2/restore_item_action_server.go +++ b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/restoreitemaction/v2/restore_item_action_server.go @@ -19,8 +19,9 @@ package v2 import ( "encoding/json" + "context" + "github.com/pkg/errors" - "golang.org/x/net/context" "google.golang.org/protobuf/types/known/durationpb" "google.golang.org/protobuf/types/known/emptypb" "google.golang.org/protobuf/types/known/timestamppb" diff --git a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/volume_snapshotter.go b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/volume_snapshotter.go index 5eb6159eb..8cbb48fa4 100644 --- a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/volume_snapshotter.go +++ b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/volume_snapshotter.go @@ -17,8 +17,9 @@ limitations under the License. package framework import ( + "context" + plugin "github.com/hashicorp/go-plugin" - "golang.org/x/net/context" "google.golang.org/grpc" "github.com/vmware-tanzu/velero/pkg/plugin/framework/common" diff --git a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/volume_snapshotter_client.go b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/volume_snapshotter_client.go index da66f2cea..f7af07ce4 100644 --- a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/volume_snapshotter_client.go +++ b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/volume_snapshotter_client.go @@ -19,8 +19,9 @@ package framework import ( "encoding/json" + "context" + "github.com/pkg/errors" - "golang.org/x/net/context" "google.golang.org/grpc" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" diff --git a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/volume_snapshotter_server.go b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/volume_snapshotter_server.go index 99bdea03a..de30c823f 100644 --- a/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/volume_snapshotter_server.go +++ b/vendor/github.com/vmware-tanzu/velero/pkg/plugin/framework/volume_snapshotter_server.go @@ -19,8 +19,9 @@ package framework import ( "encoding/json" + "context" + "github.com/pkg/errors" - "golang.org/x/net/context" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "github.com/vmware-tanzu/velero/pkg/plugin/framework/common" diff --git a/vendor/github.com/vmware-tanzu/velero/pkg/util/kube/pod.go b/vendor/github.com/vmware-tanzu/velero/pkg/util/kube/pod.go index 04457f0d4..83dcca92b 100644 --- a/vendor/github.com/vmware-tanzu/velero/pkg/util/kube/pod.go +++ b/vendor/github.com/vmware-tanzu/velero/pkg/util/kube/pod.go @@ -19,6 +19,7 @@ import ( "context" "fmt" "io" + "strings" "time" "github.com/pkg/errors" @@ -172,13 +173,15 @@ func GetPodContainerTerminateMessage(pod *corev1api.Pod, container string) strin // GetPodTerminateMessage returns the terminate message for all containers of a pod func GetPodTerminateMessage(pod *corev1api.Pod) string { message := "" + var messageSb175 strings.Builder for _, containerStatus := range pod.Status.ContainerStatuses { if containerStatus.State.Terminated != nil { if containerStatus.State.Terminated.Message != "" { - message += containerStatus.State.Terminated.Message + "/" + messageSb175.WriteString(containerStatus.State.Terminated.Message + "/") } } } + message += messageSb175.String() return message } @@ -267,9 +270,11 @@ func ToSystemAffinity(loadAffinities []*LoadAffinity) *corev1api.Affinity { func DiagnosePod(pod *corev1api.Pod) string { diag := fmt.Sprintf("Pod %s/%s, phase %s, node name %s\n", pod.Namespace, pod.Name, pod.Status.Phase, pod.Spec.NodeName) + var diagSb270 strings.Builder for _, condition := range pod.Status.Conditions { - diag += fmt.Sprintf("Pod condition %s, status %s, reason %s, message %s\n", condition.Type, condition.Status, condition.Reason, condition.Message) + fmt.Fprintf(&diagSb270, "Pod condition %s, status %s, reason %s, message %s\n", condition.Type, condition.Status, condition.Reason, condition.Message) } + diag += diagSb270.String() return diag } diff --git a/vendor/github.com/vmware-tanzu/velero/pkg/util/kube/utils.go b/vendor/github.com/vmware-tanzu/velero/pkg/util/kube/utils.go index 5d64f117b..3a1b139a3 100644 --- a/vendor/github.com/vmware-tanzu/velero/pkg/util/kube/utils.go +++ b/vendor/github.com/vmware-tanzu/velero/pkg/util/kube/utils.go @@ -154,7 +154,7 @@ func GetVolumeDirectory(ctx context.Context, log logrus.FieldLogger, pod *corev1 // This case implies the administrator created the PV and attached it directly, without PVC. // Note that only one VolumeSource can be populated per Volume on a pod if err == ErrorPodVolumeIsNotPVC { - if volume.VolumeSource.CSI != nil { + if volume.CSI != nil { return volume.Name + "/mount", nil } return volume.Name, nil @@ -213,12 +213,12 @@ func GetPodPVCVolume(ctx context.Context, log logrus.FieldLogger, pod *corev1api return nil, nil, nil, errors.New("volume not found in pod") } - if volume.VolumeSource.PersistentVolumeClaim == nil { + if volume.PersistentVolumeClaim == nil { return nil, nil, volume, ErrorPodVolumeIsNotPVC // There is a pod volume but it is not a PVC } pvc := &corev1api.PersistentVolumeClaim{} - err := cli.Get(ctx, client.ObjectKey{Namespace: pod.Namespace, Name: volume.VolumeSource.PersistentVolumeClaim.ClaimName}, pvc) + err := cli.Get(ctx, client.ObjectKey{Namespace: pod.Namespace, Name: volume.PersistentVolumeClaim.ClaimName}, pvc) if err != nil { return nil, nil, nil, errors.WithStack(err) } diff --git a/vendor/golang.org/x/net/context/context.go b/vendor/golang.org/x/net/context/context.go deleted file mode 100644 index 24cea6882..000000000 --- a/vendor/golang.org/x/net/context/context.go +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package context has been superseded by the standard library [context] package. -// -// Deprecated: Use the standard library context package instead. -package context - -import ( - "context" // standard library's context, as of Go 1.7 - "time" -) - -// A Context carries a deadline, a cancellation signal, and other values across -// API boundaries. -// -// Context's methods may be called by multiple goroutines simultaneously. -// -//go:fix inline -type Context = context.Context - -// Canceled is the error returned by [Context.Err] when the context is canceled -// for some reason other than its deadline passing. -// -//go:fix inline -var Canceled = context.Canceled - -// DeadlineExceeded is the error returned by [Context.Err] when the context is canceled -// due to its deadline passing. -// -//go:fix inline -var DeadlineExceeded = context.DeadlineExceeded - -// Background returns a non-nil, empty Context. It is never canceled, has no -// values, and has no deadline. It is typically used by the main function, -// initialization, and tests, and as the top-level Context for incoming -// requests. -// -//go:fix inline -func Background() Context { return context.Background() } - -// TODO returns a non-nil, empty Context. Code should use context.TODO when -// it's unclear which Context to use or it is not yet available (because the -// surrounding function has not yet been extended to accept a Context -// parameter). -// -//go:fix inline -func TODO() Context { return context.TODO() } - -// A CancelFunc tells an operation to abandon its work. -// A CancelFunc does not wait for the work to stop. -// A CancelFunc may be called by multiple goroutines simultaneously. -// After the first call, subsequent calls to a CancelFunc do nothing. -type CancelFunc = context.CancelFunc - -// WithCancel returns a derived context that points to the parent context -// but has a new Done channel. The returned context's Done channel is closed -// when the returned cancel function is called or when the parent context's -// Done channel is closed, whichever happens first. -// -// Canceling this context releases resources associated with it, so code should -// call cancel as soon as the operations running in this [Context] complete. -// -//go:fix inline -func WithCancel(parent Context) (ctx Context, cancel CancelFunc) { - return context.WithCancel(parent) -} - -// WithDeadline returns a derived context that points to the parent context -// but has the deadline adjusted to be no later than d. If the parent's -// deadline is already earlier than d, WithDeadline(parent, d) is semantically -// equivalent to parent. The returned [Context.Done] channel is closed when -// the deadline expires, when the returned cancel function is called, -// or when the parent context's Done channel is closed, whichever happens first. -// -// Canceling this context releases resources associated with it, so code should -// call cancel as soon as the operations running in this [Context] complete. -// -//go:fix inline -func WithDeadline(parent Context, d time.Time) (Context, CancelFunc) { - return context.WithDeadline(parent, d) -} - -// WithTimeout returns WithDeadline(parent, time.Now().Add(timeout)). -// -// Canceling this context releases resources associated with it, so code should -// call cancel as soon as the operations running in this [Context] complete: -// -// func slowOperationWithTimeout(ctx context.Context) (Result, error) { -// ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond) -// defer cancel() // releases resources if slowOperation completes before timeout elapses -// return slowOperation(ctx) -// } -// -//go:fix inline -func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc) { - return context.WithTimeout(parent, timeout) -} - -// WithValue returns a derived context that points to the parent Context. -// In the derived context, the value associated with key is val. -// -// Use context Values only for request-scoped data that transits processes and -// APIs, not for passing optional parameters to functions. -// -// The provided key must be comparable and should not be of type -// string or any other built-in type to avoid collisions between -// packages using context. Users of WithValue should define their own -// types for keys. To avoid allocating when assigning to an -// interface{}, context keys often have concrete type -// struct{}. Alternatively, exported context key variables' static -// type should be a pointer or interface. -// -//go:fix inline -func WithValue(parent Context, key, val interface{}) Context { - return context.WithValue(parent, key, val) -} diff --git a/vendor/modules.txt b/vendor/modules.txt index b4d3ee992..0dbad2231 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -205,8 +205,8 @@ github.com/spf13/cobra # github.com/spf13/pflag v1.0.7 ## explicit; go 1.12 github.com/spf13/pflag -# github.com/vmware-tanzu/velero v1.14.0 => github.com/openshift/velero v0.10.2-0.20250514165055-8fbcf3a8da11 -## explicit; go 1.23.0 +# github.com/vmware-tanzu/velero v1.14.0 => github.com/openshift/velero v0.10.2-0.20260501155251-e8ffd8d87b42 +## explicit; go 1.25.8 github.com/vmware-tanzu/velero/pkg/apis/velero/shared github.com/vmware-tanzu/velero/pkg/apis/velero/v1 github.com/vmware-tanzu/velero/pkg/apis/velero/v2alpha1 @@ -256,7 +256,6 @@ go.yaml.in/yaml/v2 go.yaml.in/yaml/v3 # golang.org/x/net v0.52.0 ## explicit; go 1.25.0 -golang.org/x/net/context golang.org/x/net/html golang.org/x/net/html/atom golang.org/x/net/html/charset @@ -935,4 +934,4 @@ sigs.k8s.io/structured-merge-diff/v6/value # sigs.k8s.io/yaml v1.6.0 ## explicit; go 1.22 sigs.k8s.io/yaml -# github.com/vmware-tanzu/velero => github.com/openshift/velero v0.10.2-0.20250514165055-8fbcf3a8da11 +# github.com/vmware-tanzu/velero => github.com/openshift/velero v0.10.2-0.20260501155251-e8ffd8d87b42