Skip to content

Commit

Permalink
Ensure that docker container has the correct directory structure (jup…
Browse files Browse the repository at this point in the history
…yter-server#390)

* fix directory structure bug

* Bump to 0.20.1
  • Loading branch information
Zsailer authored and GitHub Enterprise committed May 24, 2022
1 parent 061ddea commit 20c0dd6
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion data_studio_jupyter_extensions/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.20.0" # pragma: no cover
__version__ = "0.20.1" # pragma: no cover
1 change: 0 additions & 1 deletion data_studio_jupyter_extensions/modes/cluster_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ def load_mode():
"ServerApp": {
"disable_check_xsrf": True,
"ip": os.getenv("PLATFORM_IP_ADDRESS", "0.0.0.0"),
"root_dir": "Working",
"open_browser": False,
"port": int(os.getenv("PORT_PUBLIC", "8888")),
"quit_button": False,
Expand Down
15 changes: 13 additions & 2 deletions deployment/bin/setup_notebook_directory.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ function define_jupyter_dirs () {
export JUPYTER_DATA_DIR="$JUPYTER_DIR/data"
export JUPYTER_RUNTIME_DIR="$JUPYTER_DIR/runtime"
export NOTEBOOKS_DIR="$WORKING_DIR/notebooks"
echo "[INFO] Set up the following paths"
echo "[INFO] JUPYTER_DIR: $JUPYTER_DIR"
echo "[INFO] JUPYTER_CONFIG_DIR: $JUPYTER_CONFIG_DIR"
echo "[INFO] JUPYTER_DATA_DIR: $JUPYTER_DATA_DIR"
echo "[INFO] JUPYTER_RUNTIME_DIR: $JUPYTER_RUNTIME_DIR"
echo "[INFO] NOTEBOOKS_DIR: $NOTEBOOKS_DIR"
}

# Check if a github url was provided through Notebook Service
Expand Down Expand Up @@ -65,6 +71,7 @@ function set_default_branch {
# git credentials and the base directory
if [[ ! -z $DATASTUDIO_NOTEBOOK_ID ]]; then
export BASE_DIR=/app
echo "[INFO] Settings the base directory: $BASE_DIR"
export GITHUB_KEY_FILE=/platform/secrets/git_rsa
if [[ -e "$GITHUB_KEY_FILE" ]]; then
setup_github_ssh_connection
Expand All @@ -76,14 +83,14 @@ else
export BASE_DIR=$(pwd)
fi

echo "[INFO] Defining Jupyter directories."
# Define (and export) all Jupyter paths.
define_jupyter_dirs $BASE_DIR

# If a GITHUB_REPO is named, use it as the
# the root directory in JupyterLab.
if [[ ! -z $GITHUB_REPO ]]; then
echo "[INFO] GitHub repo configured: $GITHUB_REPO"
cd $WORKING_DIR
echo "[INFO] Configuring Git repo: $GITHUB_REPO"
# Did the git repo get installed in the root "Working" directory?
# This reflects the old way we used to set up the user's directory.
# The first condition is checking for such a legacy setup and
Expand All @@ -107,6 +114,10 @@ if [[ ! -z $GITHUB_REPO ]]; then
elif [[ ! -d $NOTEBOOKS_DIR ]]; then
echo "[INFO] Cloning $GITHUB_REPO."
git clone -v $GITHUB_REPO $NOTEBOOKS_DIR
# Set the default branch
cd $NOTEBOOKS_DIR
set_default_branch
cd ..
fi
fi

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ testpaths = [
]

[tool.tbump.version]
current = "0.20.0"
current = "0.20.1"
regex = '''
(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)
((?P<channel>a|b|rc|.dev)(?P<release>\d+))?
Expand Down
2 changes: 1 addition & 1 deletion src/status.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { ISessionContext, ReactWidget } from '@jupyterlab/apputils';
import { EventListener } from './eventlistener';

// This is managed by tbump config in pyproject.toml
const VERSION = '0.20.0';
const VERSION = '0.20.1';

// Define the error states
// https://github.pie.apple.com/pie-data-studio/notebook-service/blob/761d63604966db5918d2e491c0f89cce454b7f67/app/com/apple/datastudio/model/ResourceState.scala#L20
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.20.0
0.20.1

0 comments on commit 20c0dd6

Please sign in to comment.