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

DM-41528: Add Python 3.10 tests for Hub plugins #212

Merged
merged 2 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
39 changes: 34 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,35 @@ jobs:
- name: Run nox
run: "nox -s typing test"

# The controller requires Python 3.11, but the modules we add to the Hub
# have to run with Python 3.10 since that's what the JupyterHub image uses.
# Run a separate matrix to test those modules with only the versions of
# Python supported for the Hub but not supported for the controller.
test-hub:
runs-on: ubuntu-latest
timeout-minutes: 15

strategy:
matrix:
python:
- "3.10"

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}

- name: Install nox
run: |
pip install --upgrade pip
pip install --upgrade nox

- name: Run nox
run: "nox -s test-hub"

docs:
runs-on: ubuntu-latest
timeout-minutes: 15
Expand Down Expand Up @@ -105,7 +134,7 @@ jobs:

build:
runs-on: ubuntu-latest
needs: [lint, test]
needs: [lint, test, test-hub]
timeout-minutes: 15

# Only do Docker builds of tagged releases and pull requests from ticket
Expand All @@ -124,23 +153,23 @@ jobs:
fetch-depth: 0

- uses: lsst-sqre/build-and-push-to-ghcr@v1
id: build1
id: build-controller
with:
dockerfile: Dockerfile.controller
image: ${{ github.repository }}-controller
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Report result
run: |
echo Pushed ghcr.io/${{ github.repository }}-controller:${{ steps.build1.outputs.tag }}
echo Pushed ghcr.io/${{ github.repository }}-controller:${{ steps.build-controller.outputs.tag }}

- uses: lsst-sqre/build-and-push-to-ghcr@v1
id: build2
id: build-hub
with:
dockerfile: Dockerfile.controller
image: ${{ github.repository }}-jupyterhub
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Report result
run: |
echo Pushed ghcr.io/${{ github.repository }}-jupyterhub:${{ steps.build2.outputs.tag }}
echo Pushed ghcr.io/${{ github.repository }}-jupyterhub:${{ steps.build-hub.outputs.tag }}
16 changes: 16 additions & 0 deletions .github/workflows/periodic-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,22 @@ jobs:
- name: Run tests with nox
run: "nox -s lint typing test"

# The Hub code has to be tested with Python 3.10 because that's what the
# JupyterHub image uses.

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Install nox
run: |
pip install --upgrade pip
pip install --upgrade nox

- name: Run hub tests with nox
run: "nox -s test-hub"

- name: Report status
if: always()
uses: ravsamhq/notify-slack-action@v2
Expand Down
200 changes: 100 additions & 100 deletions controller/requirements/dev.txt

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions controller/requirements/main.txt
Original file line number Diff line number Diff line change
Expand Up @@ -982,9 +982,9 @@ urllib3==2.0.7 \
# via
# kubernetes-asyncio
# requests
uvicorn[standard]==0.23.2 \
--hash=sha256:1f9be6558f01239d4fdf22ef8126c39cb1ad0addf76c40e760549d2c2f43ab53 \
--hash=sha256:4d3cc12d7727ba72b64d12d3cc7743124074c0a69f7b201512fc50c3e3f1569a
uvicorn[standard]==0.24.0.post1 \
--hash=sha256:09c8e5a79dc466bdf28dead50093957db184de356fcdc48697bad3bde4c2588e \
--hash=sha256:7c84fea70c619d4a710153482c0d230929af7bcf76c7bfa6de151f0a3a80121e
# via -r controller/requirements/main.in
uvloop==0.19.0 \
--hash=sha256:0246f4fd1bf2bf702e06b0d45ee91677ee5c31242f39aab4ea6fe0c51aedd0fd \
Expand Down
24 changes: 24 additions & 0 deletions hub/requirements/dev.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# -*- conf -*-
#
# Editable development dependencies for the JupyterHub Docker image. Add
# direct development, test, and documentation dependencies here, as well as
# implicit dev dependencies with constrained versions. This must include all
# of the development dependencies of the authenticator and spawner modules.
#
# After editing, update requirements/dev.txt by running:
# nox -s update-deps

-c main.txt

# Testing
pytest
pytest-asyncio
pytest-cov
pytest-sugar
respx

