Skip to content

Commit 7f5756d

Browse files
Jupyterhub: allow users created before Cowbird was enabled to spawn jupyterlab (#480)
## Overview Users created before Cowbird was enabled will not have a "workspace directory" created. A workspace directory is a symlink to the directory that contains their Jupyterhub data. When Cowbird is enabled, Jupyterhub checks if the workspace directory exists and raises an error if it doesn't. This change allows Jupyterhub to create the symlink if it doesn't exist instead of raising an error. This means that users without a "workspace directory" will be able to continue using Jupyterhub as they did before without the need for manual intervention by a system administrator who would otherwise need to manually create the symlink for them. ## Changes **Non-breaking changes** - changes jupyterhub configuration **Breaking changes** None ## Related Issue / Discussion - Resolves #425 ## Additional Information ## CI Operations <!-- The test suite can be run using a different DACCS config with ``birdhouse_daccs_configs_branch: branch_name`` in the PR description. To globally skip the test suite regardless of the commit message use ``birdhouse_skip_ci`` set to ``true`` in the PR description. Using ``[<cmd>]`` (with the brackets) where ``<cmd> = skip ci`` in the commit message will override ``birdhouse_skip_ci`` from the PR description. Such commit command can be used to override the PR description behavior for a specific commit update. However, a commit message cannot 'force run' a PR which the description turns off the CI. To run the CI, the PR should instead be updated with a ``true`` value, and a running message can be posted in following PR comments to trigger tests once again. --> birdhouse_daccs_configs_branch: master birdhouse_skip_ci: false
2 parents 5d0522c + 0997bf3 commit 7f5756d

File tree

8 files changed

+33
-17
lines changed

8 files changed

+33
-17
lines changed

.bumpversion.cfg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 2.7.1
2+
current_version = 2.7.2
33
commit = True
44
tag = False
55
tag_name = {new_version}
@@ -30,11 +30,11 @@ search = {current_version}
3030
replace = {new_version}
3131

3232
[bumpversion:file:RELEASE.txt]
33-
search = {current_version} 2024-12-20T14:08:42Z
33+
search = {current_version} 2025-01-16T18:35:17Z
3434
replace = {new_version} {utcnow:%Y-%m-%dT%H:%M:%SZ}
3535

3636
[bumpversion:part:releaseTime]
37-
values = 2024-12-20T14:08:42Z
37+
values = 2025-01-16T18:35:17Z
3838

3939
[bumpversion:file(version):birdhouse/components/canarie-api/docker_configuration.py.template]
4040
search = 'version': '{current_version}'

CHANGES.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,25 @@
1515
[Unreleased](https://github.com/bird-house/birdhouse-deploy/tree/master) (latest)
1616
------------------------------------------------------------------------------------------------------------------
1717

18+
[//]: # (list changes here, using '-' for each new entry, remove this when items are added)
19+
20+
[2.7.2](https://github.com/bird-house/birdhouse-deploy/tree/2.7.2) (2025-01-16)
21+
------------------------------------------------------------------------------------------------------------------
22+
1823
## Fixes
1924

25+
- Jupyterhub: allow users created before Cowbird was enabled to spawn jupyterlab
26+
27+
Users created before Cowbird was enabled will not have a "workspace directory" created. A workspace directory
28+
is a symlink to the directory that contains their Jupyterhub data.
29+
30+
When Cowbird is enabled, Jupyterhub checks if the workspace directory exists and raises an error if it doesn't.
31+
32+
This change allows Jupyterhub to create the symlink if it doesn't exist instead of raising an error.
33+
This means that users without a "workspace directory" will be able to continue using Jupyterhub as they did
34+
before without the need for manual intervention by a system administrator who would otherwise need to manually
35+
create the symlink for them.
36+
2037
- Add resolver for http nginx configuration
2138

2239
Nginx requires a resolver to be explicity defined when using `proxy_pass` with a variable in the argument passed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Generic variables
22
override SHELL := bash
33
override APP_NAME := birdhouse-deploy
4-
override APP_VERSION := 2.7.1
4+
override APP_VERSION := 2.7.2
55

66
# utility to remove comments after value of an option variable
77
override clean_opt = $(shell echo "$(1)" | $(_SED) -r -e "s/[ '$'\t'']+$$//g")

README.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ for a full-fledged production platform.
1818
* - citation
1919
- | |citation|
2020

21-
.. |commits-since| image:: https://img.shields.io/github/commits-since/bird-house/birdhouse-deploy/2.7.1.svg
21+
.. |commits-since| image:: https://img.shields.io/github/commits-since/bird-house/birdhouse-deploy/2.7.2.svg
2222
:alt: Commits since latest release
23-
:target: https://github.com/bird-house/birdhouse-deploy/compare/2.7.1...master
23+
:target: https://github.com/bird-house/birdhouse-deploy/compare/2.7.2...master
2424

25-
.. |latest-version| image:: https://img.shields.io/badge/tag-2.7.1-blue.svg?style=flat
25+
.. |latest-version| image:: https://img.shields.io/badge/tag-2.7.2-blue.svg?style=flat
2626
:alt: Latest Tag
27-
:target: https://github.com/bird-house/birdhouse-deploy/tree/2.7.1
27+
:target: https://github.com/bird-house/birdhouse-deploy/tree/2.7.2
2828

2929
.. |readthedocs| image:: https://readthedocs.org/projects/birdhouse-deploy/badge/?version=latest
3030
:alt: ReadTheDocs Build Status (latest version)

RELEASE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.7.1 2024-12-20T14:08:42Z
1+
2.7.2 2025-01-16T18:35:17Z

birdhouse/components/canarie-api/docker_configuration.py.template

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ SERVICES = {
108108
# NOTE:
109109
# Below version and release time auto-managed by 'make VERSION=x.y.z bump'.
110110
# Do NOT modify it manually. See 'Tagging policy' in 'birdhouse/README.rst'.
111-
'version': '2.7.1',
112-
'releaseTime': '2024-12-20T14:08:42Z',
111+
'version': '2.7.2',
112+
'releaseTime': '2025-01-16T18:35:17Z',
113113
'institution': '${BIRDHOUSE_INSTITUTION}',
114114
'researchSubject': '${BIRDHOUSE_SUBJECT}',
115115
'supportEmail': '${BIRDHOUSE_SUPPORT_EMAIL}',
@@ -141,8 +141,8 @@ PLATFORMS = {
141141
# NOTE:
142142
# Below version and release time auto-managed by 'make VERSION=x.y.z bump'.
143143
# Do NOT modify it manually. See 'Tagging policy' in 'birdhouse/README.rst'.
144-
'version': '2.7.1',
145-
'releaseTime': '2024-12-20T14:08:42Z',
144+
'version': '2.7.2',
145+
'releaseTime': '2025-01-16T18:35:17Z',
146146
'institution': '${BIRDHOUSE_INSTITUTION}',
147147
'researchSubject': '${BIRDHOUSE_SUBJECT}',
148148
'supportEmail': '${BIRDHOUSE_SUPPORT_EMAIL}',

birdhouse/components/jupyterhub/jupyterhub_config.py.template

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,7 @@ def create_dir_hook(spawner):
159159
# to have working volume mounts with the DockerSpawner.
160160
workspace_user_dir = join(os.environ['WORKSPACE_DIR'], username)
161161
if not os.path.exists(workspace_user_dir):
162-
raise FileNotFoundError(f"The user {username}'s workspace doesn't exist in the workspace directory, "
163-
"but should have been created by Cowbird already.")
162+
os.symlink(jupyterhub_user_dir, workspace_user_dir, target_is_directory=True)
164163
subprocess.call(["chown", f"{os.environ['USER_WORKSPACE_UID']}:{os.environ['USER_WORKSPACE_GID']}",
165164
workspace_user_dir])
166165

docs/source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@
6969
# built documents.
7070
#
7171
# The short X.Y version.
72-
version = '2.7.1'
72+
version = '2.7.2'
7373
# The full version, including alpha/beta/rc tags.
74-
release = '2.7.1'
74+
release = '2.7.2'
7575

7676
# The language for content autogenerated by Sphinx. Refer to documentation
7777
# for a list of supported languages.

0 commit comments

Comments
 (0)