gcloud app deploy and vendoring

991 views
Skip to first unread message

Peter Krefting

unread,
Sep 20, 2017, 8:53:27 AM9/20/17
to google-ap...@googlegroups.com
Hi!

I am compiling a GO app that I want to upload and run on the Google Cloud
Platform and have several packages vendored, to have them under version control
along with the rest of the sources. I had to take the appengine package out of
vendoring due to various compile issues, and now everything but "gcloud app
deploy" is working. "dev_appserver.py" works, "go build" works, "go test"
works, but "gcloud app deploy" fails:

File upload done.
Updating service [default]...
........failed.
ERROR: (gcloud.app.deploy) Error Response: [9] Deployment contains files that
cannot be compiled: Compile failed:
2017/09/20 05:34:31 go-app-builder: build timing: 7×compile (2.449s total),
0×link (0s total)
2017/09/20 05:34:31 go-app-builder: failed running compile: exit status 2

company/vendor/golang.org/x/text/unicode/norm/normalize.go:15: can't find
import: "golang.org/x/text/transform"

The x/text/transform package is where it is supposed to be (the app.yaml is in
the $GOPATH/src/company/myproj directory, the vendor directory is one level up
at $GOPATH/src/company/myproj):

$ find ../vendor -name transform
../vendor/golang.org/x/text/transform

How come it is not picked up by "gcloud app deploy"?

--
\\// Peter - http://www.softwolves.pp.se/

sha...@google.com

unread,
Sep 29, 2017, 3:18:27 PM9/29/17
to google-appengine-go
This is a known issue with both App Engine standard and flex. One workaround is moving vendor directory to the same directory containing app.yaml ($GOPATH/src/company/myproj).

Fredrik Enestad

unread,
Oct 24, 2017, 1:21:11 PM10/24/17
to google-appengine-go
There is an issue in the tracker that you can follow: https://issuetracker.google.com/issues/38449183

Herbie Ong

unread,
Oct 25, 2017, 9:34:10 PM10/25/17
to google-appengine-go

I acknowledge that the original author of this thread is using Go GAE Standard.  I just want to point out that for those on Go GAE Flex, the issue of importing vendor directories directly from main package should be resolved with gcloud version 177.0.0 when running 'gcloud beta app deploy'.

We announced the beta for a new Flex build pipeline a few weeks back -- https://groups.google.com/forum/#!msg/google-appengine-go/cG_JAAX73Zg/27wXKI7aBQAJ.  Please give it a shot and let us know if there are issues.

Thanks.

jboa...@sparkfish.com

unread,
Feb 5, 2018, 2:00:25 PM2/5/18
to google-appengine-go
Has there been any progress resolving this issue for Go GAE Standard??
Reply all
Reply to author
Forward
0 new messages