# These dependencies aren't required in Python 3.11 but are required in 3.10.
# Pin them so that we can regenerate dependencies with Python 3.11 and still
# successfully test using Python 3.10, which the base JupyterHub image
# currently uses.
tomli
154 changes: 154 additions & 0 deletions hub/requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --allow-unsafe --generate-hashes --output-file=hub/requirements/dev.txt hub/requirements/dev.in
#
anyio==4.0.0 \
--hash=sha256:cfdb2b588b9fc25ede96d8db56ed50848b0b649dca3dd1df0b11f683bb9e0b5f \
--hash=sha256:f7ed51751b2c2add651e5747c891b47e26d2a21be5d32d9311dfe9692f3e5d7a
# via
# -c hub/requirements/main.txt
# httpx
certifi==2023.7.22 \
--hash=sha256:539cc1d13202e33ca466e88b2807e29f4c13049d6d87031a3c110744495cb082 \
--hash=sha256:92d6037539857d8206b8f6ae472e8b77db8058fec5937a1ef3f54304089edbb9
# via
# -c hub/requirements/main.txt
# httpcore
# httpx
coverage[toml]==7.3.2 \
--hash=sha256:0cbf38419fb1a347aaf63481c00f0bdc86889d9fbf3f25109cf96c26b403fda1 \
--hash=sha256:12d15ab5833a997716d76f2ac1e4b4d536814fc213c85ca72756c19e5a6b3d63 \
--hash=sha256:149de1d2401ae4655c436a3dced6dd153f4c3309f599c3d4bd97ab172eaf02d9 \
--hash=sha256:1981f785239e4e39e6444c63a98da3a1db8e971cb9ceb50a945ba6296b43f312 \
--hash=sha256:2443cbda35df0d35dcfb9bf8f3c02c57c1d6111169e3c85fc1fcc05e0c9f39a3 \
--hash=sha256:289fe43bf45a575e3ab10b26d7b6f2ddb9ee2dba447499f5401cfb5ecb8196bb \
--hash=sha256:2f11cc3c967a09d3695d2a6f03fb3e6236622b93be7a4b5dc09166a861be6d25 \
--hash=sha256:307adb8bd3abe389a471e649038a71b4eb13bfd6b7dd9a129fa856f5c695cf92 \
--hash=sha256:310b3bb9c91ea66d59c53fa4989f57d2436e08f18fb2f421a1b0b6b8cc7fffda \
--hash=sha256:315a989e861031334d7bee1f9113c8770472db2ac484e5b8c3173428360a9148 \
--hash=sha256:3a4006916aa6fee7cd38db3bfc95aa9c54ebb4ffbfc47c677c8bba949ceba0a6 \
--hash=sha256:3c7bba973ebee5e56fe9251300c00f1579652587a9f4a5ed8404b15a0471f216 \
--hash=sha256:4175e10cc8dda0265653e8714b3174430b07c1dca8957f4966cbd6c2b1b8065a \
--hash=sha256:43668cabd5ca8258f5954f27a3aaf78757e6acf13c17604d89648ecc0cc66640 \
--hash=sha256:4cbae1051ab791debecc4a5dcc4a1ff45fc27b91b9aee165c8a27514dd160836 \
--hash=sha256:5c913b556a116b8d5f6ef834038ba983834d887d82187c8f73dec21049abd65c \
--hash=sha256:5f7363d3b6a1119ef05015959ca24a9afc0ea8a02c687fe7e2d557705375c01f \
--hash=sha256:630b13e3036e13c7adc480ca42fa7afc2a5d938081d28e20903cf7fd687872e2 \
--hash=sha256:72c0cfa5250f483181e677ebc97133ea1ab3eb68645e494775deb6a7f6f83901 \
--hash=sha256:7dbc3ed60e8659bc59b6b304b43ff9c3ed858da2839c78b804973f613d3e92ed \
--hash=sha256:88ed2c30a49ea81ea3b7f172e0269c182a44c236eb394718f976239892c0a27a \
--hash=sha256:89a937174104339e3a3ffcf9f446c00e3a806c28b1841c63edb2b369310fd074 \
--hash=sha256:9028a3871280110d6e1aa2df1afd5ef003bab5fb1ef421d6dc748ae1c8ef2ebc \
--hash=sha256:99b89d9f76070237975b315b3d5f4d6956ae354a4c92ac2388a5695516e47c84 \
--hash=sha256:9f805d62aec8eb92bab5b61c0f07329275b6f41c97d80e847b03eb894f38d083 \
--hash=sha256:a889ae02f43aa45032afe364c8ae84ad3c54828c2faa44f3bfcafecb5c96b02f \
--hash=sha256:aa72dbaf2c2068404b9870d93436e6d23addd8bbe9295f49cbca83f6e278179c \
--hash=sha256:ac8c802fa29843a72d32ec56d0ca792ad15a302b28ca6203389afe21f8fa062c \
--hash=sha256:ae97af89f0fbf373400970c0a21eef5aa941ffeed90aee43650b81f7d7f47637 \
--hash=sha256:af3d828d2c1cbae52d34bdbb22fcd94d1ce715d95f1a012354a75e5913f1bda2 \
--hash=sha256:b4275802d16882cf9c8b3d057a0839acb07ee9379fa2749eca54efbce1535b82 \
--hash=sha256:b4767da59464bb593c07afceaddea61b154136300881844768037fd5e859353f \
--hash=sha256:b631c92dfe601adf8f5ebc7fc13ced6bb6e9609b19d9a8cd59fa47c4186ad1ce \
--hash=sha256:be32ad29341b0170e795ca590e1c07e81fc061cb5b10c74ce7203491484404ef \
--hash=sha256:beaa5c1b4777f03fc63dfd2a6bd820f73f036bfb10e925fce067b00a340d0f3f \
--hash=sha256:c0ba320de3fb8c6ec16e0be17ee1d3d69adcda99406c43c0409cb5c41788a611 \
--hash=sha256:c9eacf273e885b02a0273bb3a2170f30e2d53a6d53b72dbe02d6701b5296101c \
--hash=sha256:cb536f0dcd14149425996821a168f6e269d7dcd2c273a8bff8201e79f5104e76 \
--hash=sha256:d1bc430677773397f64a5c88cb522ea43175ff16f8bfcc89d467d974cb2274f9 \
--hash=sha256:d1c88ec1a7ff4ebca0219f5b1ef863451d828cccf889c173e1253aa84b1e07ce \
--hash=sha256:d3d9df4051c4a7d13036524b66ecf7a7537d14c18a384043f30a303b146164e9 \
--hash=sha256:d51ac2a26f71da1b57f2dc81d0e108b6ab177e7d30e774db90675467c847bbdf \
--hash=sha256:d872145f3a3231a5f20fd48500274d7df222e291d90baa2026cc5152b7ce86bf \
--hash=sha256:d8f17966e861ff97305e0801134e69db33b143bbfb36436efb9cfff6ec7b2fd9 \
--hash=sha256:dbc1b46b92186cc8074fee9d9fbb97a9dd06c6cbbef391c2f59d80eabdf0faa6 \
--hash=sha256:e10c39c0452bf6e694511c901426d6b5ac005acc0f78ff265dbe36bf81f808a2 \
--hash=sha256:e267e9e2b574a176ddb983399dec325a80dbe161f1a32715c780b5d14b5f583a \
--hash=sha256:f47d39359e2c3779c5331fc740cf4bce6d9d680a7b4b4ead97056a0ae07cb49a \
--hash=sha256:f6e9589bd04d0461a417562649522575d8752904d35c12907d8c9dfeba588faf \
--hash=sha256:f94b734214ea6a36fe16e96a70d941af80ff3bfd716c141300d95ebc85339738 \
--hash=sha256:fa28e909776dc69efb6ed975a63691bc8172b64ff357e663a1bb06ff3c9b589a \
--hash=sha256:fe494faa90ce6381770746077243231e0b83ff3f17069d748f645617cefe19d4
# via
# coverage
# pytest-cov
h11==0.14.0 \
--hash=sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d \
--hash=sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761
# via
# -c hub/requirements/main.txt
# httpcore
httpcore==1.0.1 \
--hash=sha256:c5e97ef177dca2023d0b9aad98e49507ef5423e9f1d94ffe2cfe250aa28e63b0 \
--hash=sha256:fce1ddf9b606cfb98132ab58865c3728c52c8e4c3c46e2aabb3674464a186e92
# via
# -c hub/requirements/main.txt
# httpx
httpx==0.25.1 \
--hash=sha256:fec7d6cc5c27c578a391f7e87b9aa7d3d8fbcd034f6399f9f79b45bcc12a866a \
--hash=sha256:ffd96d5cf901e63863d9f1b4b6807861dbea4d301613415d9e6e57ead15fc5d0
# via
# -c hub/requirements/main.txt
# respx
idna==3.4 \
--hash=sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4 \
--hash=sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2
# via
# -c hub/requirements/main.txt
# anyio
# httpx
iniconfig==2.0.0 \
--hash=sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3 \
--hash=sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374
# via pytest
packaging==23.2 \
--hash=sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5 \
--hash=sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7
# via
# -c hub/requirements/main.txt
# pytest
# pytest-sugar
pluggy==1.3.0 \
--hash=sha256:cf61ae8f126ac6f7c451172cf30e3e43d3ca77615509771b3a984a0730651e12 \
--hash=sha256:d89c696a773f8bd377d18e5ecda92b7a3793cbe66c87060a6fb58c7b6e1061f7
# via pytest
pytest==7.4.3 \
--hash=sha256:0d009c083ea859a71b76adf7c1d502e4bc170b80a8ef002da5806527b9591fac \
--hash=sha256:d989d136982de4e3b29dabcc838ad581c64e8ed52c11fbe86ddebd9da0818cd5
# via
# -r hub/requirements/dev.in
# pytest-asyncio
# pytest-cov
# pytest-sugar
pytest-asyncio==0.21.1 \
--hash=sha256:40a7eae6dded22c7b604986855ea48400ab15b069ae38116e8c01238e9eeb64d \
--hash=sha256:8666c1c8ac02631d7c51ba282e0c69a8a452b211ffedf2599099845da5c5c37b
# via -r hub/requirements/dev.in
pytest-cov==4.1.0 \
--hash=sha256:3904b13dfbfec47f003b8e77fd5b589cd11904a21ddf1ab38a64f204d6a10ef6 \
--hash=sha256:6ba70b9e97e69fcc3fb45bfeab2d0a138fb65c4d0d6a41ef33983ad114be8c3a
# via -r hub/requirements/dev.in
pytest-sugar==0.9.7 \
--hash=sha256:8cb5a4e5f8bbcd834622b0235db9e50432f4cbd71fef55b467fe44e43701e062 \
--hash=sha256:f1e74c1abfa55f7241cf7088032b6e378566f16b938f3f08905e2cf4494edd46
# via -r hub/requirements/dev.in
respx==0.20.2 \
--hash=sha256:07cf4108b1c88b82010f67d3c831dae33a375c7b436e54d87737c7f9f99be643 \
--hash=sha256:ab8e1cf6da28a5b2dd883ea617f8130f77f676736e6e9e4a25817ad116a172c9
# via -r hub/requirements/dev.in
sniffio==1.3.0 \
--hash=sha256:e60305c5e5d314f5389259b7f22aaa33d8f7dee49763119234af3755c55b9101 \
--hash=sha256:eecefdce1e5bbfb7ad2eeaabf7c1eeb404d7757c379bd1f7e5cce9d8bf425384
# via
# -c hub/requirements/main.txt
# anyio
# httpx
termcolor==2.3.0 \
--hash=sha256:3afb05607b89aed0ffe25202399ee0867ad4d3cb4180d98aaf8eefa6a5f7d475 \
--hash=sha256:b5b08f68937f138fe92f6c089b99f1e2da0ae56c52b78bf7075fd95420fd9a5a
# via pytest-sugar
tomli==2.0.1 \
--hash=sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc \
--hash=sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f
# via -r hub/requirements/dev.in
8 changes: 4 additions & 4 deletions hub/requirements/main.in
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# -*- conf -*-
#
# Editable runtime dependencies (equivalent to install_requires)
# Add direct runtime dependencies here, as well as implicit dependencies
# with constrained versions.
# Editable runtime dependencies for the JupyterHub Docker image. Add direct
# runtime dependencies here, as well as implicit dependencies with constrained
# versions.
#
# After editing, update requirements/main.txt by running:
# make update-deps
# nox -s update-deps

# We want to explicitly control new versions of JupyterHub. Pin this to the
# same version that Dockerfile uses.
Expand Down
Loading