Skip to content

Commit fabaae9

Browse files
authored
Merge pull request #3565 from consideRatio/pr/major-bump
Pin and automate doing isolated bumps of hub image dependencies' major versions
2 parents dd58e99 + 70e33c1 commit fabaae9

File tree

10 files changed

+91
-78
lines changed

10 files changed

+91
-78
lines changed

.github/dependabot.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,15 @@ updates:
1515
interval: monthly
1616
time: "05:00"
1717
timezone: Etc/UTC
18+
- package-ecosystem: pip
19+
directory: /images/hub/unfrozen
20+
labels: [breaking]
21+
groups:
22+
major-versions:
23+
update-types: [major]
24+
exclude-patterns:
25+
- jupyterhub # bumped by other automation
26+
schedule:
27+
interval: daily
28+
time: "05:00"
29+
timezone: Etc/UTC

.github/workflows/watch-dependencies.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# - Watch multiple images tags referenced in values.yaml to match the latest
55
# image tag.
66
#
7-
# - Watch the jupyterhub pinning in images/*/requirements.in to match the
7+
# - Watch the jupyterhub pinning in images/*/unfrozen/requirements.txt to match the
88
# latest jupyterhub version available on PyPI, and if doing this, also
99
# refreeze images/*/requirements.txt.
1010
#
@@ -20,7 +20,7 @@ name: Watch dependencies
2020
on:
2121
push:
2222
paths:
23-
- "images/*/requirements.in"
23+
- "images/*/unfrozen/requirements.txt"
2424
- ".github/workflows/watch-dependencies.yaml"
2525
branches: ["main"]
2626
schedule:
@@ -142,10 +142,10 @@ jobs:
142142
- name: Install Python dependencies
143143
run: pip install packaging requests
144144

145-
- name: Get images/hub/requirements.in pinned version of jupyterhub
145+
- name: Get images/hub/unfrozen/requirements.txt pinned version of jupyterhub
146146
id: local
147147
run: |
148-
local_version=$(cat images/hub/requirements.in | grep 'jupyterhub==' | sed 's/jupyterhub==//')
148+
local_version=$(cat images/hub/unfrozen/requirements.txt | grep 'jupyterhub==' | sed 's/jupyterhub==//')
149149
echo "version=$local_version" >> $GITHUB_OUTPUT
150150
151151
- name: Get latest version of jupyterhub
@@ -168,11 +168,11 @@ jobs:
168168
if: steps.local.outputs.version != steps.latest.outputs.version
169169
run: |
170170
for img in hub singleuser-sample; do
171-
sed --in-place 's/jupyterhub==${{ steps.local.outputs.version }}/jupyterhub==${{ steps.latest.outputs.version }}/g' images/$img/requirements.in
171+
sed --in-place 's/jupyterhub==${{ steps.local.outputs.version }}/jupyterhub==${{ steps.latest.outputs.version }}/g' images/$img/unfrozen/requirements.txt
172172
done
173173
sed --in-place 's/appVersion: "${{ steps.local.outputs.version }}"/appVersion: "${{ steps.latest.outputs.version }}"/g' jupyterhub/Chart.yaml
174174
175-
- name: Refreeze images/*/requirements.txt based on images/*/requirements.in
175+
- name: Refreeze images/*/requirements.txt based on images/*/unfrozen/requirements.txt
176176
if: steps.local.outputs.version != steps.latest.outputs.version
177177
run: ci/refreeze
178178

@@ -208,7 +208,7 @@ jobs:
208208
steps:
209209
- uses: actions/checkout@v4
210210

211-
- name: Refreeze images/*/requirements.txt based on images/*/requirements.in
211+
- name: Refreeze images/*/requirements.txt based on images/*/unfrozen/requirements.txt
212212
run: ci/refreeze
213213

214214
- name: git diff
@@ -227,4 +227,4 @@ jobs:
227227
title: "hub image: refreeze requirements.txt"
228228
body: >-
229229
The hub image's requirements.txt has been refrozen based on
230-
requirements.in.
230+
unfrozen/requirements.txt.

