Skip to content

Commit 533c684

Browse files
authored
Merge pull request #1061 from vincepri/prepare059
Prepare for v0.5.9
2 parents fef0490 + 7e15b24 commit 533c684

File tree

16 files changed

+299
-13
lines changed

16 files changed

+299
-13
lines changed

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export GO111MODULE=on
3838
TOOLS_DIR := hack/tools
3939
TOOLS_BIN_DIR := $(TOOLS_DIR)/bin
4040
GOLANGCI_LINT := $(abspath $(TOOLS_BIN_DIR)/golangci-lint)
41+
GO_APIDIFF := $(TOOLS_BIN_DIR)/go-apidiff
4142

4243
# The help will print out all targets with their descriptions organized bellow their categories. The categories are represented by `##@` and the target descriptions by `##`.
4344
# The awk commands is responsible to read the entire set of makefiles included in this invocation, looking for lines of the file as xyz: ## something, and then pretty-format the target and help. Then, if there's a line with ##@ something, that gets pretty-printed as a category.
@@ -60,7 +61,10 @@ test: ## Run the script check-everything.sh which will check all.
6061
## --------------------------------------
6162

6263
$(GOLANGCI_LINT): $(TOOLS_DIR)/go.mod # Build golangci-lint from tools folder.
63-
cd $(TOOLS_DIR); go build -tags=tools -o bin/golangci-lint github.com/golangci/golangci-lint/cmd/golangci-lint
64+
cd $(TOOLS_DIR) && go build -tags=tools -o bin/golangci-lint github.com/golangci/golangci-lint/cmd/golangci-lint
65+
66+
$(GO_APIDIFF): $(TOOLS_DIR)/go.mod # Build go-apidiff from tools folder.
67+
cd $(TOOLS_DIR) && go build -tags=tools -o bin/go-apidiff github.com/joelanford/go-apidiff
6468

6569
## --------------------------------------
6670
## Linting

OWNERS_ALIASES

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ aliases:
3131
testing-integration-approvers:
3232
- apelisse
3333
- hoegaarden
34-
- totherme
3534

3635
# folks who may have context on ancient history,
3736
# but are no longer directly involved

hack/apidiff.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright 2018 The Kubernetes Authors.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
set -o errexit
18+
set -o nounset
19+
set -o pipefail
20+
21+
source $(dirname ${BASH_SOURCE})/common.sh
22+
23+
REPO_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
24+
cd "${REPO_ROOT}"
25+
26+
APIDIFF="hack/tools/bin/go-apidiff"
27+
28+
header_text "fetching and building go-apidiff"
29+
make "${APIDIFF}"
30+
31+
git status
32+
33+
header_text "verifying api diff"
34+
header_text "invoking: '${APIDIFF} ${PULL_BASE_SHA} --print-compatible'"
35+
"${APIDIFF}" "${PULL_BASE_SHA}" --print-compatible

hack/test-all.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,16 @@ setup_envs
2222

2323
header_text "running go test"
2424

25-
# TODO(directxman12): enable the race detector once the LeaderElector race condition is resolved in client-go
26-
go test ${MOD_OPT} ./... -parallel 4
25+
go test ${MOD_OPT} ./...
2726

2827
header_text "running coverage"
2928

3029
# Verify no coverage regressions have been introduced. Remove the exception list from here
3130
# once the coverage has been brought back up
32-
if [[ ! $(go test ${MOD_OPT} ./pkg/... -coverprofile cover.out -parallel 4 | grep -v "coverage: 100.0% of statements" | grep "controller-runtime/pkg " | grep -v "controller-runtime/pkg \|controller-runtime/pkg/recorder \|pkg/cache\|pkg/client \|pkg/event \|pkg/client/config \|pkg/controller/controllertest \|pkg/reconcile/reconciletest \|pkg/test ") ]]; then
31+
if [[ ! $(go test ${MOD_OPT} ./pkg/... -coverprofile cover.out | grep -v "coverage: 100.0% of statements" | grep "controller-runtime/pkg " | grep -v "controller-runtime/pkg \|controller-runtime/pkg/recorder \|pkg/cache\|pkg/client \|pkg/event \|pkg/client/config \|pkg/controller/controllertest \|pkg/reconcile/reconciletest \|pkg/test ") ]]; then
3332
echo "ok"
3433
else
35-
go test ${MOD_OPT} ./pkg/... -coverprofile cover.out -parallel 4 | grep -v "coverage: 100.0% of statements" | grep "controller-runtime/pkg " | grep -v "controller-runtime/pkg \|controller-runtime/pkg/recorder \|pkg/cache\|pkg/client \|pkg/event \|pkg/client/config \|pkg/controller/controllertest \|pkg/reconcile/reconciletest \|pkg/test "
34+
go test ${MOD_OPT} ./pkg/... -coverprofile cover.out | grep -v "coverage: 100.0% of statements" | grep "controller-runtime/pkg " | grep -v "controller-runtime/pkg \|controller-runtime/pkg/recorder \|pkg/cache\|pkg/client \|pkg/event \|pkg/client/config \|pkg/controller/controllertest \|pkg/reconcile/reconciletest \|pkg/test "
3635
echo "missing test coverage"
3736
exit 1
3837
fi

hack/tools/go.mod

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@ module sigs.k8s.io/controller-runtime/hack/tools
22

33
go 1.13
44

5-
require github.com/golangci/golangci-lint v1.23.6
5+
require (
6+
github.com/golangci/golangci-lint v1.23.6
7+
github.com/joelanford/go-apidiff v0.0.0-20191206194835-106bcff5f060
8+
)

0 commit comments

Comments
 (0)