Skip to content

Commit

Permalink
Merge pull request #2863 from yuvipanda/no-env
Browse files Browse the repository at this point in the history
Return 424 instead of 503 when user servers are stopped
  • Loading branch information
yuvipanda authored Oct 9, 2021
2 parents 5711704 + 072a679 commit 371eefe
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion hub/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v1
appVersion: '1.0'
description: Deployment Chart for JupyterHub
name: hub
version: 0.0.1-n4573.had378e5f
version: 0.0.1-n4584.h0d3ac306
6 changes: 4 additions & 2 deletions hub/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ jupyterhub:
max_per_page: 30000
JupyterHub:
authenticator_class: canvasauthenticator.CanvasOAuthenticator

# Return 424, not 503, when requests go to a stopped server
# Keeps our 503 error graphs clearer
use_legacy_stopped_server_status_code: false
CanvasOAuthenticator:
canvas_url: https://bcourses.berkeley.edu/
strip_email_domain: berkeley.edu
Expand All @@ -141,7 +143,7 @@ jupyterhub:
# Generated by chartpress
image:
name: gcr.io/ucb-datahub-2018/jupyterhub-hub
tag: '0.0.1-n4572.h439e1e0e'
tag: '0.0.1-n4584.h0d3ac306'
networkPolicy:
enabled: true
ingress:
Expand Down
2 changes: 1 addition & 1 deletion images/hub/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN apt update > /dev/null && apt install --yes npm > /dev/null

# Brings in https://github.com/jupyterhub/jupyterhub/pull/3579
# and https://github.com/jupyterhub/jupyterhub/pull/3639
RUN python3 -m pip install -U git+https://github.com/jupyterhub/jupyterhub.git@69a1e97fbee1711e3fdb5fd795e349a4eb395060
RUN python3 -m pip install --no-cache --force-reinstall --upgrade git+https://github.com/jupyterhub/jupyterhub.git@69a1e97fbee1711e3fdb5fd795e349a4eb395060

COPY canvasauthenticator /srv/canvasauthenticator
RUN python3 -m pip install --no-cache /srv/canvasauthenticator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,3 @@ async def pre_spawn_start(self, user, spawner):
for k in ['login_id', 'name', 'sortable_name', 'primary_email']:
if k in auth_state['oauth_user']:
spawner.environment[f"OAUTH2_{k.upper()}"] = auth_state['oauth_user'][k]

# pass canvas courses to the environment
if 'courses' in auth_state:
spawner.environment["CANVAS_COURSES"] = auth_state['courses']

0 comments on commit 371eefe

Please sign in to comment.