Skip to content

Commit

Permalink
Fix minor typo in jupyterhub_traefik_proxy/etcd.py, which put the
Browse files Browse the repository at this point in the history
`proxy.kv_separator` in the wrong place, causing faulty target lookups
in the etcd database.
  • Loading branch information
alexleach committed Jun 23, 2021
1 parent 9685be6 commit 508987c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions jupyterhub_traefik_proxy/etcd.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ async def _kv_atomic_delete_route_parts(self, jupyterhub_routespec, route_keys):
self.kv_client.transactions.delete(jupyterhub_routespec),
self.kv_client.transactions.delete(jupyterhub_target),
self.kv_client.transactions.delete(route_keys.service_url_path),
#self.kv_client.transactions.delete(route_keys.service_weight_path),
self.kv_client.transactions.delete(route_keys.router_service_path),
self.kv_client.transactions.delete(route_keys.router_rule_path),
]
Expand All @@ -186,10 +185,10 @@ async def _kv_get_route_parts(self, kv_entry):
# Strip the "/jupyterhub/routes/" prefix from the routespec and unescape it
sep = self.kv_separator
route_prefix = sep.join([self.kv_jupyterhub_prefix, "routes" + sep])
target_prefix = sep.join([self.kv_jupyterhub_prefix, "targets" + sep])
target_prefix = sep.join([self.kv_jupyterhub_prefix, "targets"])
routespec = escapism.unescape(key.replace(route_prefix, "", 1))
etcd_target = sep.join([target_prefix, escapism.escape(value)])
target = escapism.unescape(etcd_target.replace(target_prefix, "", 1))
target = escapism.unescape(etcd_target.replace(target_prefix + sep, "", 1))
data = await self._kv_get_data(etcd_target)

return routespec, target, data
Expand Down

0 comments on commit 508987c

Please sign in to comment.