ci/refreeze

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ for img in ${IMAGES}; do
1414
--workdir=/io \
1515
--user=root \
1616
python:3.12-bookworm \
17-
sh -c 'pip install pip-tools==7.* && pip-compile --allow-unsafe --strip-extras --upgrade'
17+
sh -c 'pip install pip-tools==7.* && pip-compile --allow-unsafe --strip-extras --upgrade --output-file=requirements.txt unfrozen/requirements.txt'
1818
popd
1919
done

images/hub/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
The Dockerfile in this folder is built by
44
[chartpress](https://github.com/jupyterhub/chartpress#readme), using the
55
requirements.txt file. The requirements.txt file is updated based on the
6-
requirements.in file using [`pip-compile`](https://pip-tools.readthedocs.io).
6+
unfrozen/requirements.txt file using [`pip-compile`](https://pip-tools.readthedocs.io).
77

88
## How to update requirements.txt
99

images/hub/requirements.in

Lines changed: 0 additions & 32 deletions
This file was deleted.

images/hub/requirements.txt

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -81,29 +81,29 @@ jupyter-events==0.10.0
8181
# via jupyterhub
8282
jupyterhub==5.2.1
8383
# via
84-
# -r requirements.in
84+
# -r unfrozen/requirements.txt
8585
# jupyterhub-firstuseauthenticator
8686
# jupyterhub-kubespawner
8787
# jupyterhub-ldapauthenticator
8888
# jupyterhub-ltiauthenticator
8989
# jupyterhub-nativeauthenticator
9090
# oauthenticator
9191
jupyterhub-firstuseauthenticator==1.1.0
92-
# via -r requirements.in
92+
# via -r unfrozen/requirements.txt
9393
jupyterhub-hmacauthenticator==1.0
94-
# via -r requirements.in
94+
# via -r unfrozen/requirements.txt
9595
jupyterhub-idle-culler==1.4.0
96-
# via -r requirements.in
96+
# via -r unfrozen/requirements.txt
9797
jupyterhub-kubespawner==7.0.0
98-
# via -r requirements.in
98+
# via -r unfrozen/requirements.txt
9999
jupyterhub-ldapauthenticator==2.0.1
100-
# via -r requirements.in
100+
# via -r unfrozen/requirements.txt
101101
jupyterhub-ltiauthenticator==1.6.2
102-
# via -r requirements.in
102+
# via -r unfrozen/requirements.txt
103103
jupyterhub-nativeauthenticator==1.3.0
104-
# via -r requirements.in
104+
# via -r unfrozen/requirements.txt
105105
jupyterhub-tmpauthenticator==1.0.0
106-
# via -r requirements.in
106+
# via -r unfrozen/requirements.txt
107107
kubernetes-asyncio==31.1.0
108108
# via jupyterhub-kubespawner
109109
ldap3==2.9.1
@@ -121,7 +121,7 @@ multidict==6.1.0
121121
mwoauth==0.4.0
122122
# via oauthenticator
123123
oauthenticator==17.1.0
124-
# via -r requirements.in
124+
# via -r unfrozen/requirements.txt
125125
oauthlib==3.2.2
126126
# via
127127
# jupyterhub
@@ -141,7 +141,7 @@ prometheus-client==0.21.0
141141
propcache==0.2.0
142142
# via yarl
143143
psycopg2==2.9.10
144-
# via -r requirements.in
144+
# via -r unfrozen/requirements.txt
145145
pyasn1==0.6.1
146146
# via
147147
# ldap3
@@ -152,7 +152,7 @@ pyasn1-modules==0.4.1
152152
pycparser==2.22
153153
# via cffi
154154
pycurl==7.45.3
155-
# via -r requirements.in
155+
# via -r unfrozen/requirements.txt
156156
pydantic==2.9.2
157157
# via jupyterhub
158158
pydantic-core==2.23.4
@@ -163,7 +163,7 @@ pyjwt==2.9.0
163163
# mwoauth
164164
# oauthenticator
165165
pymysql==1.1.1
166-
# via -r requirements.in
166+
# via -r unfrozen/requirements.txt
167167
python-dateutil==2.9.0.post0
168168
# via
169169
# arrow
@@ -224,9 +224,9 @@ sqlalchemy==2.0.36
224224
# jupyterhub
225225
# sqlalchemy-cockroachdb
226226
sqlalchemy-cockroachdb==2.0.2
227-
# via -r requirements.in
227+
# via -r unfrozen/requirements.txt
228228
statsd==4.0.1
229-
# via -r requirements.in
229+
# via -r unfrozen/requirements.txt
230230
text-unidecode==1.3
231231
# via python-slugify
232232
tornado==6.4.1

images/hub/unfrozen/requirements.txt

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# This file is the input to requirements.txt, which is a frozen version of this.
2+
#
3+
# To update:
4+
# - the jupyterhub version or the frozen requirements.txt file, use the
5+
# "Run workflow" button at https://github.com/jupyterhub/zero-to-jupyterhub-k8s/actions/workflows/watch-dependencies.yaml.
6+
# - the major version pins in this file, trigger dependabot to run via
7+
# https://github.com/jupyterhub/zero-to-jupyterhub-k8s/network/updates
8+
#
9+
10+
# JupyterHub itself
11+
jupyterhub==5.2.1
12+
13+
# JupyterHub Spawner, kubernetes specific
14+
jupyterhub-kubespawner==7.*
15+
16+
# JupyterHub Authenticator choices
17+
jupyterhub-firstuseauthenticator==1.*
18+
jupyterhub-hmacauthenticator==1.*
19+
jupyterhub-ldapauthenticator==2.*
20+
jupyterhub-ltiauthenticator==1.*
21+
jupyterhub-nativeauthenticator==1.*
22+
jupyterhub-tmpauthenticator==1.*
23+
oauthenticator[googlegroups,mediawiki]==17.*
24+
25+
# JupyterHub service shutting servers after a period of inactivity
26+
jupyterhub-idle-culler==1.*
27+
28+
# Other optional dependencies for additional features
29+
pymysql # mysql
30+
psycopg2 # postgres
31+
pycurl # internal http requests handle more load with pycurl
32+
sqlalchemy-cockroachdb # cocroachdb
33+
statsd # statsd metrics collection (TODO: remove soon, since folks use prometheus)

images/singleuser-sample/requirements.in

Lines changed: 0 additions & 17 deletions
This file was deleted.

images/singleuser-sample/requirements.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ jupyter-server==2.14.2
136136
jupyter-server-terminals==0.5.3
137137
# via jupyter-server
138138
jupyterhub==5.2.1
139-
# via -r requirements.in
139+
# via -r unfrozen/requirements.txt
140140
jupyterlab==4.3.0
141-
# via -r requirements.in
141+
# via -r unfrozen/requirements.txt
142142
jupyterlab-pygments==0.3.0
143143
# via nbconvert
144144
jupyterlab-server==2.27.3
@@ -157,7 +157,7 @@ matplotlib-inline==0.1.7
157157
mistune==3.0.2
158158
# via nbconvert
159159
nbclassic==1.1.0
160-
# via -r requirements.in
160+
# via -r unfrozen/requirements.txt
161161
nbclient==0.10.0
162162
# via nbconvert
163163
nbconvert==7.16.4
@@ -168,7 +168,7 @@ nbformat==5.10.4
168168
# nbclient
169169
# nbconvert
170170
nbgitpuller==1.2.1
171-
# via -r requirements.in
171+
# via -r unfrozen/requirements.txt
172172
nest-asyncio==1.6.0
173173
# via
174174
# ipykernel
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# This file is the input to requirements.txt, which is a frozen version of this.
2+
#
3+
# To update:
4+
# - the jupyterhub version or the frozen requirements.txt file, use the
5+
# "Run workflow" button at https://github.com/jupyterhub/zero-to-jupyterhub-k8s/actions/workflows/watch-dependencies.yaml.
6+
#
7+
8+
# JupyterHub itself, update this version pinning by running the workflow
9+
# mentioned above.
10+
jupyterhub==5.2.1
11+
12+
# UI
13+
jupyterlab
14+
nbclassic
15+
16+
# plugins
17+
nbgitpuller

0 commit comments

Comments
 (0)