Skip to content

Commit 3b55a37

Browse files
authored
Merge pull request #1536 from consideRatio/pr/add-image-ci
2 parents 566e800 + 7f79ee6 commit 3b55a37

File tree

5 files changed

+130
-82
lines changed

5 files changed

+130
-82
lines changed

.github/workflows/watch-dependencies.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,35 @@ jobs:
8787
body: >-
8888
A new ${{ matrix.repository }} image version has been detected, version
8989
`${{ steps.latest.outputs.tag }}`.
90+
91+
refreeze-dockerfile-requirements-txt:
92+
# Don't run this job on forks, but also not on the daily schedule to reduce
93+
# noise. If we could run this weekly that would be reasonable, but updating
94+
# these dependencies every day is too much noise.
95+
#
96+
if: github.repository == 'jupyterhub/binderhub' && github.event_name != 'schedule'
97+
runs-on: ubuntu-latest
98+
99+
steps:
100+
- uses: actions/checkout@v3
101+
102+
- name: Refreeze helm-chart/images/binderhub/requirements.txt based on requirements.in
103+
run: ci/refreeze
104+
105+
- name: git diff
106+
run: git --no-pager diff --color=always
107+
108+
# ref: https://github.com/peter-evans/create-pull-request
109+
- name: Create a PR
110+
uses: peter-evans/create-pull-request@v4
111+
with:
112+
token: "${{ secrets.jupyterhub_bot_pat }}"
113+
author: JupyterHub Bot Account <[email protected]>
114+
committer: JupyterHub Bot Account <[email protected]>
115+
branch: update-image-requirements
116+
labels: dependencies
117+
commit-message: "binderhub image: refreeze requirements.txt"
118+
title: "binderhub image: refreeze requirements.txt"
119+
body: >-
120+
The binderhub image's requirements.txt has been refrozen based on
121+
requirements.in.

ci/refreeze

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
set -xeuo pipefail
3+
4+
# Because `pip-compile` resolves `requirements.txt` with the current
5+
# Python for the current platform, it should be run on the same Python
6+
# version and platform as our Dockerfile.
7+
8+
docker run --rm \
9+
--env=CUSTOM_COMPILE_COMMAND='Use the "Run workflow" button at https://github.com/jupyterhub/binderhub/actions/workflows/watch-dependencies.yaml' \
10+
--volume="$PWD:/io" \
11+
--workdir=/io \
12+
--user=root \
13+
python:3.9-bullseye \
14+
sh -c 'pip install pip-tools==6.* && pip-compile --upgrade helm-chart/images/binderhub/requirements.in'

helm-chart/images/binderhub/README.md

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,33 +7,5 @@ Built with [chartpress][].
77

88
## Updating requirements.txt
99

10-
Dependencies are specified in `requirements.in` and `requirements.txt`,
11-
which are managed by [`pip-compile`][].
12-
13-
[pip-compile]: https://pip-tools.readthedocs.io
14-
15-
`requirements.in` contains our loosely specified direct requirements.
16-
This is the file we edit to change what should be in the image.
17-
18-
`requirements.txt` is the fully pinned exact set of packages and versions.
19-
This file is generated by `pip-compile` and should not be edited.
20-
21-
Because `pip-compile` resolves `requirements.txt` with the current Python for the current platform,
22-
it must be run on the same Python version and platform as our Dockerfile.
23-
This can be done from anywhere, by running `pip-compile` in docker from the top-level of the binderhub repo:
24-
25-
```shell
26-
docker run --rm \
27-
--env=CUSTOM_COMPILE_COMMAND="see README.md" \
28-
--volume=$PWD:/io \
29-
--workdir=/io/helm-chart/images/binderhub \
30-
--user=root \
31-
python:3.9-slim-bullseye \
32-
sh -c 'pip install pip-tools==6.* && pip-compile --upgrade'
33-
```
34-
35-
or you can just run `CUSTOM_COMPILE_COMMAND="see README.md" pip-compile --upgrade` if you are already using Python 3.9 on linux.
36-
37-
See the [pip-compile docs][updating] for options to control the upgrading of packages.
38-
39-
[updating]: https://pip-tools.readthedocs.io/en/latest/#updating-requirements
10+
Use the "Run workflow" button at
11+
https://github.com/jupyterhub/binderhub/actions/workflows/watch-dependencies.yaml.

