Skip to content

Commit

Permalink
Merge pull request #1236 from jakobmoellerdev/v5-bump
Browse files Browse the repository at this point in the history
fix: introduce /v5 module suffix for go.mod
  • Loading branch information
k8s-ci-robot authored Jul 17, 2024
2 parents e45cf27 + 3126c97 commit 75b5227
Show file tree
Hide file tree
Showing 12 changed files with 37 additions and 29 deletions.
3 changes: 2 additions & 1 deletion .prow.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#! /bin/bash

CSI_PROW_SIDECAR_E2E_IMPORT_PATH="github.com/kubernetes-csi/external-provisioner/test/e2e"
CSI_PROW_SIDECAR_E2E_IMPORT_PATH="github.com/kubernetes-csi/external-provisioner/v5/test/e2e"
CSI_PROW_SIDECAR_E2E_PATH="github.com/kubernetes-csi/external-provisioner/test/e2e"

. release-tools/prow.sh

Expand Down
14 changes: 7 additions & 7 deletions cmd/csi-provisioner/csi-provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/runtime/schema"
validation "k8s.io/apimachinery/pkg/util/validation"
"k8s.io/apimachinery/pkg/util/validation"
utilfeature "k8s.io/apiserver/pkg/util/feature"
"k8s.io/client-go/informers"
"k8s.io/client-go/kubernetes"
Expand All @@ -52,17 +52,17 @@ import (
_ "k8s.io/component-base/metrics/prometheus/clientgo/leaderelection" // register leader election in the default legacy registry
_ "k8s.io/component-base/metrics/prometheus/workqueue" // register work queues in the default legacy registry
csitrans "k8s.io/csi-translation-lib"
klog "k8s.io/klog/v2"
"k8s.io/klog/v2"
"sigs.k8s.io/sig-storage-lib-external-provisioner/v10/controller"
libmetrics "sigs.k8s.io/sig-storage-lib-external-provisioner/v10/controller/metrics"

"github.com/kubernetes-csi/csi-lib-utils/leaderelection"
"github.com/kubernetes-csi/csi-lib-utils/metrics"
"github.com/kubernetes-csi/external-provisioner/pkg/capacity"
"github.com/kubernetes-csi/external-provisioner/pkg/capacity/topology"
ctrl "github.com/kubernetes-csi/external-provisioner/pkg/controller"
"github.com/kubernetes-csi/external-provisioner/pkg/features"
"github.com/kubernetes-csi/external-provisioner/pkg/owner"
"github.com/kubernetes-csi/external-provisioner/v5/pkg/capacity"
"github.com/kubernetes-csi/external-provisioner/v5/pkg/capacity/topology"
ctrl "github.com/kubernetes-csi/external-provisioner/v5/pkg/controller"
"github.com/kubernetes-csi/external-provisioner/v5/pkg/features"
"github.com/kubernetes-csi/external-provisioner/v5/pkg/owner"
snapclientset "github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned"
gatewayclientset "sigs.k8s.io/gateway-api/pkg/client/clientset/versioned"
gatewayInformers "sigs.k8s.io/gateway-api/pkg/client/informers/externalversions"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/kubernetes-csi/external-provisioner
module github.com/kubernetes-csi/external-provisioner/v5

go 1.22.3

Expand Down
2 changes: 1 addition & 1 deletion pkg/capacity/capacity.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"time"

"github.com/container-storage-interface/spec/lib/go/csi"
"github.com/kubernetes-csi/external-provisioner/pkg/capacity/topology"
"github.com/kubernetes-csi/external-provisioner/v5/pkg/capacity/topology"
"google.golang.org/grpc"
v1 "k8s.io/api/core/v1"
storagev1 "k8s.io/api/storage/v1"
Expand Down
2 changes: 1 addition & 1 deletion pkg/capacity/capacity_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"time"

"github.com/container-storage-interface/spec/lib/go/csi"
"github.com/kubernetes-csi/external-provisioner/pkg/capacity/topology"
"github.com/kubernetes-csi/external-provisioner/v5/pkg/capacity/topology"
"github.com/stretchr/testify/require"
"google.golang.org/grpc"
"google.golang.org/protobuf/types/known/wrapperspb"
Expand Down
4 changes: 2 additions & 2 deletions pkg/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (

"github.com/container-storage-interface/spec/lib/go/csi"
"github.com/kubernetes-csi/csi-lib-utils/accessmodes"
"github.com/kubernetes-csi/external-provisioner/pkg/features"
"github.com/kubernetes-csi/external-provisioner/v5/pkg/features"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
Expand All @@ -50,7 +50,7 @@ import (
"k8s.io/client-go/tools/cache"
"k8s.io/client-go/tools/record"
"k8s.io/client-go/util/workqueue"
klog "k8s.io/klog/v2"
"k8s.io/klog/v2"
"sigs.k8s.io/sig-storage-lib-external-provisioner/v10/controller"
"sigs.k8s.io/sig-storage-lib-external-provisioner/v10/util"

Expand Down
4 changes: 2 additions & 2 deletions pkg/controller/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ import (
"k8s.io/component-base/featuregate"
utilfeaturetesting "k8s.io/component-base/featuregate/testing"
csitrans "k8s.io/csi-translation-lib"
klog "k8s.io/klog/v2"
"k8s.io/klog/v2"
"sigs.k8s.io/sig-storage-lib-external-provisioner/v10/controller"

"github.com/kubernetes-csi/csi-lib-utils/connection"
"github.com/kubernetes-csi/csi-lib-utils/metrics"
"github.com/kubernetes-csi/csi-lib-utils/rpc"
"github.com/kubernetes-csi/csi-test/v5/driver"
"github.com/kubernetes-csi/external-provisioner/pkg/features"
"github.com/kubernetes-csi/external-provisioner/v5/pkg/features"
crdv1 "github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumesnapshot/v1"
"github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/fake"
gatewayv1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1"
Expand Down
4 changes: 2 additions & 2 deletions pkg/controller/fake_translator_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Automatically generated by MockGen. DO NOT EDIT!
// Source: github.com/kubernetes-csi/external-provisioner/pkg/controller (interfaces: ProvisionerCSITranslator)
// Source: github.com/kubernetes-csi/external-provisioner/v5/pkg/controller (interfaces: ProvisionerCSITranslator)

package controller

import (
gomock "github.com/golang/mock/gomock"
"github.com/golang/mock/gomock"
v1 "k8s.io/api/core/v1"
storagev1 "k8s.io/api/storage/v1"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/topology.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (

"github.com/container-storage-interface/spec/lib/go/csi"
"github.com/kubernetes-csi/csi-lib-utils/rpc"
"github.com/kubernetes-csi/external-provisioner/pkg/features"
"github.com/kubernetes-csi/external-provisioner/v5/pkg/features"
v1 "k8s.io/api/core/v1"
storagev1 "k8s.io/api/storage/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
16 changes: 10 additions & 6 deletions release-tools/generate-patch-release-notes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,17 @@
# CSI_RELEASE_TOKEN: Github token needed for generating release notes
# GITHUB_USER: Github username to create PRs with
#
# Required tools:
# - gh
# - release-notes (https://github.com/kubernetes/release/blob/master/cmd/release-notes/README.md)
#
# Instructions:
# 1. Login with "gh auth login"
# 2. Copy this script to the kubernetes-csi directory (one directory above the
# repos)
# 3. Update the repos and versions in the $releases array
# 4. Set environment variables
# 5. Run script from the kubernetes-csi directory
# 1. Install the required tools
# 2. Login with "gh auth login"
# 3. Copy this script to the kubernetes-csi directory (one directory above the repos)
# 4. Update the repos and versions in the $releases array
# 5. Set environment variables
# 6. Run script from the kubernetes-csi directory
#
# Caveats:
# - This script doesn't handle regenerating and updating existing PRs yet.
Expand Down
11 changes: 7 additions & 4 deletions release-tools/prow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ configvar CSI_PROW_BUILD_PLATFORMS "linux amd64 amd64; linux ppc64le ppc64le -pp
# which is disabled with GOFLAGS=-mod=vendor).
configvar GOFLAGS_VENDOR "$( [ -d vendor ] && echo '-mod=vendor' )" "Go flags for using the vendor directory"

configvar CSI_PROW_GO_VERSION_BUILD "1.22.3" "Go version for building the component" # depends on component's source code
configvar CSI_PROW_GO_VERSION_BUILD "1.22.5" "Go version for building the component" # depends on component's source code
configvar CSI_PROW_GO_VERSION_E2E "" "override Go version for building the Kubernetes E2E test suite" # normally doesn't need to be set, see install_e2e
configvar CSI_PROW_GO_VERSION_SANITY "${CSI_PROW_GO_VERSION_BUILD}" "Go version for building the csi-sanity test suite" # depends on CSI_PROW_SANITY settings below
configvar CSI_PROW_GO_VERSION_KIND "${CSI_PROW_GO_VERSION_BUILD}" "Go version for building 'kind'" # depends on CSI_PROW_KIND_VERSION below
Expand Down Expand Up @@ -231,8 +231,11 @@ configvar CSI_PROW_E2E_VERSION "$(version_to_git "${CSI_PROW_KUBERNETES_VERSION}
configvar CSI_PROW_E2E_REPO "https://github.com/kubernetes/kubernetes" "E2E repo"
configvar CSI_PROW_E2E_IMPORT_PATH "k8s.io/kubernetes" "E2E package"

# Local path for e2e tests. Set to "none" to disable.
configvar CSI_PROW_SIDECAR_E2E_IMPORT_PATH "none" "CSI Sidecar E2E package"
# Local path & package path for e2e tests. Set to "none" to disable.
# When using versioned go modules, the import path is the module path whereas the path
# should not contain the version and be the directory where the module is checked out.
configvar CSI_PROW_SIDECAR_E2E_IMPORT_PATH "none" "CSI Sidecar E2E package (go import path)"
configvar CSI_PROW_SIDECAR_E2E_PATH "${CSI_PROW_SIDECAR_E2E_IMPORT_PATH}" "CSI Sidecar E2E path (directory)"

# csi-sanity testing from the csi-test repo can be run against the installed
# CSI driver. For this to work, deploying the driver must expose the Unix domain
Expand Down Expand Up @@ -1035,7 +1038,7 @@ run_e2e () (
trap move_junit EXIT
if [ "${name}" == "local" ]; then
cd "${GOPATH}/src/${CSI_PROW_SIDECAR_E2E_IMPORT_PATH}" &&
cd "${GOPATH}/src/${CSI_PROW_SIDECAR_E2E_PATH}" &&
run_with_loggers env KUBECONFIG="$KUBECONFIG" KUBE_TEST_REPO_LIST="$(if [ -e "${CSI_PROW_WORK}/e2e-repo-list" ]; then echo "${CSI_PROW_WORK}/e2e-repo-list"; fi)" ginkgo --timeout="${CSI_PROW_GINKGO_TIMEOUT}" -v "$@" "${CSI_PROW_WORK}/e2e-local.test" -- -report-dir "${ARTIFACTS}" -report-prefix local
else
cd "${GOPATH}/src/${CSI_PROW_E2E_IMPORT_PATH}" &&
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"k8s.io/kubernetes/test/e2e/framework/config"

// test sources
_ "github.com/kubernetes-csi/external-provisioner/test/e2e/storage"
_ "github.com/kubernetes-csi/external-provisioner/v5/test/e2e/storage"
)

func TestMain(m *testing.M) {
Expand Down

0 comments on commit 75b5227

Please sign in to comment.