aboutsummaryrefslogtreecommitdiff
path: root/cmd/golangorg
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2021-08-23 13:36:08 -0400
committerRuss Cox <rsc@golang.org>2021-09-16 13:02:31 +0000
commit512eebc213f47c83e4fb84560e040ca64e7ed3bb (patch)
tree96a8b8c93a859886f4f8be889083a96586dab464 /cmd/golangorg
parent34cce7c2d1810ca961a6936c9f05b41af994420f (diff)
downloadgo-x-website-512eebc213f47c83e4fb84560e040ca64e7ed3bb.tar.xz
cmd/golangorg: more go-discovery exit cleanup
Remove the go-discovery app yaml file and the code paths it used. Change-Id: I13df0433ce1b7c069061cfad29080d1f80ca9b7d Reviewed-on: https://go-review.googlesource.com/c/website/+/344490 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Diffstat (limited to 'cmd/golangorg')
-rw-r--r--cmd/golangorg/godevapp.yaml16
-rw-r--r--cmd/golangorg/server.go23
2 files changed, 2 insertions, 37 deletions
diff --git a/cmd/golangorg/godevapp.yaml b/cmd/golangorg/godevapp.yaml
deleted file mode 100644
index c005acf7..00000000
--- a/cmd/golangorg/godevapp.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-runtime: go116
-service: go-dev
-main: ./cmd/golangorg
-
-env_variables:
- GODEV_IN_GO_DISCOVERY: true
-
-handlers:
- - url: /.*
- secure: always
- script: auto
-
-# Same performance as app.yaml for golang.org (eventually we will run there).
-instance_class: F4
-automatic_scaling:
- max_concurrent_requests: 40
diff --git a/cmd/golangorg/server.go b/cmd/golangorg/server.go
index 8aa55b9e..905e018e 100644
--- a/cmd/golangorg/server.go
+++ b/cmd/golangorg/server.go
@@ -104,15 +104,8 @@ func main() {
}
handler := NewHandler(*contentDir, *goroot)
-
- if os.Getenv("GODEV_IN_GO_DISCOVERY") != "" {
- // Running in go-discovery for a little longer, do not expect the golang-org prod setup.
- handler = webtest.HandlerWithCheck(handler, "/_readycheck",
- testdataFS, "testdata/godev.txt")
- } else {
- handler = webtest.HandlerWithCheck(handler, "/_readycheck",
- testdataFS, "testdata/*.txt")
- }
+ handler = webtest.HandlerWithCheck(handler, "/_readycheck",
+ testdataFS, "testdata/*.txt")
if *verbose {
log.Printf("golang.org server:")
@@ -252,12 +245,6 @@ func newSite(mux *http.ServeMux, host string, content, goroot fs.FS) (*web.Site,
// When a new commit is available, watchTip downloads the new tree and calls
// tipGoroot.Set to install the new file system.
func watchTip(tipGoroot *atomicFS) {
- if os.Getenv("GODEV_IN_GO_DISCOVERY") != "" {
- // Running in go-discovery for a little longer, do not expect the golang-org prod setup.
- log.Printf("watchTip: not serving tip.golang.org in go-discovery since it's not needed nor are there enough resources for it")
- return
- }
-
for {
// watchTip1 runs until it panics (hopefully never).
// If that happens, sleep 5 minutes and try again.
@@ -323,12 +310,6 @@ func watchTip1(tipGoroot *atomicFS) {
func appEngineSetup(site, chinaSite *web.Site, mux *http.ServeMux) {
googleAnalytics = os.Getenv("GOLANGORG_ANALYTICS")
- log.Printf("GODEV_IN_GO_DISCOVERY %q PROJECT %q", os.Getenv("GODEV_IN_GO_DISCOVERY"), os.Getenv("PROJECT_ID"))
- if os.Getenv("GODEV_IN_GO_DISCOVERY") != "" {
- // Running in go-discovery for a little longer, do not expect the golang-org prod setup.
- return
- }
-
ctx := context.Background()
datastoreClient, err := datastore.NewClient(ctx, "")