Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-11-22 15:10:20 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-11-22 15:10:20 +0300
commit860dab2f5f977c7bf14c13c01e43cae2757264f1 (patch)
tree58d34903d0158e24f0c5651d19c06810cffa48ab /workhorse/internal/upstream
parent56274bbb7424bcecbd43bd5f884b11a85322044e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'workhorse/internal/upstream')
-rw-r--r--workhorse/internal/upstream/upstream.go4
-rw-r--r--workhorse/internal/upstream/upstream_test.go4
2 files changed, 2 insertions, 6 deletions
diff --git a/workhorse/internal/upstream/upstream.go b/workhorse/internal/upstream/upstream.go
index 6835569dfa8..e57f58d59dd 100644
--- a/workhorse/internal/upstream/upstream.go
+++ b/workhorse/internal/upstream/upstream.go
@@ -65,7 +65,7 @@ func newUpstream(cfg config.Config, accessLogger *logrus.Logger, routesCallback
Config: cfg,
accessLogger: accessLogger,
// Kind of a feature flag. See https://gitlab.com/groups/gitlab-org/-/epics/5914#note_564974130
- enableGeoProxyFeature: os.Getenv("GEO_SECONDARY_PROXY") != "0",
+ enableGeoProxyFeature: os.Getenv("GEO_SECONDARY_PROXY") == "1",
geoProxyBackend: &url.URL{},
}
if up.geoProxyPollSleep == nil {
@@ -207,8 +207,8 @@ func (u *upstream) findGeoProxyRoute(cleanedPath string, r *http.Request) *route
func (u *upstream) pollGeoProxyAPI() {
for {
- u.geoProxyPollSleep(geoProxyApiPollingInterval)
u.callGeoProxyAPI()
+ u.geoProxyPollSleep(geoProxyApiPollingInterval)
}
}
diff --git a/workhorse/internal/upstream/upstream_test.go b/workhorse/internal/upstream/upstream_test.go
index 4d8efed2b73..53c15bb7e91 100644
--- a/workhorse/internal/upstream/upstream_test.go
+++ b/workhorse/internal/upstream/upstream_test.go
@@ -310,9 +310,5 @@ func startWorkhorseServer(railsServerURL string, enableGeoProxyFeature bool) (*h
}
}
- // Since the first sleep happens before any API call, this ensures
- // we call the API at least once.
- waitForNextApiPoll()
-
return ws, ws.Close, waitForNextApiPoll
}