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
internal/metrics: fix detection of GCE environment
appengine.IsAppEngine mistakenly returns false, as it relies on the app
being built with the appenginevm build constraint. This is not set,
as we're supplying our own Docker image.
The playground is always running either locally or on appengine. We can
rely on metadata.OnGCE being correct.
Other calls that are made to the appengine library either use the
metadata server or environment variables, and do not rely on a
constraint being set. They also panic if the metadata server is
unavailable.
For golang/go#44822
Change-Id: I1de5fda4bfd1e909f1fd54cc44770525827a9c1a
Reviewed-on: https://go-review.googlesource.com/c/playground/+/303469
Trust: Alexander Rakoczy <alex@golang.org>
Run-TryBot: Alexander Rakoczy <alex@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
0 commit comments