-
Notifications
You must be signed in to change notification settings - Fork 65
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
utoronto nbgitpuller in rstudio tries to pull to /home/jovyan which is ro #2559
Comments
Possibly jupyterhub/nbgitpuller#268 |
{
"NotebookApp": {
"nbserver_extensions": {
"nbgitpuller": true
}
}
}
On the user server
|
|
# The default working directory is the directory from which Jupyter
# server is launched, which is not the same as the root notebook
# directory assuming either --notebook-dir= is used from the
# command line or c.NotebookApp.notebook_dir is set in the jupyter
# configuration. This line assures that all repos are cloned
# relative to server_root_dir/<optional NBGITPULLER_PARENTPATH>,
# so that all repos are always in scope after cloning. Sometimes
# server_root_dir will include things like `~` and so the path
# must be expanded.
repo_parent_dir = os.path.join(os.path.expanduser(self.settings['server_root_dir']),
os.getenv('NBGITPULLER_PARENTPATH', ''))
repo_dir = os.path.join(repo_parent_dir, self.get_argument('targetpath', repo.split('/')[-1])) |
Hmm ok so cwd of PID 1 which is jupyterhub singleuser is /home/jovyan. So maybe we are not seetting notebook_dir or server_root_dir correctly here.
|
volumeMounts:
- mountPath: /home/rstudio
name: home
subPath: pris-2enasrat-40utoronto-2eca
- mountPath: /etc/gitconfig
name: files
subPath: gitconfig
- mountPath: /etc/github/github-app-private-key.pem
name: files
subPath: github-app-private-key.pem
- mountPath: /usr/local/etc/ipython/ipython_kernel_config.json
name: files
subPath: ipython_kernel_config.json
- mountPath: /usr/local/etc/jupyter/jupyter_notebook_config.json
name: files
subPath: jupyter_notebook_config.json
- mountPath: /usr/local/etc/jupyter/jupyter_server_config.json
name: files
subPath: jupyter_server_config.json
- mountPath: /home/jovyan/shared
name: home
readOnly: true
subPath: _shared
workingDir: /home/jovyan |
@pnasrat yep, #2559 (comment) is the root of the problem. I think we should modify r-common to set workingDir to /home/rstudio. I also felt some deja-vu with this problem, and behold, I had encountered it at UC Berkeley a few years ago and fixed it the exact same way https://github.com/berkeley-dsep-infra/datahub/blob/70447314413e15f41b1e870badae11acaff340c4/deployments/stat20/config/common.yaml#L25 We should add this as a piece of documentation somewhere, but not sure where. |
deployed fix to r-staging and tested via |
Ref: https://2i2c.freshdesk.com/a/tickets/726
nbgitpuller doesn’t seem to be working on https://r.datatools.utoronto.ca
For example trying to pull https://github.com/ntaback/learnr_test2 into the hub with
https://r.datatools.utoronto.ca/hub/user-redirect/git-pull?repo=https%3A%2F%2Fgithub.com%2Fntaback%2Flearnr_test2&urlpath=rstudio%2F&branch=main
Throws the error …
This can be worked around by forcing a targetPath
https://r.datatools.utoronto.ca/user/[email protected]/git-pull?repo=https%3A%2F%2Fgithub.com%2Fntaback%2Flearnr_test2.git&urlpath=rstudio%2F&branch=main&redirects=1&targetPath=/home/rstudio/foo
The text was updated successfully, but these errors were encountered: