From 7af7b414d1a83140fe5eb4f86b5c80fefa497829 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edu=20G=C3=B3mez=20Escandell?= Date: Wed, 25 Oct 2023 12:31:36 +0200 Subject: [PATCH 1/4] Downgrade WSL-Pro-Service and dependencies to 1.21.1 --- agentapi/go.mod | 2 +- common/go.mod | 2 +- go.work | 2 +- wsl-pro-service/go.mod | 2 +- wslserviceapi/go.mod | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/agentapi/go.mod b/agentapi/go.mod index 62bc46b9e..4de625399 100644 --- a/agentapi/go.mod +++ b/agentapi/go.mod @@ -1,6 +1,6 @@ module github.com/canonical/ubuntu-pro-for-windows/agentapi -go 1.21.3 +go 1.21.1 require ( google.golang.org/grpc v1.59.0 diff --git a/common/go.mod b/common/go.mod index c84c20f0e..eba0a7841 100644 --- a/common/go.mod +++ b/common/go.mod @@ -1,6 +1,6 @@ module github.com/canonical/ubuntu-pro-for-windows/common -go 1.21.3 +go 1.21.1 require ( github.com/google/uuid v1.3.1 diff --git a/go.work b/go.work index e2db12a0a..cc2437030 100644 --- a/go.work +++ b/go.work @@ -1,4 +1,4 @@ -go 1.21.3 +go 1.21.1 use ( ./agentapi diff --git a/wsl-pro-service/go.mod b/wsl-pro-service/go.mod index c252024b3..5018ed9d8 100644 --- a/wsl-pro-service/go.mod +++ b/wsl-pro-service/go.mod @@ -1,6 +1,6 @@ module github.com/canonical/ubuntu-pro-for-windows/wsl-pro-service -go 1.21.3 +go 1.21.1 require ( github.com/canonical/ubuntu-pro-for-windows/agentapi v0.0.0-20231023183501-458a10db4c16 diff --git a/wslserviceapi/go.mod b/wslserviceapi/go.mod index 22b061859..cb7cbae07 100644 --- a/wslserviceapi/go.mod +++ b/wslserviceapi/go.mod @@ -1,6 +1,6 @@ module github.com/canonical/ubuntu-pro-for-windows/wslserviceapi -go 1.21.3 +go 1.21.1 require ( google.golang.org/grpc v1.59.0 From dd2b87ebd54ac6dd18f9b006e86c437a810906de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edu=20G=C3=B3mez=20Escandell?= Date: Wed, 25 Oct 2023 12:32:32 +0200 Subject: [PATCH 2/4] Remove go.mod manipulation in debian build --- .github/workflows/qa-azure.yaml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/qa-azure.yaml b/.github/workflows/qa-azure.yaml index 696babec8..6b670a814 100644 --- a/.github/workflows/qa-azure.yaml +++ b/.github/workflows/qa-azure.yaml @@ -20,16 +20,9 @@ jobs: steps: - name: Check out repository uses: actions/checkout@v4 - # The following two steps are a workaround because vulnerability checker requires Go 1.21.3 which is not yet available on the archive. - # That requirement only affects test code using mocks, so we don't yet depend on such contracts. - # We should be safe with Go 1.21.1 for a while, until dependencies start to rely on the latest version. - uses: actions/setup-go@v4 with: go-version-file: go.work - - name: Constrain go version - shell: bash - working-directory: wsl-pro-service - run: go mod edit -go 1.21.1 - name: Build debian package uses: canonical/desktop-engineering/gh-actions/common/build-debian@main with: From 5b9d0e7eff848477bfa51647cbee727cc80ca48f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edu=20G=C3=B3mez=20Escandell?= Date: Wed, 25 Oct 2023 09:40:57 +0200 Subject: [PATCH 3/4] Specify go toolchain version in rules --- wsl-pro-service/debian/rules | 1 + 1 file changed, 1 insertion(+) diff --git a/wsl-pro-service/debian/rules b/wsl-pro-service/debian/rules index 638747a1b..4bf30e394 100755 --- a/wsl-pro-service/debian/rules +++ b/wsl-pro-service/debian/rules @@ -2,6 +2,7 @@ export DH_VERBOSE=1 export GOCACHE=$(shell mktemp -d /tmp/gocache-XXXX) +export GOTOOLCHAIN=go1.21.1 # We want to copy special files from our monorepo like "common/version". export DH_GOLANG_INSTALL_ALL=1 From 40ce443cf30e9b81433f47ed76e69938a324e5a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edu=20G=C3=B3mez=20Escandell?= Date: Wed, 25 Oct 2023 13:11:51 +0200 Subject: [PATCH 4/4] WSL-Pro-Service: Pin dependencies to commit 5b9d0e7eff84 --- wsl-pro-service/go.mod | 6 +++--- wsl-pro-service/go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/wsl-pro-service/go.mod b/wsl-pro-service/go.mod index 5018ed9d8..347d45996 100644 --- a/wsl-pro-service/go.mod +++ b/wsl-pro-service/go.mod @@ -3,9 +3,9 @@ module github.com/canonical/ubuntu-pro-for-windows/wsl-pro-service go 1.21.1 require ( - github.com/canonical/ubuntu-pro-for-windows/agentapi v0.0.0-20231023183501-458a10db4c16 - github.com/canonical/ubuntu-pro-for-windows/common v0.0.0-20231023183501-458a10db4c16 - github.com/canonical/ubuntu-pro-for-windows/wslserviceapi v0.0.0-20231023183501-458a10db4c16 + github.com/canonical/ubuntu-pro-for-windows/agentapi v0.0.0-20231025103252-5b9d0e7eff84 + github.com/canonical/ubuntu-pro-for-windows/common v0.0.0-20231025103252-5b9d0e7eff84 + github.com/canonical/ubuntu-pro-for-windows/wslserviceapi v0.0.0-20231025103252-5b9d0e7eff84 github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.7.0 diff --git a/wsl-pro-service/go.sum b/wsl-pro-service/go.sum index b1cbebf0f..638bc085b 100644 --- a/wsl-pro-service/go.sum +++ b/wsl-pro-service/go.sum @@ -38,12 +38,12 @@ cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3f dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/canonical/ubuntu-pro-for-windows/agentapi v0.0.0-20231023183501-458a10db4c16 h1:p894ThMw329hDKpS2tfsgZhUuWC1HfZAsq/vcRhDpGs= -github.com/canonical/ubuntu-pro-for-windows/agentapi v0.0.0-20231023183501-458a10db4c16/go.mod h1:yZFCC1gVaFNjIJ7Glk3FBiaCokcV/Jk5B6tFIlHBgd8= -github.com/canonical/ubuntu-pro-for-windows/common v0.0.0-20231023183501-458a10db4c16 h1:u7afWNLgssNSEHKxldRbgCobFnGlILpECBeAPiWyb0c= -github.com/canonical/ubuntu-pro-for-windows/common v0.0.0-20231023183501-458a10db4c16/go.mod h1:a/RSoEHIs9RmXxL/+68oDpXi8+d+TGptM/9N5ULw2Kw= -github.com/canonical/ubuntu-pro-for-windows/wslserviceapi v0.0.0-20231023183501-458a10db4c16 h1:B/iSer/eNknIEp9TnNYC56zdc6SLY6K7fXxkeFl15s8= -github.com/canonical/ubuntu-pro-for-windows/wslserviceapi v0.0.0-20231023183501-458a10db4c16/go.mod h1:gjEBJv2vc1VUqqrv1ZTDcNmd3TBBCPIlmBaR63YSX9Y= +github.com/canonical/ubuntu-pro-for-windows/agentapi v0.0.0-20231025103252-5b9d0e7eff84 h1:QEkBd3bEhbNQgWZEl3ifIhUkDP/wFPTwovjssHrW+8k= +github.com/canonical/ubuntu-pro-for-windows/agentapi v0.0.0-20231025103252-5b9d0e7eff84/go.mod h1:8p2CiywIv3MeMT4ASJfe64PPqehLUh4mYxeLYGk3dog= +github.com/canonical/ubuntu-pro-for-windows/common v0.0.0-20231025103252-5b9d0e7eff84 h1:nNJM0x5Z+rSmwzIzdaRxzmfX9GCrOZbahVO5zb2mTFE= +github.com/canonical/ubuntu-pro-for-windows/common v0.0.0-20231025103252-5b9d0e7eff84/go.mod h1:56PLZbrorRyiHgmRLS/FRAHSvavWi4W9nhu+LfBC8+w= +github.com/canonical/ubuntu-pro-for-windows/wslserviceapi v0.0.0-20231025103252-5b9d0e7eff84 h1:QfbgDsSLcFrM4wQPSjQM0KaB2QOZiMKF4amo5X6oNYI= +github.com/canonical/ubuntu-pro-for-windows/wslserviceapi v0.0.0-20231025103252-5b9d0e7eff84/go.mod h1:wShl3VjBM6p1lY9HBzkVhl12eK8peKglwADGKyicwEs= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=