Skip to content

Commit

Permalink
chore: version bump cut 1
Browse files Browse the repository at this point in the history
Signed-off-by: Abhinandan Purkait <purkaitabhinandan@gmail.com>
  • Loading branch information
Abhinandan-Purkait committed Nov 7, 2023
1 parent bd98908 commit 3e1d184
Show file tree
Hide file tree
Showing 3,993 changed files with 770 additions and 1,299,621 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 0 additions & 1 deletion .bettercodehub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ languages:
- go
exclude:
- /pkg/client/generated/.*
- /vendor/.*
27 changes: 26 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
reporter: github-pr-review
path: '.'
pattern: '*.sh'
exclude: './.git/*,./vendor/*'
exclude: './.git/*'

apiserver:
runs-on: ubuntu-latest
Expand All @@ -53,6 +53,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Go 1.19
uses: actions/setup-go@v3
with:
go-version: 1.19.13

- name: Set Image Org
# sets the default IMAGE_ORG to openebs
run: |
Expand Down Expand Up @@ -146,6 +151,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Go 1.19
uses: actions/setup-go@v3
with:
go-version: 1.19.13

- name: Set Image Org
# sets the default IMAGE_ORG to openebs
run: |
Expand Down Expand Up @@ -240,6 +250,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Go 1.19
uses: actions/setup-go@v3
with:
go-version: 1.19.13

- name: Set Image Org
# sets the default IMAGE_ORG to openebs
run: |
Expand Down Expand Up @@ -333,6 +348,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Go 1.19
uses: actions/setup-go@v3
with:
go-version: 1.19.13

- name: Set Image Org
# sets the default IMAGE_ORG to openebs
run: |
Expand Down Expand Up @@ -426,6 +446,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Go 1.19
uses: actions/setup-go@v3
with:
go-version: 1.19.13

- name: Set Image Org
# sets the default IMAGE_ORG to openebs
run: |
Expand Down
26 changes: 25 additions & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ jobs:
reporter: github-pr-review
path: '.'
pattern: '*.sh'
exclude: './vendor/*'

apiserver:
runs-on: ubuntu-latest
Expand All @@ -52,6 +51,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Go 1.19
uses: actions/setup-go@v3
with:
go-version: 1.19.13

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
Expand Down Expand Up @@ -80,6 +84,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Go 1.19
uses: actions/setup-go@v3
with:
go-version: 1.19.13

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
Expand Down Expand Up @@ -110,6 +119,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Go 1.19
uses: actions/setup-go@v3
with:
go-version: 1.19.13

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
Expand Down Expand Up @@ -138,6 +152,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Go 1.19
uses: actions/setup-go@v3
with:
go-version: 1.19.13

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
Expand Down Expand Up @@ -166,6 +185,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Go 1.19
uses: actions/setup-go@v3
with:
go-version: 1.19.13

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ cache:
directories:
- $HOME/.cache/go-build
go:
- 1.14.7
- 1.19.13

addons:
apt:
Expand Down
35 changes: 14 additions & 21 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
include buildscripts/common.mk

# list only the source code directories
PACKAGES = $(shell go list ./... | grep -v 'vendor\|pkg/client/generated\|tests')
PACKAGES = $(shell go list ./... | grep -v 'pkg/client/generated\|tests')

# list only the integration tests code directories
PACKAGES_IT = $(shell go list ./... | grep -v 'vendor\|pkg/client/generated' | grep 'tests')
PACKAGES_IT = $(shell go list ./... | grep -v 'pkg/client/generated' | grep 'tests')

GO111MODULE ?= on
export GO111MODULE
Expand Down Expand Up @@ -61,10 +61,7 @@ EXTERNAL_TOOLS=\
golang.org/x/tools/cmd/cover \
github.com/axw/gocov/gocov \
gopkg.in/matm/v1/gocov-html \
github.com/golang/protobuf/protoc-gen-go@v1.3.2

# list only our .go files i.e. exlcudes any .go files from the vendor directory
GOFILES_NOVENDOR = $(shell find . -type f -name '*.go' -not -path "./vendor/*")
google.golang.org/protobuf/protoc-gen-go@v1.3.2

ifeq (${IMAGE_TAG}, )
IMAGE_TAG = ci
Expand Down Expand Up @@ -172,10 +169,6 @@ verify-deps: deps
echo "go module files are out of date, please commit the changes to go.mod and go.sum"; exit 1; \
fi

.PHONY: vendor
vendor: go.mod go.sum deps
@go mod vendor

.PHONY: clean
clean: cleanup-upgrade
go clean -testcache
Expand Down Expand Up @@ -212,7 +205,7 @@ testv: format

