You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RAM developper’s GO version is aligned to the same version to avoid using new GO feature that won t be available on cloud functions.
go version go1.13.8 linux/amd64
Cloud Build environment uses the online GOLANG container that is continuously updated, currently using GO v1.16
Step #0 - "display go language version": Status: Downloaded newer image for golang:latest
Step #0 - "display go language version": docker.io/library/golang:latest
Step #0 - "display go language version": go version go1.16 linux/amd64
With GO 1.16 the -mod option for automatic updates default value changes
In Go 1.15 and lower, the -mod=mod flag was enabled by default, so updates were performed automatically. Since Go 1.16, the go command acts as if -mod=readonly were set instead: if any changes to go.mod are needed, the go command reports an error and suggests a fix.
Proposed fix
Update the Cloud Build triggers build steps definition:
add go version to ease troubleshooting by always displaying which version of GO is used by the GOLANG Docker container
Add to the go build command the flag -mod=mod to allow automatic updates
steps:
- name: golangargs:
- go
- versionid: display go language version
- name: golangargs:
- go
- build
- '-mod=mod'
- ram.goid: build a fresh ram cli
The text was updated successfully, but these errors were encountered:
Error:
Occurs on any build, including existing successful build when hitting RETRY
Root Cause:
Cloud function GO runtime is bounded to GO v1.13
RAM developper’s GO version is aligned to the same version to avoid using new GO feature that won t be available on cloud functions.
Cloud Build environment uses the online GOLANG container that is continuously updated, currently using GO v1.16
With GO 1.16 the -mod option for automatic updates default value changes
In Go 1.15 and lower, the -mod=mod flag was enabled by default, so updates were performed automatically. Since Go 1.16, the go command acts as if -mod=readonly were set instead: if any changes to go.mod are needed, the go command reports an error and suggests a fix.
Proposed fix
Update the Cloud Build triggers build steps definition:
add go version to ease troubleshooting by always displaying which version of GO is used by the GOLANG Docker container
Add to the go build command the flag -mod=mod to allow automatic updates
The text was updated successfully, but these errors were encountered: