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

UI Server Configuration does not seem to honour $CYLC_SITE_CONF_PATH environment variable #565

Open
jarich opened this issue Mar 15, 2024 · 1 comment · May be fixed by #594
Open

UI Server Configuration does not seem to honour $CYLC_SITE_CONF_PATH environment variable #565

jarich opened this issue Mar 15, 2024 · 1 comment · May be fixed by #594
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jarich
Copy link

jarich commented Mar 15, 2024

Description

The documentation suggests that the $CYLC_SITE_CONF_PATH environment variable can be set to advise Cylc UI Servers where to find the jupyter_config.py file. When running the Cylc Hub with sudospawner, setting the $CYLC_SITE_CONF_PATH in sudospawner-singleuser:

#!/bin/bash -l
export CYLC_SITE_CONF_PATH="/data/jupyterhub/config/"
# Delegate to the Cylc hub server
exec "$(dirname "$0")/cylc" "hubapp" $@

does not result in the jupyter_config.py in that directory being used.

Further, if the jupyter_config.py in the Cylc Hub's pre-packaged default location <CONDA_ENV>/site-packages/cylc/uiserver/jupyter_config.py is not readable by the workflow owner, no permissions are provided but no warning is raised either. This makes debugging site_authorization issues a little harder.

Reproducible Example

Spawn a UI server, after exporting CYLC_SITE_CONF_PATH to be a different directory, with an all-user readable jupyter_config.py that grants access to other users.

Make sure that the UI server's pre-packaged default location for jupyter_config.py is unreadable to non-owner users/and or does not grant any access to other users.

Attempt to connect to that UI server as another user. Note that access is not granted.

Expected Behaviour

Exporting CYLC_SITE_CONF_PATH before calling cylc hubapp would result in the jupyter_config.py file under that directory to be used.

If no jupyter_config.py files are found/readable, a warning is printed in addition to stating that users have no access.

@jarich jarich added the bug Something isn't working label Mar 15, 2024
@oliver-sanders oliver-sanders modified the milestones: 1.4.4, 1.3.2 Mar 19, 2024
@oliver-sanders oliver-sanders modified the milestones: 1.3.2, 1.4.5 Mar 27, 2024
@wxtim wxtim linked a pull request May 9, 2024 that will close this issue
8 tasks
@wxtim wxtim linked a pull request May 31, 2024 that will close this issue
8 tasks
@MetRonnie MetRonnie modified the milestones: 1.4.5, 1.5.1 Jun 18, 2024
@wxtim
Copy link
Member

wxtim commented Jun 25, 2024

File Readable but not found

#!/bin/bash -l
export CYLC_SITE_CONF_PATH="/data/jupyterhub/config/"
# Delegate to the Cylc hub server
exec "$(dirname "$0")/cylc" "hubapp" $@

does not result in the jupyter_config.py in that directory being used.

I don't think I'd expect that to work - in the same way that ~/.cylc/global.cylc won't work - the pattern is location/app_name/config_file. reference

This only works for me if /data/jupyterhub/config/ contains a uiserver folder, but by putting print('HI') in my config I demonstrated that it does work.

File found but not readable

This isn't a Cylc feature, but a Jupyter Server feature, special handling of this behaviour is not reasonable. I think this ought to be a change in Jupyter server, assuming they are happy to have it.

@oliver-sanders oliver-sanders modified the milestones: 1.5.1, 1.6.0 Oct 15, 2024
@oliver-sanders oliver-sanders modified the milestones: 1.6.0, 1.7.0 Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants