Skip to content

Commit f94c2af

Browse files
committed
remove ovh from staging federation
explicitly remove 0-weight hosts from federation so they don't need to be checked
1 parent eb171c8 commit f94c2af

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

config/staging.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,6 @@ federationRedirect:
162162
# unset the rest of the federation
163163
gesis:
164164
weight: 0
165-
ovh:
166-
weight: 0
167165
turing:
168166
url: https://binder-staging.mybinder.turing.ac.uk
169167
weight: 4

images/federation-redirect/app.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ def get_config(config_path):
6262
# can modify the dict while iterating over it
6363
if config["hosts"][h] is None:
6464
config["hosts"].pop(h)
65+
# remove zero-weight entries
66+
if config["hosts"][h].get("weight", 0) == 0:
67+
app_log.warning(f"Removing host {h} with 0 weight")
68+
config["hosts"].pop(h)
6569
# remove trailing slashes in host urls
6670
# these can cause 404 after redirection (RedirectHandler) and we don't
6771
# realize it

0 commit comments

Comments
 (0)