From 18380ff2a22eecf5f24be257d8076db267765407 Mon Sep 17 00:00:00 2001 From: Balaji Alwar Date: Mon, 26 Aug 2024 09:58:32 -0700 Subject: [PATCH 1/3] Add stanza to provide elevated access for Prob 140 and Data 8 course staff --- deployments/data8/config/common.yaml | 14 +++++++------- deployments/prob140/config/common.yaml | 25 ++++++++++++------------- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/deployments/data8/config/common.yaml b/deployments/data8/config/common.yaml index 471ffda36..01175151d 100644 --- a/deployments/data8/config/common.yaml +++ b/deployments/data8/config/common.yaml @@ -61,19 +61,19 @@ jupyterhub: # - course::N::enrollment_type::teacher # - course::N::enrollment_type::ta - # Data 8, Summer 2024, https://github.com/berkeley-dsep-infra/datahub/issues/5834 - course-staff-1535365: + # Data 8, Fall 2024, https://github.com/berkeley-dsep-infra/datahub/issues/6014 + course-staff-1538208: # description: Enable course staff to view and access servers. # # this role provides permissions to... scopes: - admin-ui - - list:users!group=course::1535365 - - admin:servers!group=course::1535365 - - access:servers!group=course::1535365 + - list:users!group=course::1538208 + - admin:servers!group=course::1538208 + - access:servers!group=course::1538208 # # this role will be assigned to... groups: - - course::1535365::enrollment_type::teacher - - course::1535365::enrollment_type::ta + - course::1538208::enrollment_type::teacher + - course::1538208::enrollment_type::ta singleuser: extraFiles: diff --git a/deployments/prob140/config/common.yaml b/deployments/prob140/config/common.yaml index 1727c8711..a1e9e8563 100644 --- a/deployments/prob140/config/common.yaml +++ b/deployments/prob140/config/common.yaml @@ -49,20 +49,19 @@ jupyterhub: # - course::N::enrollment_type::teacher # - course::N::enrollment_type::ta - ## Data C140, Spring 2024, #https://github.com/berkeley-dsep-infra/datahub/issues/5466 - #course-staff-1533557: + # Data C140, Fall 2024, #https://github.com/berkeley-dsep-infra/datahub/issues/6011 + course-staff-1537389: # description: Enable course staff to view and access servers. - # this role provides permissions to... - # scopes: - # - admin-ui - # - list:users!group=course::1533557 - # - admin:servers!group=course::1533557 - # - access:servers!group=course::1533557 - # this role will be assigned to... - # groups: - # - course::1533557::enrollment_type::teacher - # - course::1533557::enrollment_type::ta - + # # this role provides permissions to... + scopes: + - admin-ui + - list:users!group=course::1537389 + - admin:servers!group=course::1537389 + - access:servers!group=course::1537389 + # # this role will be assigned to... + groups: + - course::1537389::enrollment_type::teacher + - course::1537389::enrollment_type::ta nodeSelector: hub.jupyter.org/pool-name: core-pool-2024-05-08 From 3e41afb12617fc15dc19a319f043efdba8f2378a Mon Sep 17 00:00:00 2001 From: shane knapp Date: Mon, 26 Aug 2024 16:43:38 -0700 Subject: [PATCH 2/3] bash conditionals are confusing --- .github/workflows/deploy-hubs.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-hubs.yaml b/.github/workflows/deploy-hubs.yaml index bea73df68..a6fd9269e 100644 --- a/.github/workflows/deploy-hubs.yaml +++ b/.github/workflows/deploy-hubs.yaml @@ -31,7 +31,7 @@ jobs: # If the PR labels "hub-images" or "jupyterhub-deployment" are present, this # means the base hub image has changed, and all hubs (staging or prod) need to # be redeployed. The rest of this job will not run in that case. - if [ -n $GITHUB_PR_LABEL_HUB_IMAGES ] || [ -n $GITHUB_PR_LABEL_JUPYTERHUB_DEPLOYMENT ]; then + if [ -c "${GITHUB_PR_LABEL_HUB_IMAGES}" ] || [ -c "${GITHUB_PR_LABEL_JUPYTERHUB_DEPLOYMENT}" ]; then echo "Base hub image has changed, not deploying individual hubs to staging" else # deploy any hubs that have been labeled for deployment @@ -131,7 +131,7 @@ jobs: # If the PR labels "hub-images" or "jupyterhub-deployment" are present, this # means the base hub image has changed, and all hubs (staging or prod) need to # be redeployed. The rest of this job will not run in that case. - if [ -n $GITHUB_PR_LABEL_HUB_IMAGES ] || [ -n $GITHUB_PR_LABEL_JUPYTERHUB_DEPLOYMENT ]; then + if [ -c "${GITHUB_PR_LABEL_HUB_IMAGES}" ] || [ -c "${GITHUB_PR_LABEL_JUPYTERHUB_DEPLOYMENT}" ]; then echo "Base hub image has changed, not deploying individual hubs to prod" else # deploy any hubs that have been labeled for deployment From 62ff498e053d4b024b3e8e0c6b73d26dcc0aaa95 Mon Sep 17 00:00:00 2001 From: shane knapp Date: Mon, 26 Aug 2024 16:47:29 -0700 Subject: [PATCH 3/3] final little tweak for wording --- .github/workflows/deploy-all-hubs.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-all-hubs.yaml b/.github/workflows/deploy-all-hubs.yaml index fbc149187..2018b1301 100644 --- a/.github/workflows/deploy-all-hubs.yaml +++ b/.github/workflows/deploy-all-hubs.yaml @@ -21,7 +21,7 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} - - name: Pull out any hubs that need deploying from the labels on the merge commit to staging + - name: Check to see if the base jupyterhub image has changed, and deploy all hubs to prod if it has run: | echo "PR labels: ${{ steps.pr-labels.outputs.labels }}" for label in $(echo -e "${{ steps.pr-labels.outputs.labels }}"); do @@ -110,7 +110,7 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} - - name: Pull out any hubs that need deploying from the labels on the merge commit to prod + - name: Check to see if the base jupyterhub image has changed, and deploy all hubs to prod if it has run: | echo "PR labels: ${{ steps.pr-labels.outputs.labels }}" for label in $(echo -e "${{ steps.pr-labels.outputs.labels }}"); do