From 072922b4d57f499cf2b6daa5c598b3fd1f7279a3 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Tue, 12 Dec 2023 17:27:24 -0600 Subject: [PATCH 1/6] chore: do not use database for sqlc gen Adding support for sqlc vet made sqlc gen require a db connection. Disable that to get previous behavior --- coderd/database/sqlc.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/coderd/database/sqlc.yaml b/coderd/database/sqlc.yaml index 2ed67c3ac1434..f8d45d46a14f1 100644 --- a/coderd/database/sqlc.yaml +++ b/coderd/database/sqlc.yaml @@ -86,6 +86,8 @@ sql: # schema loaded and migrations run. Run `make sqlc-vet` to run the linter. database: uri: "${SQLC_DATABASE_URL}" + analyzer: + database: false rules: - sqlc/db-prepare gen: From ba00b78138025772e3c0546b16d5cae73e9904af Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Tue, 12 Dec 2023 17:30:46 -0600 Subject: [PATCH 2/6] bump sqlc to v1.24.0 --- .github/actions/setup-sqlc/action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-sqlc/action.yaml b/.github/actions/setup-sqlc/action.yaml index 054bc78e202be..151970389f1bd 100644 --- a/.github/actions/setup-sqlc/action.yaml +++ b/.github/actions/setup-sqlc/action.yaml @@ -7,4 +7,4 @@ runs: - name: Setup sqlc uses: sqlc-dev/setup-sqlc@v4 with: - sqlc-version: "1.20.0" + sqlc-version: "1.24.0" From 64e63155ac929e56b065d75721ae7cd95d6bbaf6 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Tue, 12 Dec 2023 17:31:42 -0600 Subject: [PATCH 3/6] Bump sqlc in dockerifle --- coderd/database/models.go | 2 +- coderd/database/querier.go | 2 +- coderd/database/queries.sql.go | 2 +- dogfood/Dockerfile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/coderd/database/models.go b/coderd/database/models.go index 17eb47be98f39..47b095a7557d6 100644 --- a/coderd/database/models.go +++ b/coderd/database/models.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.20.0 +// sqlc v1.24.0 package database diff --git a/coderd/database/querier.go b/coderd/database/querier.go index 7c3b649d0ca76..08d76ba3d9726 100644 --- a/coderd/database/querier.go +++ b/coderd/database/querier.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.20.0 +// sqlc v1.24.0 package database diff --git a/coderd/database/queries.sql.go b/coderd/database/queries.sql.go index 649f4ee2a0d66..e360977a82294 100644 --- a/coderd/database/queries.sql.go +++ b/coderd/database/queries.sql.go @@ -1,6 +1,6 @@ // Code generated by sqlc. DO NOT EDIT. // versions: -// sqlc v1.20.0 +// sqlc v1.24.0 package database diff --git a/dogfood/Dockerfile b/dogfood/Dockerfile index 4e6a091450c73..262712e217492 100644 --- a/dogfood/Dockerfile +++ b/dogfood/Dockerfile @@ -53,7 +53,7 @@ RUN mkdir --parents "$GOPATH" && \ # charts and values files go install github.com/norwoodj/helm-docs/cmd/helm-docs@v1.5.0 && \ # sqlc for Go code generation - go install github.com/sqlc-dev/sqlc/cmd/sqlc@v1.20.0 && \ + go install github.com/sqlc-dev/sqlc/cmd/sqlc@v1.24.0 && \ # gcr-cleaner-cli used by CI to prune unused images go install github.com/sethvargo/gcr-cleaner/cmd/gcr-cleaner-cli@v0.5.1 && \ # ruleguard for checking custom rules, without needing to run all of From ba63cd3ef44d4a289a81e74077703b4eae6749c8 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Tue, 12 Dec 2023 17:49:47 -0600 Subject: [PATCH 4/6] bump go version to 1.21.5 --- dogfood/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dogfood/Dockerfile b/dogfood/Dockerfile index 262712e217492..d2affb82a0ef1 100644 --- a/dogfood/Dockerfile +++ b/dogfood/Dockerfile @@ -8,7 +8,7 @@ FROM ubuntu:jammy AS go RUN apt-get update && apt-get install --yes curl gcc # Install Go manually, so that we can control the version -ARG GO_VERSION=1.20.11 +ARG GO_VERSION=1.21.5 RUN mkdir --parents /usr/local/go # Boring Go is needed to build FIPS-compliant binaries. @@ -53,7 +53,7 @@ RUN mkdir --parents "$GOPATH" && \ # charts and values files go install github.com/norwoodj/helm-docs/cmd/helm-docs@v1.5.0 && \ # sqlc for Go code generation - go install github.com/sqlc-dev/sqlc/cmd/sqlc@v1.24.0 && \ + (CGO_ENABLED=1 go install github.com/sqlc-dev/sqlc/cmd/sqlc@v1.24.0) && \ # gcr-cleaner-cli used by CI to prune unused images go install github.com/sethvargo/gcr-cleaner/cmd/gcr-cleaner-cli@v0.5.1 && \ # ruleguard for checking custom rules, without needing to run all of From a15c24f62315f3c40538a2d0f2bf9f1187f9f012 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Tue, 12 Dec 2023 17:51:54 -0600 Subject: [PATCH 5/6] update go action --- .github/actions/setup-go/action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-go/action.yaml b/.github/actions/setup-go/action.yaml index 589d78eacb159..d4c67cb7ddaf2 100644 --- a/.github/actions/setup-go/action.yaml +++ b/.github/actions/setup-go/action.yaml @@ -4,7 +4,7 @@ description: | inputs: version: description: "The Go version to use." - default: "1.20.11" + default: "1.21.5" runs: using: "composite" steps: From 4622f57d7e9c65618e0e7d8902128af6bbb0483d Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Tue, 12 Dec 2023 17:52:24 -0600 Subject: [PATCH 6/6] Missed a spot --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ff2b54e45d199..eb41e96ce289d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -228,7 +228,7 @@ jobs: with: # This doesn't need caching. It's super fast anyways! cache: false - go-version: 1.20.11 + go-version: 1.21.5 - name: Install shfmt run: go install mvdan.cc/sh/v3/cmd/shfmt@v3.7.0