Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to jupyterhub 3.0.0-beta.1, test k8s 1.27, require k8s 1.23+ #1714

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
k3s-channel:
# Available channels: https://github.com/k3s-io/k3s/blob/HEAD/channel.yaml
# Don't use "latest", instead bump it using a PR so we know when a new version breaks BinderHub
- v1.26
- v1.27
test:
- main
- auth
Expand All @@ -69,22 +69,22 @@ jobs:
# which isn't documented anywhere, but is currently at 3.5.0. We also
# test with the latest k8s and helm versions.
#
- k3s-channel: v1.21
- k3s-channel: v1.23
helm-version: v3.5.0
test: helm
test-variation: dind
local-chart-extra-args: >-
--values testing/k8s-binder-k8s-hub/binderhub-chart+dind.yaml
--set config.BinderHub.image_prefix=$REGISTRY_HOST/test/
--set registry.url=http://$REGISTRY_HOST
- k3s-channel: v1.26
- k3s-channel: v1.27
test: helm
test-variation: pink
local-chart-extra-args: >-
--values testing/k8s-binder-k8s-hub/binderhub-chart+pink.yaml
--set config.BinderHub.image_prefix=$REGISTRY_HOST/test/
--set registry.url=http://$REGISTRY_HOST
- k3s-channel: v1.26
- k3s-channel: v1.27
test: helm
test-variation: upgrade
# upgrade-from represents a release channel, see: https://jupyterhub.github.io/helm-chart/info.json
Expand Down
17 changes: 12 additions & 5 deletions binderhub/tests/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,22 @@ async def test_auth(app, path, authenticated, use_session):
# not authenticated, we should get the page and be done
assert r.url == url
return
assert "/hub/login" in urlparse(r.url).path

# acquire a _xsrf cookie to pass in the post request we are about to make
login_url = f"{app.hub_url}/hub/login"
r2 = await async_requests.get(login_url)
assert r2.status_code == 200, f"{r2.status_code} {r2.url}"
_xsrf_cookie = r2.cookies.get("_xsrf", path="/hub/")
assert _xsrf_cookie

# submit login form
assert "/hub/login" in urlparse(r.url).path
r2 = await async_requests.post(
r.url, data={"username": "dummy", "password": "dummy"}
r3 = await async_requests.post(
r.url, data={"username": "dummy", "password": "dummy", "_xsrf": _xsrf_cookie}
)
assert r2.status_code == 200, f"{r2.status_code} {r.url}"
assert r3.status_code == 200, f"{r3.status_code} {r3.url}"
# verify that we landed at the destination after auth
assert r2.url == url
assert r3.url == url


@skip_remote
Expand Down
4 changes: 2 additions & 2 deletions helm-chart/binderhub/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies:
# and run "./dependencies freeze --upgrade".
#
- name: jupyterhub
version: "2.0.0"
version: "3.0.0-alpha.1"
repository: "https://jupyterhub.github.io/helm-chart"
description: |-
BinderHub is like a JupyterHub that automatically builds environments for the
Expand All @@ -22,7 +22,7 @@ keywords: [jupyter, jupyterhub, binderhub]
home: https://binderhub.readthedocs.io/en/latest/
sources: [https://github.com/jupyterhub/binderhub]
icon: https://jupyterhub.github.io/helm-chart/images/hublogo.svg
kubeVersion: ">=1.21.0-0"
kubeVersion: ">=1.23.0-0"
maintainers:
# Since it is a requirement of Artifact Hub to have specific maintainers
# listed, we have added some below, but in practice the entire JupyterHub team
Expand Down
2 changes: 1 addition & 1 deletion helm-chart/images/binderhub/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ google-cloud-logging==3.*
# jupyterhub's major version should be matched with the JupyterHub Helm chart's
# used version of JupyterHub.
#
jupyterhub==3.*
jupyterhub==4.*

# https://github.com/kubernetes-client/python
kubernetes==9.*
Expand Down
2 changes: 1 addition & 1 deletion helm-chart/images/binderhub/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jsonschema==4.17.3
# jupyter-telemetry
jupyter-telemetry==0.1.0
# via jupyterhub
jupyterhub==3.1.1
jupyterhub==4.0.0
consideRatio marked this conversation as resolved.
Show resolved Hide resolved
# via
# -r helm-chart/images/binderhub/../../../requirements.txt
# -r helm-chart/images/binderhub/requirements.in
Expand Down