Skip to content

Commit 8d4d789

Browse files
authored
Merge pull request #254 from kubernetes/fix-deprecated-actions
Fix CI by updating deprecated GitHub Actions and removing RBE
2 parents 260583c + 40e3e0d commit 8d4d789

7 files changed

Lines changed: 33 additions & 31 deletions

File tree

.github/workflows/build-test.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,8 @@ jobs:
2525
fail-fast: false
2626
matrix:
2727
os:
28-
- macos-latest
2928
- ubuntu-latest
3029
include:
31-
- os: macos-latest
32-
platform: "darwin-amd64"
33-
cache-paths: |
34-
/var/tmp/_bazel_runner/cache/repos/v1
35-
~/Library/Caches/bazelisk
3630
- os: ubuntu-latest
3731
platform: "linux-amd64"
3832
cache-paths: |
@@ -41,9 +35,9 @@ jobs:
4135
4236
steps:
4337
- name: "checkout-repo"
44-
uses: actions/checkout@v2
38+
uses: actions/checkout@v4
4539
- name: "setup-cache"
46-
uses: actions/cache@v2
40+
uses: actions/cache@v4
4741
with:
4842
path: ${{ matrix.cache-paths }}
4943
key: ${{ runner.os }}-${{ hashFiles('.bazelversion') }}

.golangci.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
run:
2-
deadline: 180s
2+
timeout: 180s
33
tests: true
4-
skip-dirs:
5-
- .git
6-
- .tool
7-
- vendor
8-
- verify
94

105
linters-settings:
116
dupl:
@@ -16,13 +11,18 @@ linters-settings:
1611
linters:
1712
enable:
1813
- govet
19-
- deadcode
20-
- golint
14+
- unused
15+
- revive
2116
- gocyclo
2217
disable-all: true
2318

2419
issues:
20+
exclude-dirs:
21+
- .git
22+
- .tool
23+
- vendor
24+
- verify
2525
exclude-rules:
2626
- linters:
27-
- golint
27+
- revive
2828
text: ".*should not use dot dot imports"

cmd/kazel/generator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func (v *Vendorer) findGeneratorTags(root string, requestedTags map[string]bool)
5959
tagsValuesPkgs = make(generatorTagsMap)
6060
tagsPkgsValues = make(generatorTagsMap)
6161

62-
err = filepath.Walk(root, func(path string, info os.FileInfo, err error) error {
62+
err = filepath.Walk(root, func(path string, _ os.FileInfo, err error) error {
6363
if err != nil {
6464
return err
6565
}

defs/private/gcilint_repository.bzl

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,33 @@ hundreds of dependencies, so using the binary release avoids dependency
1818
management toil.
1919
"""
2020

21-
_VERSION = "1.34.1"
21+
_VERSION = "1.64.8"
2222

2323
_PLATFORMS = [
2424
struct(
2525
os = "darwin",
2626
arch = "amd64",
27-
sha256 = "6c3d87f9f6bccd5954de9954c1e75d7b521abdcc956e0643929a75cbf4c00aad",
27+
sha256 = "b52aebb8cb51e00bfd5976099083fbe2c43ef556cef9c87e58a8ae656e740444",
28+
),
29+
struct(
30+
os = "darwin",
31+
arch = "arm64",
32+
sha256 = "70543d21e5b02a94079be8aa11267a5b060865583e337fe768d39b5d3e2faf1f",
2833
),
2934
struct(
3035
os = "linux",
3136
arch = "amd64",
32-
sha256 = "23e4a9d8f89729007c6d749c245f725c2dbcfb194f4099003f9b826f1d386ad1",
37+
sha256 = "b6270687afb143d019f387c791cd2a6f1cb383be9b3124d241ca11bd3ce2e54e",
3338
),
3439
struct(
3540
os = "linux",
3641
arch = "arm64",
37-
sha256 = "3bdfb7e619c665878d90cb73d45b35e8af6d753421cb8be07c40b63f3215bb02",
42+
sha256 = "a6ab58ebcb1c48572622146cdaec2956f56871038a54ed1149f1386e287789a5",
3843
),
3944
struct(
4045
os = "windows",
4146
arch = "amd64",
42-
sha256 = "04473b63ee17374e7a55fd7ebe7fe97bc510ae9883e9214798dae8e67de4ba48",
47+
sha256 = "54c2ed3a6b4f2f5da1056fb6e83d6b73b592e06684b65a5999174fabbb251a8f",
4348
),
4449
]
4550

@@ -87,6 +92,7 @@ def gci_lint_alias():
8792
name = "golangci-lint",
8893
actual = select({
8994
"@io_bazel_rules_go//go/platform:darwin_amd64": "darwin_amd64/golangci-lint",
95+
"@io_bazel_rules_go//go/platform:darwin_arm64": "darwin_arm64/golangci-lint",
9096
"@io_bazel_rules_go//go/platform:linux_arm64": "linux_arm64/golangci-lint",
9197
"@io_bazel_rules_go//go/platform:linux_amd64": "linux_amd64/golangci-lint",
9298
"@io_bazel_rules_go//go/platform:windows_amd64": "windows_amd64/golangci-lint",

hack/verify-golangci-lint.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ export GOPROXY=https://proxy.golang.org
4343
export GOSUMDB=sum.golang.org
4444
export HOME=$TEST_TMPDIR/home
4545
export GOPATH=$HOME/go
46-
PATH=$(dirname "$1"):$PATH
46+
go_bin_dir=$(cd "$(dirname "$1")" && pwd)
47+
export GOROOT=$(cd "${go_bin_dir}/.." && pwd)
48+
PATH=${go_bin_dir}:$PATH
4749
export PATH
4850
shift 2
51+
export CGO_ENABLED=0
52+
go mod download
4953
"$golangci_lint" run "$@"

presubmit.sh

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,10 @@ set -o pipefail
1919

2020
cd "$(git rev-parse --show-toplevel)"
2121

22-
if [[ -n "${GOOGLE_APPLICATION_CREDENTIALS:-}" ]]; then
23-
echo "Service account detected. Adding --config=ci to bazel commands" >&2
24-
mkdir -p "$HOME"
25-
touch "$HOME/.bazelrc"
26-
echo "build --config=ci" >> "$HOME/.bazelrc"
27-
fi
22+
# NOTE: Remote Build Execution (RBE) is no longer available.
23+
# The --config=ci flag previously enabled RBE but the backend
24+
# (projects/k8s-prow-builds/instances/default_instance) has been
25+
# decommissioned. Bazel now runs locally.
2826
(
2927
set -o xtrace
3028
bazel test //... # This also builds everything

tools/build_tar/buildtar.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ func (f *tarFile) addTar(toAdd string) error {
368368
return nil
369369
}
370370

371-
func (f *tarFile) addDeb(toAdd string) error {
371+
func (f *tarFile) addDeb(_ string) error {
372372
return fmt.Errorf("addDeb unimplemented")
373373
}
374374

0 commit comments

Comments
 (0)