Skip to content

Commit 89760a5

Browse files
committed
Revert "Add min go runtime to be 1.23 and add godebug winsymlink=0"
This reverts commit ab5cffa.
1 parent 154e6db commit 89760a5

File tree

5 files changed

+34
-6
lines changed

5 files changed

+34
-6
lines changed

.github/workflows/codespell.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ jobs:
1212
- uses: codespell-project/actions-codespell@master
1313
with:
1414
check_filenames: true
15-
skip: ./.git,./.github/workflows/codespell.yml,.git,*.png,*.jpg,*.svg,*.sum,./vendor,go.sum,./release-tools/prow.sh
15+
skip: ./.git,./.github/workflows/codespell.yml,.git,*.png,*.jpg,*.svg,*.sum,./vendor,go.sum,./release-tools/prow.sh,./docs

.github/workflows/windows.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ jobs:
44
integration_tests:
55
strategy:
66
matrix:
7-
go: ['1.23']
7+
go: ['1.22']
88
platform: [windows-latest]
99
runs-on: ${{ matrix.platform }}
1010
steps:
@@ -51,7 +51,7 @@ jobs:
5151
unit_tests:
5252
strategy:
5353
matrix:
54-
go: ['1.23']
54+
go: ['1.22']
5555
platform: [windows-latest]
5656
runs-on: ${{ matrix.platform }}
5757
steps:
@@ -69,7 +69,7 @@ jobs:
6969
bump_version_test:
7070
strategy:
7171
matrix:
72-
go: ['1.23']
72+
go: ['1.22']
7373
platform: [ubuntu-latest]
7474
runs-on: ${{ matrix.platform }}
7575
steps:

Makefile

+22
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,28 @@ BUILD_TOOLS_DIR = $(BUILD_DIR)/tools
1212
GO_ENV_VARS = GO111MODULE=on GOOS=windows
1313
CSI_PROXY_API_GEN = $(BUILD_DIR)/csi-proxy-api-gen
1414

15+
# overrides the $(CMDS:%=build-%) rule in release-tools/build.make because this project is not compatible with go >1.23
16+
# TODO: remove this override as part of https://github.com/kubernetes-csi/csi-proxy/issues/361
17+
build-csi-proxy: check-go-version-go
18+
# Checks that the go version is 1.22 or lower
19+
if (( "$$(go version | awk '{print $3}' | sed 's/go//' | cut -d'.' -f2)" > 22 )); then echo "This project requires go 1.22 or lower"; exit 1; fi;
20+
mkdir -p bin
21+
# os_arch_seen captures all of the $$os-$$arch-$$buildx_platform seen for the current binary
22+
# that we want to build, if we've seen an $$os-$$arch-$$buildx_platform before it means that
23+
# we don't need to build it again, this is done to avoid building
24+
# the windows binary multiple times (see the default value of $$BUILD_PLATFORMS)
25+
export os_arch_seen="" && echo '$(BUILD_PLATFORMS)' | tr ';' '\n' | while read -r os arch buildx_platform suffix base_image addon_image; do \
26+
os_arch_seen_pre=$${os_arch_seen%%$$os-$$arch-$$buildx_platform*}; \
27+
if ! [ $${#os_arch_seen_pre} = $${#os_arch_seen} ]; then \
28+
continue; \
29+
fi; \
30+
if ! (set -x; cd ./$(CMDS_DIR)/$* && CGO_ENABLED=0 GOOS="$$os" GOARCH="$$arch" go build $(GOFLAGS_VENDOR) -a -ldflags '$(FULL_LDFLAGS)' -o "$(abspath ./bin)/$*$$suffix" .); then \
31+
echo "Building $* for GOOS=$$os GOARCH=$$arch failed, see error(s) above."; \
32+
exit 1; \
33+
fi; \
34+
os_arch_seen+=";$$os-$$arch-$$buildx_platform"; \
35+
done
36+
1537
.PHONY: compile-csi-proxy-api-gen
1638
compile-csi-proxy-api-gen:
1739
GO111MODULE=on go build -o $(CSI_PROXY_API_GEN) ./cmd/csi-proxy-api-gen

go.mod

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
module github.com/kubernetes-csi/csi-proxy
22

3-
go 1.23
3+
// NOTE: This project must be built with go < 1.23
4+
// `make build` will error if go1.23 or higher is used.
45

5-
godebug winsymlink=0
6+
go 1.22.0
7+
8+
toolchain go1.22.3
69

710
require (
811
github.com/Microsoft/go-winio v0.6.2

scripts/run-integration.sh

+3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ pkgdir=${GOPATH}/src/github.com/kubernetes-csi/csi-proxy
1818
source $pkgdir/scripts/utils.sh
1919

2020
main() {
21+
# TODO: remove go version pin as part of https://github.com/kubernetes-csi/csi-proxy/issues/361
22+
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.22.12.linux-amd64.tar.gz
23+
2124
compile_csi_proxy
2225
compile_csi_proxy_integration_tests
2326
sync_csi_proxy

0 commit comments

Comments
 (0)