From b476f99b5170d546b0b47fd5c693552fbfb7b8b6 Mon Sep 17 00:00:00 2001 From: Ethan Ho <53266718+ethho@users.noreply.github.com> Date: Wed, 10 Jul 2024 14:00:58 -0500 Subject: [PATCH 01/11] Checkout submodules in singleuser CD --- .github/workflows/singleuser-release.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/singleuser-release.yaml b/.github/workflows/singleuser-release.yaml index 47bd7cf..e5b1f77 100644 --- a/.github/workflows/singleuser-release.yaml +++ b/.github/workflows/singleuser-release.yaml @@ -26,6 +26,8 @@ jobs: JUPYTERHUB_VERSION: ${{github.event.inputs.jupyterhub_version}} steps: - uses: actions/checkout@v4 + with: + submodules: recursive - name: Login to Docker Hub uses: docker/login-action@v2 with: From c96f60586b8d6f895fe3c015552c9b995c6e1aed Mon Sep 17 00:00:00 2001 From: Ethan Ho <53266718+ethho@users.noreply.github.com> Date: Wed, 10 Jul 2024 14:02:07 -0500 Subject: [PATCH 02/11] Naming typo --- .github/workflows/singleuser-release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/singleuser-release.yaml b/.github/workflows/singleuser-release.yaml index e5b1f77..b509c73 100644 --- a/.github/workflows/singleuser-release.yaml +++ b/.github/workflows/singleuser-release.yaml @@ -1,4 +1,4 @@ -name: singleuser-relase +name: singleuser-release on: workflow_dispatch: inputs: From 25130afa63e02a2a12367e374ffc72ed6f41b0ab Mon Sep 17 00:00:00 2001 From: Ethan Ho <53266718+ethho@users.noreply.github.com> Date: Wed, 10 Jul 2024 14:14:22 -0500 Subject: [PATCH 03/11] Use deploy key to clone submodule ipython-datajoint-creds-updater --- .github/workflows/singleuser-release.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/singleuser-release.yaml b/.github/workflows/singleuser-release.yaml index b509c73..60df0e4 100644 --- a/.github/workflows/singleuser-release.yaml +++ b/.github/workflows/singleuser-release.yaml @@ -27,7 +27,8 @@ jobs: steps: - uses: actions/checkout@v4 with: - submodules: recursive + ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} + submodules: true - name: Login to Docker Hub uses: docker/login-action@v2 with: From f3316ee79433a884db63d786077a94d18c185b3d Mon Sep 17 00:00:00 2001 From: Ethan Ho <53266718+ethho@users.noreply.github.com> Date: Wed, 10 Jul 2024 14:37:47 -0500 Subject: [PATCH 04/11] Upgrade ipython-datajoint-creds-updater to 25cf10e --- singleuser/ipython-datajoint-creds-updater | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/singleuser/ipython-datajoint-creds-updater b/singleuser/ipython-datajoint-creds-updater index f47ef85..25cf10e 160000 --- a/singleuser/ipython-datajoint-creds-updater +++ b/singleuser/ipython-datajoint-creds-updater @@ -1 +1 @@ -Subproject commit f47ef857a52a376eb6f891914e040bec58e89f22 +Subproject commit 25cf10ec7b8878ad52e9ba19133fd312bcbfb119 From c791e9707e763acd20889c6f2f2c2b1386346c83 Mon Sep 17 00:00:00 2001 From: Ethan Ho <53266718+ethho@users.noreply.github.com> Date: Thu, 11 Jul 2024 09:47:52 -0500 Subject: [PATCH 05/11] Upgrade ipython-datajoint-creds-updater to 0.1.1 --- singleuser/ipython-datajoint-creds-updater | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/singleuser/ipython-datajoint-creds-updater b/singleuser/ipython-datajoint-creds-updater index 25cf10e..4bc71f5 160000 --- a/singleuser/ipython-datajoint-creds-updater +++ b/singleuser/ipython-datajoint-creds-updater @@ -1 +1 @@ -Subproject commit 25cf10ec7b8878ad52e9ba19133fd312bcbfb119 +Subproject commit 4bc71f517a0d2dfd010c9e7eecb327dcfdde5f0b From 3c4bbc336d8eea6c3ca636f07e1d11b2e8431bef Mon Sep 17 00:00:00 2001 From: Ethan Ho <53266718+ethho@users.noreply.github.com> Date: Thu, 11 Jul 2024 12:20:23 -0500 Subject: [PATCH 06/11] Tolerate clone failure --- singleuser/config/before_start_hook.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/singleuser/config/before_start_hook.sh b/singleuser/config/before_start_hook.sh index 53a9a73..c5bc89f 100755 --- a/singleuser/config/before_start_hook.sh +++ b/singleuser/config/before_start_hook.sh @@ -12,7 +12,7 @@ if [[ ! -z "${DJLABHUB_REPO}" ]]; then REPO_NAME=$(basename $DJLABHUB_REPO | sed 's/.git//') echo "INFO::Cloning repo $DJLABHUB_REPO" - git clone $DJLABHUB_REPO $HOME/$REPO_NAME + git clone $DJLABHUB_REPO $HOME/$REPO_NAME || echo "WARNING::Failed to clone ${DJLABHUB_REPO}. Continuing..." if [[ ! -z "${DJLABHUB_REPO_BRANCH}" ]]; then echo "INFO::Switch to branch $DJLABHUB_REPO_BRANCH" git -C $HOME/$REPO_NAME switch $DJLABHUB_REPO_BRANCH From c0a1f78d76871579d88504f259d1b652f86366bd Mon Sep 17 00:00:00 2001 From: Ethan Ho <53266718+ethho@users.noreply.github.com> Date: Thu, 11 Jul 2024 13:16:49 -0500 Subject: [PATCH 07/11] Debugging branch switch --- singleuser/config/before_start_hook.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/singleuser/config/before_start_hook.sh b/singleuser/config/before_start_hook.sh index c5bc89f..0cd6aae 100755 --- a/singleuser/config/before_start_hook.sh +++ b/singleuser/config/before_start_hook.sh @@ -15,7 +15,9 @@ if [[ ! -z "${DJLABHUB_REPO}" ]]; then git clone $DJLABHUB_REPO $HOME/$REPO_NAME || echo "WARNING::Failed to clone ${DJLABHUB_REPO}. Continuing..." if [[ ! -z "${DJLABHUB_REPO_BRANCH}" ]]; then echo "INFO::Switch to branch $DJLABHUB_REPO_BRANCH" - git -C $HOME/$REPO_NAME switch $DJLABHUB_REPO_BRANCH + git -C $HOME/$REPO_NAME switch $DJLABHUB_REPO_BRANCH || echo "WARNING::Failed to checkout branch ${DJLABHUB_REPO_BRANCH}. Continuing..." + ls -lah + git branch fi if [[ $DJLABHUB_REPO_INSTALL == "TRUE" ]]; then From 2f48dfceb161088ed7860459616a4af5464415bf Mon Sep 17 00:00:00 2001 From: Ethan Ho <53266718+ethho@users.noreply.github.com> Date: Thu, 11 Jul 2024 13:25:21 -0500 Subject: [PATCH 08/11] Debugging branch switch --- singleuser/config/before_start_hook.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/singleuser/config/before_start_hook.sh b/singleuser/config/before_start_hook.sh index 0cd6aae..12105f2 100755 --- a/singleuser/config/before_start_hook.sh +++ b/singleuser/config/before_start_hook.sh @@ -16,6 +16,7 @@ if [[ ! -z "${DJLABHUB_REPO}" ]]; then if [[ ! -z "${DJLABHUB_REPO_BRANCH}" ]]; then echo "INFO::Switch to branch $DJLABHUB_REPO_BRANCH" git -C $HOME/$REPO_NAME switch $DJLABHUB_REPO_BRANCH || echo "WARNING::Failed to checkout branch ${DJLABHUB_REPO_BRANCH}. Continuing..." + cd $HOME/$REPO_NAME ls -lah git branch fi From 1847a5a89786c2129310780ba3928e72da3c3713 Mon Sep 17 00:00:00 2001 From: Ethan Ho <53266718+ethho@users.noreply.github.com> Date: Thu, 11 Jul 2024 13:31:58 -0500 Subject: [PATCH 09/11] Revert debug statements --- singleuser/config/before_start_hook.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/singleuser/config/before_start_hook.sh b/singleuser/config/before_start_hook.sh index 12105f2..b03bc5e 100755 --- a/singleuser/config/before_start_hook.sh +++ b/singleuser/config/before_start_hook.sh @@ -16,9 +16,6 @@ if [[ ! -z "${DJLABHUB_REPO}" ]]; then if [[ ! -z "${DJLABHUB_REPO_BRANCH}" ]]; then echo "INFO::Switch to branch $DJLABHUB_REPO_BRANCH" git -C $HOME/$REPO_NAME switch $DJLABHUB_REPO_BRANCH || echo "WARNING::Failed to checkout branch ${DJLABHUB_REPO_BRANCH}. Continuing..." - cd $HOME/$REPO_NAME - ls -lah - git branch fi if [[ $DJLABHUB_REPO_INSTALL == "TRUE" ]]; then From ad87a29c609111f84d04fc4ad8cbde5cf3494e9c Mon Sep 17 00:00:00 2001 From: Ethan Ho <53266718+ethho@users.noreply.github.com> Date: Thu, 11 Jul 2024 13:42:51 -0500 Subject: [PATCH 10/11] Debugging branch switch --- singleuser/config/before_start_hook.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/singleuser/config/before_start_hook.sh b/singleuser/config/before_start_hook.sh index b03bc5e..54f81e5 100755 --- a/singleuser/config/before_start_hook.sh +++ b/singleuser/config/before_start_hook.sh @@ -16,6 +16,10 @@ if [[ ! -z "${DJLABHUB_REPO}" ]]; then if [[ ! -z "${DJLABHUB_REPO_BRANCH}" ]]; then echo "INFO::Switch to branch $DJLABHUB_REPO_BRANCH" git -C $HOME/$REPO_NAME switch $DJLABHUB_REPO_BRANCH || echo "WARNING::Failed to checkout branch ${DJLABHUB_REPO_BRANCH}. Continuing..." + ls -lah + cd $HOME/$REPO_NAME + ls -lah + git branch fi if [[ $DJLABHUB_REPO_INSTALL == "TRUE" ]]; then From 95c35fe9ff32db1d29c1334a9b9a257ffc120f3d Mon Sep 17 00:00:00 2001 From: Ethan Ho <53266718+ethho@users.noreply.github.com> Date: Thu, 11 Jul 2024 22:53:02 -0500 Subject: [PATCH 11/11] Remove debug --- singleuser/config/before_start_hook.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/singleuser/config/before_start_hook.sh b/singleuser/config/before_start_hook.sh index 54f81e5..b03bc5e 100755 --- a/singleuser/config/before_start_hook.sh +++ b/singleuser/config/before_start_hook.sh @@ -16,10 +16,6 @@ if [[ ! -z "${DJLABHUB_REPO}" ]]; then if [[ ! -z "${DJLABHUB_REPO_BRANCH}" ]]; then echo "INFO::Switch to branch $DJLABHUB_REPO_BRANCH" git -C $HOME/$REPO_NAME switch $DJLABHUB_REPO_BRANCH || echo "WARNING::Failed to checkout branch ${DJLABHUB_REPO_BRANCH}. Continuing..." - ls -lah - cd $HOME/$REPO_NAME - ls -lah - git branch fi if [[ $DJLABHUB_REPO_INSTALL == "TRUE" ]]; then