gcloud app deploy, mongo-driver and datadog

Skip to first unread message

Adam Pengelly

Nov 12, 2019, 2:50:27 PM11/12/19
to google-appengine-go
I've been working on a go api for a while now, building and running locally just fine. I could use gcloud app deploy just fine too, and everything was sweet. I then reset my Windows 10 machine, and, after fetching back all my repos from github, build and run locally was still fine, but now I can no longer deploy using gcloud. I pulled everything into the fresh ubuntu install as well, and am getting the same gcloud outcome.

ERROR: (gcloud.app.deploy) Error Response: [9] Cloud build 1e92eb3d-xxxx-xxxx-xxxx-d2f652d9f0ca status: FAILURE.
Error ID: 1D0DEBAA.
Error type: BuildError.
Error message: 2019/11/12 13:20:16 Copying /workspace/_gopath/src/github.com to /tmp/staging/srv/gopath/src/github.com
2019/11/12 13:20:16 Copying /workspace/_gopath/src/go.mongodb.org to /tmp/staging/srv/gopath/src/go.mongodb.org
2019/11/12 13:20:16 Copying /workspace/_gopath/src/golang.org to /tmp/staging/srv/gopath/src/golang.org
2019/11/12 13:20:16 Copying /workspace/_gopath/src/my-api to /tmp/staging/srv/gopath/src/my-admin-api
2019/11/12 13:20:16 Copying /workspace/_gopath/src/my-common-api to /tmp/staging/srv/gopath/src/my-common-api
2019/11/12 13:20:17 Building from Go source in /tmp/staging/srv/gopath/src/my-api, with main package at my-api
2019/11/12 13:20:17 Building /tmp/staging/srv/gopath/src/my-api, saving to /tmp/staging/usr/local/bin/start
2019/11/12 13:20:18 Wrote build output to /builder/outputs/output
2019/11/12 13:20:18 Failed to build app: building app with command '[go build -o /tmp/staging/usr/local/bin/start my-api]', env '[PATH=/go/bin:/usr/local/go/bin:/builder/google-cloud-sdk/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin HOSTNAME=2cxxxxxxxx32 BUILDER_OUTPUT=/builder/outputs HOME=/builder/home DEBIAN_FRONTEND=noninteractive GOROOT=/usr/local/go/ GOPATH=/go GOPATH=/tmp/staging/srv/gopath]': err=exit status 1, out=srv/gopath/src/go.mongodb.org/mongo-driver/x/mongo/driver/compression_cgo.go:15:2: cannot find package "github.com/DataDog/zstd" in any of:
/tmp/staging/srv/gopath/src/go.mongodb.org/mongo-driver/vendor/github.com/DataDog/zstd (vendor tree)
/usr/local/go/src/github.com/DataDog/zstd (from $GOROOT)
/tmp/staging/srv/gopath/src/github.com/DataDog/zstd (from $GOPATH).

Do we have any idea how I can get this to deploy, as I'm 3 weeks struggling now, and as you can imagine, my service is heavily out of date :(


Chaoming Li

Nov 12, 2019, 5:31:56 PM11/12/19
to google-appengine-go
Which runtime you are using?

If you are using go.mod, you need to put github.com/DataDog/zstd into it as "required". I don't have luck building with go.mod via Cloudbuild somehow though. It always fails when copying folders.

I ended up using GOPATH which works fine. If you are with runtime 1.12, it can detect the packages and download them automatically.

Adam Pengelly

Nov 13, 2019, 3:56:41 AM11/13/19
to google-appengine-go
Thanks for getting back to me. 

I'm using go 1.13.4

I'm not using go.mod, i'll look into that as I'm not using Cloudbuild.

This is very weird.
Reply all
Reply to author
0 new messages