.PHONY: cover
cover:
go list ./... | grep -v vendor | xargs -n1 go test --cover
go list ./... | xargs -n1 go test --cover

.PHONY: format
format:
Expand All @@ -237,13 +230,13 @@ vet:
go get golang.org/x/tools/cmd/vet; \
fi
@echo "--> Running go tool vet ..."
@go tool vet $(VETARGS) ${GOFILES_NOVENDOR} ; if [ $$? -eq 1 ]; then \
@go tool vet $(VETARGS); if [ $$? -eq 1 ]; then \
echo ""; \
echo "[LINT] Vet found suspicious constructs. Please check the reported constructs"; \
echo "and fix them if necessary before submitting the code for review."; \
fi

@git grep -n `echo "log"".Print"` | grep -v 'vendor/' ; if [ $$? -eq 0 ]; then \
@git grep -n `echo "log"".Print"`; if [ $$? -eq 0 ]; then \
echo "[LINT] Found "log"".Printf" calls. These should use Maya's logger instead."; \
fi

Expand Down Expand Up @@ -280,10 +273,10 @@ kubegendelete:
.PHONY: generated_files
generated_files: kubegen protobuf

# builds vendored version of deepcopy-gen tool
# builds deepcopy-gen tool
.PHONY: deepcopy2
deepcopy2:
@go install -mod=vendor ./vendor/k8s.io/code-generator/cmd/deepcopy-gen
@go install -mod=mod k8s.io/code-generator/cmd/deepcopy-gen
@for apigrp in $(ALL_API_GROUPS) ; do \
echo "+ Generating deepcopy funcs for $$apigrp" ; \
deepcopy-gen \
Expand All @@ -292,10 +285,10 @@ deepcopy2:
--go-header-file ./buildscripts/custom-boilerplate.go.txt; \
done

# builds vendored version of client-gen tool
# builds client-gen tool
.PHONY: clientset2
clientset2:
@go install -mod=vendor ./vendor/k8s.io/code-generator/cmd/client-gen
@go install -mod=mod k8s.io/code-generator/cmd/client-gen
@for apigrp in $(ALL_API_GROUPS) ; do \
echo "+ Generating clientsets for $$apigrp" ; \
client-gen \
Expand All @@ -306,10 +299,10 @@ clientset2:
--go-header-file ./buildscripts/custom-boilerplate.go.txt; \
done

# builds vendored version of lister-gen tool
# builds lister-gen tool
.PHONY: lister2
lister2:
@go install -mod=vendor ./vendor/k8s.io/code-generator/cmd/lister-gen
@go install -mod=mod k8s.io/code-generator/cmd/lister-gen
@for apigrp in $(ALL_API_GROUPS) ; do \
echo "+ Generating lister for $$apigrp" ; \
lister-gen \
Expand All @@ -318,10 +311,10 @@ lister2:
--go-header-file ./buildscripts/custom-boilerplate.go.txt; \
done

# builds vendored version of informer-gen tool
# builds informer-gen tool
.PHONY: informer2
informer2:
@go install -mod=vendor ./vendor/k8s.io/code-generator/cmd/informer-gen
@go install -mod=mod k8s.io/code-generator/cmd/informer-gen
@for apigrp in $(ALL_API_GROUPS) ; do \
echo "+ Generating informer for $$apigrp" ; \
informer-gen \
Expand Down
2 changes: 1 addition & 1 deletion buildscripts/admission-server/admission-server.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM golang:1.14.7 as build
FROM golang:1.19.13 as build

ARG RELEASE_TAG
ARG BRANCH
Expand Down
2 changes: 1 addition & 1 deletion buildscripts/apiserver/apiserver.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM golang:1.14.7 as build
FROM golang:1.19.13 as build

ARG RELEASE_TAG
ARG BRANCH
Expand Down
8 changes: 6 additions & 2 deletions buildscripts/code-gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,12 @@ shift 4
# To support running this script from anywhere, we have to first cd into this directory
# so we can install the tools.
#cd $(dirname "${0}")
cd vendor/k8s.io/code-generator/
go install ./cmd/{defaulter-gen,client-gen,lister-gen,informer-gen,deepcopy-gen}

go install k8s.io/code-generator/cmd/defaulter-gen
go install k8s.io/code-generator/cmd/client-gen
go install k8s.io/code-generator/cmd/lister-gen
go install k8s.io/code-generator/cmd/informer-gen
go install k8s.io/code-generator/cmd/deepcopy-gen
)

function codegen::join() { local IFS="$1"; shift; echo "$*"; }
Expand Down
2 changes: 1 addition & 1 deletion buildscripts/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
.PHONY: check_license-go
check-license-go:
@echo ">> checking license header"
@licRes=$$(for file in $$(find . -type f -iname '*.go' ! -path './vendor/*' ! -path './pkg/debug/*' ) ; do \
@licRes=$$(for file in $$(find . -type f -iname '*.go' ! -path './pkg/debug/*' ) ; do \
awk 'NR<=3' $$file | grep -Eq "(Copyright|generated|GENERATED)" || echo $$file; \
done); \
if [ -n "$${licRes}" ]; then \
Expand Down
2 changes: 1 addition & 1 deletion buildscripts/cstor-pool-mgmt/cstor-pool-mgmt.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
ARG BASE_IMAGE
FROM golang:1.14.7 as build
FROM golang:1.19.13 as build

ARG RELEASE_TAG
ARG BRANCH
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
ARG BASE_IMAGE
FROM golang:1.14.7 as build
FROM golang:1.19.13 as build

ARG RELEASE_TAG
ARG BRANCH
Expand Down
2 changes: 1 addition & 1 deletion buildscripts/test-cov.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e
echo "" > coverage.txt

for d in $(go list ./... | grep -v 'vendor\|pkg/apis\|pkg/client/generated\|tests'); do
for d in $(go list ./... | grep -v 'pkg/apis\|pkg/client/generated\|tests'); do
#TODO - Include -race while creating the coverage profile.
go test -coverprofile=profile.out -covermode=atomic $d
if [ -f profile.out ]; then
Expand Down
2 changes: 1 addition & 1 deletion buildscripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ go build -o $TEMPDIR/maya || exit 1
echo "--> Running tests"
GOBIN="`which go`"
PATH=$TEMPDIR:$PATH \
$GOBIN test ${GOTEST_FLAGS:--cover -timeout=900s} $($GOBIN list ./... | grep -v 'vendor\|pkg/apis\|pkg/client/generated\|tests')
$GOBIN test ${GOTEST_FLAGS:--cover -timeout=900s} $($GOBIN list ./... | grep -v 'pkg/apis\|pkg/client/generated\|tests')

2 changes: 1 addition & 1 deletion buildscripts/upgrade/upgrade.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM golang:1.14.7 as build
FROM golang:1.19.13 as build

ARG RELEASE_TAG
ARG BRANCH
Expand Down
2 changes: 1 addition & 1 deletion cmd/admission-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"
"k8s.io/klog"
"k8s.io/klog/v2"

clientset "github.com/openebs/maya/pkg/client/generated/clientset/versioned"
ndmclientset "github.com/openebs/maya/pkg/client/generated/openebs.io/ndm/v1alpha1/clientset/internalclientset"
Expand Down
2 changes: 1 addition & 1 deletion cmd/cstor-pool-mgmt/app/command/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

"github.com/openebs/maya/pkg/util"
"github.com/spf13/cobra"
"k8s.io/klog"
"k8s.io/klog/v2"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion cmd/cstor-pool-mgmt/app/command/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package command
import (
goflag "flag"

"k8s.io/klog"
"k8s.io/klog/v2"

"github.com/openebs/maya/cmd/cstor-pool-mgmt/controller/start-controller"
"github.com/spf13/cobra"
Expand Down
7 changes: 4 additions & 3 deletions cmd/cstor-pool-mgmt/controller/backup-controller/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/runtime"
"k8s.io/client-go/tools/cache"
"k8s.io/klog"
"k8s.io/klog/v2"
)

// syncHandler compares the actual state with the desired, and attempts to
Expand Down Expand Up @@ -225,8 +225,9 @@ func IsOnlyStatusChange(oldbkp, newbkp *apis.CStorBackup) bool {
// CStorCompletedBackups stores the information of last two completed backups
// For example, if schedule `b` has last two backups b-0 and b-1 (b-0 created first and after that b-1 was created) having snapshots
// b-0 and b-1 respectively then CStorCompletedBackups for the schedule `b` will have following information :
// CStorCompletedBackups.Spec.PrevSnapName = b-1
// CStorCompletedBackups.Spec.SnapName = b-0
//
// CStorCompletedBackups.Spec.PrevSnapName = b-1
// CStorCompletedBackups.Spec.SnapName = b-0
func (c *BackupController) updateCStorCompletedBackup(bkp *apis.CStorBackup) error {
lastbkpname := bkp.Spec.BackupName + "-" + bkp.Spec.VolumeName
bkplast, err := c.clientset.OpenebsV1alpha1().CStorCompletedBackups(bkp.Namespace).
Expand Down
Loading

0 comments on commit 3e1d184

Please sign in to comment.