helm-chart/images/binderhub/requirements.in

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
1-
# FIXME: google-cloud-logging was pinned to avoid introducing a potentially
2-
# breaking change as major version 2 was recently released. See:
3-
# https://github.com/googleapis/python-logging/blob/master/UPGRADING.md
4-
google-cloud-logging==1.*
1+
# google-cloud-logging is an optional dependency used by mybinder.org-deploy at
2+
# https://github.com/jupyterhub/mybinder.org-deploy/blob/e47021fe/mybinder/values.yaml#L193-L216.
3+
#
4+
# We pin it to avoid introducing a potentially breaking change as major versions
5+
# are released. See:
6+
# https://github.com/googleapis/python-logging/blob/master/UPGRADING.md
7+
#
8+
google-cloud-logging==3.*
59

6-
# jupyterhub is pinned to match the JupyterHub Helm chart's
7-
# version of jupyterhub
8-
jupyterhub==1.5.*
10+
# jupyterhub's major version should be matched with the JupyterHub Helm chart's
11+
# used version of JupyterHub.
12+
#
13+
jupyterhub==1.*
914

15+
# https://github.com/kubernetes-client/python
1016
kubernetes==9.*
1117

1218
# binderhub's dependencies

helm-chart/images/binderhub/requirements.txt

Lines changed: 69 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -2,100 +2,121 @@
22
# This file is autogenerated by pip-compile with python 3.9
33
# To update, run:
44
#
5-
# see README.md
5+
# Use the "Run workflow" button at https://github.com/jupyterhub/binderhub/actions/workflows/watch-dependencies.yaml
66
#
7-
alembic==1.7.7
7+
alembic==1.8.1
88
# via jupyterhub
99
async-generator==1.10
1010
# via jupyterhub
11-
attrs==21.4.0
11+
attrs==22.1.0
1212
# via jsonschema
13-
cachetools==5.1.0
13+
cachetools==5.2.0
1414
# via google-auth
15-
certifi==2022.5.18.1
15+
certifi==2022.9.14
1616
# via
1717
# kubernetes
1818
# requests
1919
certipy==0.1.3
2020
# via jupyterhub
21-
cffi==1.15.0
21+
cffi==1.15.1
2222
# via cryptography
23-
charset-normalizer==2.0.12
23+
charset-normalizer==2.1.1
2424
# via requests
25-
cryptography==37.0.2
25+
cryptography==38.0.1
2626
# via pyopenssl
27-
docker==5.0.3
28-
# via -r ../../../requirements.txt
27+
docker==6.0.0
28+
# via -r helm-chart/images/binderhub/../../../requirements.txt
2929
entrypoints==0.4
3030
# via jupyterhub
3131
escapism==1.0.1
32-
# via -r ../../../requirements.txt
33-
google-api-core[grpc]==2.8.0
32+
# via -r helm-chart/images/binderhub/../../../requirements.txt
33+
google-api-core[grpc]==2.10.1
3434
# via
35+
# google-cloud-appengine-logging
3536
# google-cloud-core
3637
# google-cloud-logging
37-
google-auth==2.6.6
38+
google-auth==2.11.1
3839
# via
3940
# google-api-core
4041
# google-cloud-core
4142
# kubernetes
42-
google-cloud-core==2.3.0
43+
google-cloud-appengine-logging==1.1.4
4344
# via google-cloud-logging
44-
google-cloud-logging==1.15.2
45-
# via -r requirements.in
46-
googleapis-common-protos==1.56.1
45+
google-cloud-audit-log==0.2.4
46+
# via google-cloud-logging
47+
google-cloud-core==2.3.2
48+
# via google-cloud-logging
49+
google-cloud-logging==3.2.2
50+
# via -r helm-chart/images/binderhub/requirements.in
51+
googleapis-common-protos[grpc]==1.56.4
4752
# via
4853
# google-api-core
54+
# google-cloud-audit-log
55+
# grpc-google-iam-v1
4956
# grpcio-status
50-
greenlet==1.1.2
57+
greenlet==1.1.3
5158
# via sqlalchemy
52-
grpcio==1.46.3
59+
grpc-google-iam-v1==0.12.4
60+
# via google-cloud-logging
61+
grpcio==1.49.1
5362
# via
5463
# google-api-core
64+
# googleapis-common-protos
65+
# grpc-google-iam-v1
5566
# grpcio-status
56-
grpcio-status==1.46.3
67+
grpcio-status==1.49.1
5768
# via google-api-core
58-
idna==3.3
69+
idna==3.4
5970
# via requests
6071
jinja2==3.1.2
6172
# via
62-
# -r ../../../requirements.txt
73+
# -r helm-chart/images/binderhub/../../../requirements.txt
6374
# jupyterhub
64-
jsonschema==4.5.1
75+
jsonschema==4.16.0
6576
# via
66-
# -r ../../../requirements.txt
77+
# -r helm-chart/images/binderhub/../../../requirements.txt
6778
# jupyter-telemetry
6879
jupyter-telemetry==0.1.0
6980
# via jupyterhub
7081
jupyterhub==1.5.0
7182
# via
72-
# -r ../../../requirements.txt
73-
# -r requirements.in
83+
# -r helm-chart/images/binderhub/../../../requirements.txt
84+
# -r helm-chart/images/binderhub/requirements.in
7485
kubernetes==9.0.1
7586
# via
76-
# -r ../../../requirements.txt
77-
# -r requirements.in
78-
mako==1.2.0
87+
# -r helm-chart/images/binderhub/../../../requirements.txt
88+
# -r helm-chart/images/binderhub/requirements.in
89+
mako==1.2.3
7990
# via alembic
8091
markupsafe==2.1.1
8192
# via
8293
# jinja2
8394
# mako
84-
oauthlib==3.2.0
95+
oauthlib==3.2.1
8596
# via
8697
# jupyterhub
8798
# requests-oauthlib
99+
packaging==21.3
100+
# via docker
88101
pamela==1.0.0
89102
# via jupyterhub
90103
prometheus-client==0.14.1
91104
# via
92-
# -r ../../../requirements.txt
105+
# -r helm-chart/images/binderhub/../../../requirements.txt
93106
# jupyterhub
94-
protobuf==3.20.1
107+
proto-plus==1.22.1
108+
# via
109+
# google-cloud-appengine-logging
110+
# google-cloud-logging
111+
protobuf==4.21.6
95112
# via
96113
# google-api-core
114+
# google-cloud-appengine-logging
115+
# google-cloud-audit-log
116+
# google-cloud-logging
97117
# googleapis-common-protos
98118
# grpcio-status
119+
# proto-plus
99120
pyasn1==0.4.8
100121
# via
101122
# pyasn1-modules
@@ -104,23 +125,25 @@ pyasn1-modules==0.2.8
104125
# via google-auth
105126
pycparser==2.21
106127
# via cffi
107-
pyjwt==2.4.0
108-
# via -r ../../../requirements.txt
128+
pyjwt==2.5.0
129+
# via -r helm-chart/images/binderhub/../../../requirements.txt
109130
pyopenssl==22.0.0
110131
# via certipy
132+
pyparsing==3.0.9
133+
# via packaging
111134
pyrsistent==0.18.1
112135
# via jsonschema
113136
python-dateutil==2.8.2
114137
# via
115138
# jupyterhub
116139
# kubernetes
117-
python-json-logger==2.0.2
140+
python-json-logger==2.0.4
118141
# via
119-
# -r ../../../requirements.txt
142+
# -r helm-chart/images/binderhub/../../../requirements.txt
120143
# jupyter-telemetry
121144
pyyaml==6.0
122145
# via kubernetes
123-
requests==2.27.1
146+
requests==2.28.1
124147
# via
125148
# docker
126149
# google-api-core
@@ -129,7 +152,7 @@ requests==2.27.1
129152
# requests-oauthlib
130153
requests-oauthlib==1.3.1
131154
# via kubernetes
132-
rsa==4.8
155+
rsa==4.9
133156
# via google-auth
134157
ruamel-yaml==0.17.21
135158
# via jupyter-telemetry
@@ -141,24 +164,25 @@ six==1.16.0
141164
# grpcio
142165
# kubernetes
143166
# python-dateutil
144-
sqlalchemy==1.4.36
167+
sqlalchemy==1.4.41
145168
# via
146169
# alembic
147170
# jupyterhub
148-
tornado==6.1
171+
tornado==6.2
149172
# via
150-
# -r ../../../requirements.txt
173+
# -r helm-chart/images/binderhub/../../../requirements.txt
151174
# jupyterhub
152-
traitlets==5.2.1.post0
175+
traitlets==5.4.0
153176
# via
154-
# -r ../../../requirements.txt
177+
# -r helm-chart/images/binderhub/../../../requirements.txt
155178
# jupyter-telemetry
156179
# jupyterhub
157-
urllib3==1.26.9
180+
urllib3==1.26.12
158181
# via
182+
# docker
159183
# kubernetes
160184
# requests
161-
websocket-client==1.3.2
185+
websocket-client==1.4.1
162186
# via
163187
# docker
164188
# kubernetes

0 commit comments

Comments
 (0)