Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken cloud builds #108

Closed
cceckman opened this issue Dec 20, 2024 · 6 comments
Closed

Broken cloud builds #108

cceckman opened this issue Dec 20, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@cceckman
Copy link
Collaborator

The last couple pushes have failed to deploy, starting with c2e35fc.

c2e35fc failed in app deploy: ../../google.go.gomod/gopath/pkg/mod/google.golang.org/[email protected]/trace_withtrace.go:26:2: missing go.sum entry for module providing package golang.org/x/net/trace (imported by google.golang.org/grpc); to add: as well as a couple other missing packages.

287482a failed in go get:

Step #0: Running: go get -d
Step #0: go: errors parsing go.mod:
Step #0: /workspace/go.mod:3: invalid go version '1.22.7': must match format 1.23

(That's the go.mod file for our module.)

d20cf6e failed in go get, but differently:

Step #0: go: go.opentelemetry.io/auto/[email protected]: parsing go.mod: go.mod:3: invalid go version '1.22.0': must match format 1.23

I don't see this requirement stated in the go.mod file reference; this says any valid Go version should work, "such as 1.9.1.14".

@cceckman cceckman added the bug Something isn't working label Dec 20, 2024
@cceckman
Copy link
Collaborator Author

https://tip.golang.org/doc/toolchain#config gives an explicit example of "a go.mod that says go 1.21.0".

So I don't know what the Cloud Build setup is doing wrong?

@cceckman
Copy link
Collaborator Author

The Git history of the builder indicates it hasn't upgraded to 1.23 yet, and the AppEngine runtime was still 1.22 -- so at least my upgrade of the Go version was premature.

(Golang 1.23 released... in August? But not in the builder yet?)

@cceckman
Copy link
Collaborator Author

siderolabs/conform#251 tracks the same issue.

If you are using Go 1.20 or older, your project's go.mod has to specify the version without the patch number, so for example go 1.19.

If you are using Go 1.21 or newer, your project's go.mod can specify the version with or without the patch number, both seem to work.

So apparently the builder is using an older build?

But our go.mod says go 1.22, and

a go.mod that says go 1.21.0 with no toolchain line is interpreted as if it had a toolchain go1.21.0 line.

per docs.

@cceckman
Copy link
Collaborator Author

cceckman commented Dec 20, 2024

I added a go version line to the builder on the dev branch and deployed:

Already have image (with digest): gcr.io/cloud-builders/go
Documentation at https://github.com/GoogleCloudPlatform/cloud-builders/blob/master/go/README.md
Running: go version
go version go1.15.15 linux/amd64

I guess it's just using whatever version that worker had cached?

Now running a test explicitly asking for the :1.22 build image, which seems to have succeeded.

@cceckman
Copy link
Collaborator Author

#109 to try to fix this.

@cceckman
Copy link
Collaborator Author

OK, deployed from main with #110 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant