From bbce84d2045978be02496570dc19e6158e4f67f7 Mon Sep 17 00:00:00 2001 From: Derek Parker Date: Fri, 1 Sep 2023 11:50:53 -0700 Subject: [PATCH 1/2] Restore go module toolchain version We set the Go module toolchain version to an earlier version to allow running `go mod tidy` from older versions. However, this has the side effect of making the Go toolchain emulate older Go versions. This breaks some standard library tests which expect current toolchain behavior. To fix this, restore Go module toolchain version after tidy. --- .github/workflows/test-ubi-centos.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test-ubi-centos.yml b/.github/workflows/test-ubi-centos.yml index 0898b2e..804e9ba 100644 --- a/.github/workflows/test-ubi-centos.yml +++ b/.github/workflows/test-ubi-centos.yml @@ -120,6 +120,8 @@ jobs: # lower the go build version to 1.16 sed -i "s/go mod tidy/go mod tidy -go=1.16/g" scripts/create-secondary-patch.sh ./scripts/full-initialize-repo.sh + # raise the go module version back to what is expected to prevent the toolchain from emulating older versions. + go mod edit -go="$(./go/bin/go version | awk '{ print $3 }' | sed 's/go//' | awk -F. '{printf "%s.%s\n", $1, $2}')" ./go/src/go.mod - name: "Configure FIPS tests" shell: bash From 22de5ec82555b9a3ff9c6f3f2f5a94d395dc0d46 Mon Sep 17 00:00:00 2001 From: Derek Parker Date: Tue, 5 Sep 2023 10:17:29 -0700 Subject: [PATCH 2/2] Do not lower Go mod version --- .github/workflows/test-ubi-centos.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/test-ubi-centos.yml b/.github/workflows/test-ubi-centos.yml index 804e9ba..67072c0 100644 --- a/.github/workflows/test-ubi-centos.yml +++ b/.github/workflows/test-ubi-centos.yml @@ -117,11 +117,7 @@ jobs: # script requires a git repo git init git config --global --add safe.directory /__w/go/go - # lower the go build version to 1.16 - sed -i "s/go mod tidy/go mod tidy -go=1.16/g" scripts/create-secondary-patch.sh ./scripts/full-initialize-repo.sh - # raise the go module version back to what is expected to prevent the toolchain from emulating older versions. - go mod edit -go="$(./go/bin/go version | awk '{ print $3 }' | sed 's/go//' | awk -F. '{printf "%s.%s\n", $1, $2}')" ./go/src/go.mod - name: "Configure FIPS tests" shell: bash