Skip to content

Commit

Permalink
Pin Go version to 1.22 everywhere, tidy module (#109)
Browse files Browse the repository at this point in the history
-   Reverts prior changes (upgrade to 1.23 #107, `go get -u` #106),
    as 1.23 is not yet supported by the cloudbuild script.
-   Upgrade gRPC, due to missing go.sum entries in the stack.
-   Use `go mod tidy -go=1.22` to clean things up.
-   Read and specify the builder version in the cloudbuild files.
    The worker had been defaulting to 1.15, which didn't support
    point releases in module declarations.

Tested on the dev environment.
  • Loading branch information
cceckman authored Dec 20, 2024
1 parent d20cf6e commit 1a1a07f
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 127 deletions.
9 changes: 8 additions & 1 deletion cloudbuild.dev.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
steps:
- name: 'gcr.io/cloud-builders/go'
- name: 'gcr.io/cloud-builders/go:1.22'
args: ['version']
env: [GOPATH=/gopath']
volumes:
- name: 'go'
path: '/gopath'

- name: 'gcr.io/cloud-builders/go:1.22'
args: ['get', '-d']
env: [GOPATH=/gopath']
volumes:
Expand Down
11 changes: 9 additions & 2 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
steps:
- name: 'gcr.io/cloud-builders/go'
- name: 'gcr.io/cloud-builders/go:1.22'
args: ['version']
env: [GOPATH=/gopath']
volumes:
- name: 'go'
path: '/gopath'

- name: 'gcr.io/cloud-builders/go:1.22'
args: ['get', '-d']
env: [GOPATH=/gopath']
volumes:
- name: 'go'
path: '/gopath'

- name: 'gcr.io/cloud-builders/gcloud'
- name: 'gcr.io/cloud-builders/gcloud:1.22'
args: ['app','deploy', 'cron.yaml']
timeout: 600s
env: ['GOPATH=/gopath']
Expand Down
43 changes: 19 additions & 24 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,46 +1,41 @@
module github.com/recursecenter/pairing-bot

go 1.23
go 1.22

require (
cloud.google.com/go/firestore v1.17.0
cloud.google.com/go/firestore v1.14.0
github.com/google/go-cmp v0.6.0
google.golang.org/api v0.213.0
google.golang.org/api v0.167.0
google.golang.org/grpc v1.69.2
)

require (
cloud.google.com/go v0.117.0 // indirect
cloud.google.com/go/auth v0.13.0 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.6 // indirect
cloud.google.com/go/compute v1.31.0 // indirect
cloud.google.com/go/compute/metadata v0.6.0 // indirect
cloud.google.com/go/longrunning v0.6.3 // indirect
cloud.google.com/go v0.112.0 // indirect
cloud.google.com/go/compute/metadata v0.5.2 // indirect
cloud.google.com/go/longrunning v0.5.5 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/s2a-go v0.1.8 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.4 // indirect
github.com/googleapis/gax-go/v2 v2.14.0 // indirect
github.com/google/s2a-go v0.1.7 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
github.com/googleapis/gax-go/v2 v2.12.1 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 // indirect
go.opentelemetry.io/otel v1.33.0 // indirect
go.opentelemetry.io/otel/metric v1.33.0 // indirect
go.opentelemetry.io/otel/trace v1.33.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
go.opentelemetry.io/otel v1.31.0 // indirect
go.opentelemetry.io/otel/metric v1.31.0 // indirect
go.opentelemetry.io/otel/trace v1.31.0 // indirect
golang.org/x/crypto v0.31.0 // indirect
golang.org/x/net v0.33.0 // indirect
golang.org/x/oauth2 v0.24.0 // indirect
golang.org/x/oauth2 v0.23.0 // indirect
golang.org/x/sync v0.10.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/time v0.8.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20241219192143-6b3ec007d9bb // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20241219192143-6b3ec007d9bb // indirect
golang.org/x/time v0.5.0 // indirect
google.golang.org/genproto v0.0.0-20240221002015-b0ce06bbee7c // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241219192143-6b3ec007d9bb // indirect
google.golang.org/protobuf v1.36.0 // indirect
)
Loading

0 comments on commit 1a1a07f

Please sign in to comment.