x/build/app/appengine: deploy fails if done in GOPATH mode #34107
Labels
Builders
x/build issues (builders, bots, dashboards)
FrozenDueToAge
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
If one follows the directions to deploy the build dashboard as written at https://github.com/golang/build/tree/master/app/appengine#deploying, there's a risk of creating a bad deployment that serves 500s due to "panic: open app/appengine/notify.txt: no such file or directory".
(This may explain why we had trouble deploying it recently depending on who did it. /cc @toothrot @andybons)
Cause
It happens if
gcloud app deploy
ends up using GOPATH mode rather than module mode. That changes the root of the bundle uploaded from repository root to the directory containing app.yaml.¹¹ https://cloud.google.com/appengine/docs/standard/go111/specifying-dependencies#declaring_and_managing_dependencies
Compare:
Fix
Setting
GO111MODULE=on
or deploying from outside GOPATH/src makes it work, but it's easy to accidentally deploy in GOPATH mode, e.g., when relying on Go 1.13 with its newGO111MODULE=auto
behavior, becausegcloud app deploy
doesn't use the same logic.I'll send a fix by prepending
GO111MODULE=on
to the deploy command in the README.The text was updated successfully, but these errors were encountered: