Skip to content

Commit 2dcfaae

Browse files
authored
Merge pull request #1714 from consideRatio/pr/update-to-z2jh-3.0.0-alpha.1
Update to jupyterhub 3.0.0-alpha.1, test k8s 1.27, require k8s 1.23+
2 parents 8fd8613 + a81862c commit 2dcfaae

File tree

6 files changed

+30
-19
lines changed

6 files changed

+30
-19
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
k3s-channel:
5858
# Available channels: https://github.com/k3s-io/k3s/blob/HEAD/channel.yaml
5959
# Don't use "latest", instead bump it using a PR so we know when a new version breaks BinderHub
60-
- v1.26
60+
- v1.27
6161
test:
6262
- main
6363
- auth
@@ -69,22 +69,22 @@ jobs:
6969
# which isn't documented anywhere, but is currently at 3.5.0. We also
7070
# test with the latest k8s and helm versions.
7171
#
72-
- k3s-channel: v1.21
72+
- k3s-channel: v1.23
7373
helm-version: v3.5.0
7474
test: helm
7575
test-variation: dind
7676
local-chart-extra-args: >-
7777
--values testing/k8s-binder-k8s-hub/binderhub-chart+dind.yaml
7878
--set config.BinderHub.image_prefix=$REGISTRY_HOST/test/
7979
--set registry.url=http://$REGISTRY_HOST
80-
- k3s-channel: v1.26
80+
- k3s-channel: v1.27
8181
test: helm
8282
test-variation: pink
8383
local-chart-extra-args: >-
8484
--values testing/k8s-binder-k8s-hub/binderhub-chart+pink.yaml
8585
--set config.BinderHub.image_prefix=$REGISTRY_HOST/test/
8686
--set registry.url=http://$REGISTRY_HOST
87-
- k3s-channel: v1.26
87+
- k3s-channel: v1.27
8888
test: helm
8989
test-variation: upgrade
9090
# upgrade-from represents a release channel, see: https://jupyterhub.github.io/helm-chart/info.json

CHANGES.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,12 @@ If you have custom configuration you should add it using the `extraConfig` Helm
2727
- `cors.allowedOrigin` ➡️ `config.BinderHub.cors_allow_origin`
2828
- `jupyterhub.custom.cors.allowedOrigin` ➡️ `jupyterhub.hub.config.BinderSpawner.cors_allow_origin`
2929

30-
### Kubernetes 1.21+ is required
30+
### Kubernetes 1.23+ is required
3131

3232
Older versions of Kubernetes are no longer supported
3333
[#1493](https://github.com/jupyterhub/binderhub/pull/1493)
34-
[#1609](https://github.com/jupyterhub/binderhub/pull/1609).
34+
[#1609](https://github.com/jupyterhub/binderhub/pull/1609)
35+
[#1714](https://github.com/jupyterhub/binderhub/pull/1714).
3536

3637
### `dind.enabled` replaced by `imageBuilderType: dind`
3738

@@ -75,11 +76,14 @@ The following build configuration properties should be set using Traitlets in th
7576
If you have subclassed `binderhub.build.Build` you must update your subclass (including `__init__()` if defined) to inherit from `binderhub.build.KubernetesBuildExecutor`.
7677
The behaviour of the class is otherwise unchanged.
7778

78-
### Z2JH 2 and JupyterHub 3
79+
### Z2JH 3 and JupyterHub 4
7980

80-
The Z2JH dependency has been updated to 2.0.0 which includes JupyterHub 3
81-
[#1544](https://github.com/jupyterhub/binderhub/pull/1544).
82-
See https://z2jh.jupyter.org/en/stable/administrator/upgrading/upgrade-1-to-2.html for breaking changes.
81+
The Z2JH dependency has been updated from 1.2.0 to 3.0.0 which includes JupyterHub 4
82+
[#1544](https://github.com/jupyterhub/binderhub/pull/1544) [#1714](https://github.com/jupyterhub/binderhub/pull/1714).
83+
84+
See [Z2JH's upgrade notes](https://z2jh.jupyter.org/en/stable/administrator/upgrading/index.html)
85+
and [changelog](https://z2jh.jupyter.org/en/latest/changelog.html) for breaking
86+
changes in the upgrade from 1.2.0 to 2.0.0, and then from 2.0.0 to 3.0.0.
8387

8488
### Python versions have been increased
8589

binderhub/tests/test_auth.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,22 @@ async def test_auth(app, path, authenticated, use_session):
4444
# not authenticated, we should get the page and be done
4545
assert r.url == url
4646
return
47+
assert "/hub/login" in urlparse(r.url).path
48+
49+
# acquire a _xsrf cookie to pass in the post request we are about to make
50+
login_url = f"{app.hub_url}/hub/login"
51+
r2 = await async_requests.get(login_url)
52+
assert r2.status_code == 200, f"{r2.status_code} {r2.url}"
53+
_xsrf_cookie = r2.cookies.get("_xsrf", path="/hub/")
54+
assert _xsrf_cookie
4755

4856
# submit login form
49-
assert "/hub/login" in urlparse(r.url).path
50-
r2 = await async_requests.post(
51-
r.url, data={"username": "dummy", "password": "dummy"}
57+
r3 = await async_requests.post(
58+
r.url, data={"username": "dummy", "password": "dummy", "_xsrf": _xsrf_cookie}
5259
)
53-
assert r2.status_code == 200, f"{r2.status_code} {r.url}"
60+
assert r3.status_code == 200, f"{r3.status_code} {r3.url}"
5461
# verify that we landed at the destination after auth
55-
assert r2.url == url
62+
assert r3.url == url
5663

5764

5865
@skip_remote

helm-chart/binderhub/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dependencies:
1212
# and run "./dependencies freeze --upgrade".
1313
#
1414
- name: jupyterhub
15-
version: "2.0.0"
15+
version: "3.0.0-beta.1"
1616
repository: "https://jupyterhub.github.io/helm-chart"
1717
description: |-
1818
BinderHub is like a JupyterHub that automatically builds environments for the
@@ -22,7 +22,7 @@ keywords: [jupyter, jupyterhub, binderhub]
2222
home: https://binderhub.readthedocs.io/en/latest/
2323
sources: [https://github.com/jupyterhub/binderhub]
2424
icon: https://jupyterhub.github.io/helm-chart/images/hublogo.svg
25-
kubeVersion: ">=1.21.0-0"
25+
kubeVersion: ">=1.23.0-0"
2626
maintainers:
2727
# Since it is a requirement of Artifact Hub to have specific maintainers
2828
# listed, we have added some below, but in practice the entire JupyterHub team

helm-chart/images/binderhub/requirements.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ google-cloud-logging==3.*
1010
# jupyterhub's major version should be matched with the JupyterHub Helm chart's
1111
# used version of JupyterHub.
1212
#
13-
jupyterhub==3.*
13+
jupyterhub==4.*
1414

1515
# https://github.com/kubernetes-client/python
1616
kubernetes==9.*

helm-chart/images/binderhub/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jsonschema==4.17.3
7676
# jupyter-telemetry
7777
jupyter-telemetry==0.1.0
7878
# via jupyterhub
79-
jupyterhub==3.1.1
79+
jupyterhub==4.0.1
8080
# via
8181
# -r helm-chart/images/binderhub/../../../requirements.txt
8282
# -r helm-chart/images/binderhub/requirements.in

0 commit comments

Comments
 (0)