Skip to content

Commit 917c7a4

Browse files
committed
all: remove code for the decommissioned beta environment
The beta environment is no longer in use. This change removes related logic and references, such as the middleware redirect to beta.pkg.go.dev. Change-Id: I0c6ebbe11d5689ccf2abf8c722399d8dc339db89 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/715321 kokoro-CI: kokoro <[email protected]> Reviewed-by: Jonathan Amsterdam <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Michael Matloob <[email protected]> Reviewed-by: Michael Matloob <[email protected]>
1 parent 4bd6c63 commit 917c7a4

File tree

13 files changed

+26
-217
lines changed

13 files changed

+26
-217
lines changed

cmd/frontend/main.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,6 @@ func main() {
221221
middleware.RequestInfo(),
222222
middleware.RequestLog(cmdconfig.Logger(ctx, cfg, "frontend-log")),
223223
middleware.AcceptRequests(http.MethodGet, http.MethodPost, http.MethodHead), // accept only GETs, POSTs and HEADs
224-
middleware.BetaPkgGoDevRedirect(),
225224
middleware.GodocOrgRedirect(),
226225
middleware.Quota(cfg.Quota, redisClient),
227226
middleware.SecureHeaders(!*disableCSP), // must come before any caching for nonces to work

cmd/worker/main.go

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -102,19 +102,17 @@ func main() {
102102
return octrace.StartSpan(ctx, name)
103103
})
104104
redisCacheClient := getCacheRedis(ctx, cfg)
105-
redisBetaCacheClient := getBetaCacheRedis(ctx, cfg)
106105
experimenter := cmdconfig.Experimenter(ctx, cfg, expg, reporter)
107106
server, err := worker.NewServer(cfg, worker.ServerConfig{
108-
DB: db,
109-
IndexClient: indexClient,
110-
ProxyClient: proxyClient,
111-
SourceClient: sourceClient,
112-
RedisCacheClient: redisCacheClient,
113-
RedisBetaCacheClient: redisBetaCacheClient,
114-
Queue: fetchQueue,
115-
Reporter: reporter,
116-
StaticPath: template.TrustedSourceFromFlag(flag.Lookup("static").Value),
117-
GetExperiments: experimenter.Experiments,
107+
DB: db,
108+
IndexClient: indexClient,
109+
ProxyClient: proxyClient,
110+
SourceClient: sourceClient,
111+
RedisCacheClient: redisCacheClient,
112+
Queue: fetchQueue,
113+
Reporter: reporter,
114+
StaticPath: template.TrustedSourceFromFlag(flag.Lookup("static").Value),
115+
GetExperiments: experimenter.Experiments,
118116
})
119117
if err != nil {
120118
log.Fatal(ctx, err)
@@ -167,10 +165,6 @@ func getCacheRedis(ctx context.Context, cfg *config.Config) *redis.Client {
167165
return getRedis(ctx, cfg.RedisCacheHost, cfg.RedisCachePort, 0, 6*time.Second)
168166
}
169167

170-
func getBetaCacheRedis(ctx context.Context, cfg *config.Config) *redis.Client {
171-
return getRedis(ctx, cfg.RedisBetaCacheHost, cfg.RedisCachePort, 0, 6*time.Second)
172-
}
173-
174168
func getRedis(ctx context.Context, host, port string, writeTimeout, readTimeout time.Duration) *redis.Client {
175169
if host == "" {
176170
return nil

deploy/config.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ source private/devtools/lib.sh || { echo "Are you at repo root?"; exit 1; }
1010
usage() {
1111
>&2 cat <<EOUSAGE
1212
13-
Usage: $0 [exp|dev|staging|prod|beta]
13+
Usage: $0 [exp|dev|staging|prod]
1414
1515
Copy the dynamic config to the cloud storage bucket for the given environment.
1616

deploy/frontend.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ source private/devtools/lib.sh || { echo "Are you at repo root?"; exit 1; }
1010
usage() {
1111
>&2 cat <<EOUSAGE
1212
13-
Usage: $0 [exp|dev|staging|prod|beta] NAME:TAG
13+
Usage: $0 [exp|dev|staging|prod] NAME:TAG
1414
1515
Deploy a frontend image to Cloud Run for the given environment.
1616
@@ -31,11 +31,7 @@ main() {
3131
local tok=$(private/devtools/idtoken.sh $env)
3232
local hdr="Authorization: Bearer $tok"
3333
info "Clearing the redis cache."
34-
if [[ $env == "beta" ]]; then
35-
curl -H "$hdr" $(worker_url prod)/clear-beta-cache
36-
else
37-
curl -H "$hdr" $(worker_url $env)/clear-cache
38-
fi
34+
curl -H "$hdr" $(worker_url $env)/clear-cache
3935
info "Running warmups."
4036
private/devtools/warmups.sh $env $tok
4137
}

deploy/pagecheck.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ source devtools/lib.sh || { echo "Are you at repo root?"; exit 1; }
1717
usage() {
1818
cat >&2 <<END
1919
20-
Usage: $0 [exp|dev|staging|prod|beta] IDTOKEN
20+
Usage: $0 [exp|dev|staging|prod] IDTOKEN
2121
2222
Run the pagecheck tests against the given environment
2323

deploy/screentest.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ source private/devtools/lib.sh || { echo "Are you at repo root?"; exit 1; }
1010
usage() {
1111
>&2 cat <<EOUSAGE
1212
13-
Usage: $0 [OPTIONS] [exp|dev|staging|prod|beta] [IDTOKEN]
13+
Usage: $0 [OPTIONS] [exp|dev|staging|prod] [IDTOKEN]
1414
1515
Run the screentest check against a live instance of the given environment.
1616
These tests will only pass against staging and prod.

deploy/worker.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ source private/devtools/lib.sh || { echo "Are you at repo root?"; exit 1; }
1010
usage() {
1111
>&2 cat <<EOUSAGE
1212
13-
Usage: $0 [exp|dev|staging|prod|beta] NAME:TAG
13+
Usage: $0 [exp|dev|staging|prod] NAME:TAG
1414
1515
Deploy a worker image to gke for the given environment.
1616
@@ -23,10 +23,6 @@ main() {
2323
local image=$2
2424
check_env $env
2525
check_image $image
26-
if [[ $env = "beta" ]]; then
27-
info "skipping worker deploy for $env"
28-
return
29-
fi
3026
runcmd docker run -v $(pwd)/private:/private cuelang/cue:0.4.0 cmd \
3127
-t env=$env \
3228
-t app=worker \

doc/config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Pkgsite uses these environment variables:
1010
| GO_DISCOVERY_DATABASE_HOST | Database server hostname. |
1111
| GO_DISCOVERY_DATABASE_NAME | Name of database within the server. |
1212
| GO_DISCOVERY_DATABASE_PASSWORD | Password for database. |
13-
| GO_DISCOVERY_DATABASE_SECONDARY_HOST | If `GO_DISCOVERY_DATABASE_HOST` is unreachable, use this host. Used only by prod and beta frontends. |
13+
| GO_DISCOVERY_DATABASE_SECONDARY_HOST | If `GO_DISCOVERY_DATABASE_HOST` is unreachable, use this host. Used only by prod frontends. |
1414
| GO_DISCOVERY_DATABASE_USER | Used for frontend, worker and scripts. |
1515
| GO_DISCOVERY_DISABLE_ERROR_REPORTING | Disables calls to GCP errorreporting API. Set only in dev. |
1616
| GO_DISCOVERY_E2E_AUTHORIZATION | Auth token for e2e tests. |

internal/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ type Config struct {
8686
DBPassword string `json:"-" yaml:"-"`
8787

8888
// Configuration for redis page cache.
89-
RedisCacheHost, RedisBetaCacheHost, RedisCachePort string
89+
RedisCacheHost, RedisCachePort string
9090

9191
// UseProfiler specifies whether to enable Stackdriver Profiler.
9292
UseProfiler bool

internal/config/serverconfig/config.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ func Init(ctx context.Context) (_ *config.Config, err error) {
150150
DBSecret: os.Getenv("GO_DISCOVERY_DATABASE_SECRET"),
151151
DBSSL: GetEnv("GO_DISCOVERY_DATABASE_SSL", "disable"),
152152
RedisCacheHost: os.Getenv("GO_DISCOVERY_REDIS_HOST"),
153-
RedisBetaCacheHost: os.Getenv("GO_DISCOVERY_REDIS_BETA_HOST"),
154153
RedisCachePort: GetEnv("GO_DISCOVERY_REDIS_PORT", "6379"),
155154
Quota: config.QuotaSettings{
156155
Enable: os.Getenv("GO_DISCOVERY_ENABLE_QUOTA") == "true",

0 commit comments

Comments
 (0)