From a836c699a7fe2780f54916004d9bad737b59882e Mon Sep 17 00:00:00 2001 From: danholdaway Date: Mon, 3 Jun 2024 17:06:36 -0400 Subject: [PATCH 01/14] Adjust testing for new path checker file --- .github/workflows/run_jcb_basic_testing.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_jcb_basic_testing.yaml b/.github/workflows/run_jcb_basic_testing.yaml index 523f976..849e42f 100644 --- a/.github/workflows/run_jcb_basic_testing.yaml +++ b/.github/workflows/run_jcb_basic_testing.yaml @@ -66,7 +66,7 @@ jobs: - name: Switch the application branch to match the action run: | cd jcb_repo - cd $(python get_submod_path.py $JCB_APP_REPO) + cd $(python jcb_client_path.py $JCB_APP_REPO) git checkout ${{ env.JCB_APP_BRANCH }} - name: Install dependencies From 5f2769b9ca5598611bce999f2703e3a6557954ba Mon Sep 17 00:00:00 2001 From: danholdaway Date: Tue, 4 Jun 2024 11:24:02 -0400 Subject: [PATCH 02/14] pyyaml --- .github/workflows/run_jcb_basic_testing.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/run_jcb_basic_testing.yaml b/.github/workflows/run_jcb_basic_testing.yaml index 849e42f..1e2df84 100644 --- a/.github/workflows/run_jcb_basic_testing.yaml +++ b/.github/workflows/run_jcb_basic_testing.yaml @@ -66,6 +66,7 @@ jobs: - name: Switch the application branch to match the action run: | cd jcb_repo + pip install pyyaml cd $(python jcb_client_path.py $JCB_APP_REPO) git checkout ${{ env.JCB_APP_BRANCH }} From fa5f7266a720eaa7eacb415576c57ba684931906 Mon Sep 17 00:00:00 2001 From: danholdaway Date: Tue, 4 Jun 2024 11:33:40 -0400 Subject: [PATCH 03/14] Make sure to init clients in GH test --- .github/workflows/run_jcb_basic_testing.yaml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/run_jcb_basic_testing.yaml b/.github/workflows/run_jcb_basic_testing.yaml index 1e2df84..c45c400 100644 --- a/.github/workflows/run_jcb_basic_testing.yaml +++ b/.github/workflows/run_jcb_basic_testing.yaml @@ -21,11 +21,6 @@ jobs: JCB_REPO: https://github.com/NOAA-EMC/jcb.git steps: - - name: Checkout application client repository - uses: actions/checkout@v3 - with: - submodules: true - - name: Set up Python uses: actions/setup-python@v4 with: @@ -63,11 +58,14 @@ jobs: git config --global core.hooksPath empty_hooks git clone --branch ${{ env.JCB_BRANCH }} --recursive $JCB_REPO jcb_repo - - name: Switch the application branch to match the action + - name: Clone the clients run: | cd jcb_repo pip install pyyaml - cd $(python jcb_client_path.py $JCB_APP_REPO) + ./jcb_client_init.py + app_path=$(python jcb_client_path.py $JCB_APP_REPO) + echo "Application path: $app_path" + cd $app_path git checkout ${{ env.JCB_APP_BRANCH }} - name: Install dependencies From 392b96037447266868a35599377fb33b40f6e1ec Mon Sep 17 00:00:00 2001 From: danholdaway Date: Tue, 4 Jun 2024 11:36:24 -0400 Subject: [PATCH 04/14] action debugging --- .github/workflows/run_jcb_basic_testing.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/run_jcb_basic_testing.yaml b/.github/workflows/run_jcb_basic_testing.yaml index c45c400..b59ba86 100644 --- a/.github/workflows/run_jcb_basic_testing.yaml +++ b/.github/workflows/run_jcb_basic_testing.yaml @@ -63,6 +63,7 @@ jobs: cd jcb_repo pip install pyyaml ./jcb_client_init.py + echo "JCB_APP_REPO: $JCB_APP_REPO" app_path=$(python jcb_client_path.py $JCB_APP_REPO) echo "Application path: $app_path" cd $app_path From b2eb15c6f88ef2964cc796093e0ea83136ab481f Mon Sep 17 00:00:00 2001 From: danholdaway Date: Tue, 4 Jun 2024 11:37:39 -0400 Subject: [PATCH 05/14] action debugging --- .github/workflows/run_jcb_basic_testing.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_jcb_basic_testing.yaml b/.github/workflows/run_jcb_basic_testing.yaml index b59ba86..9c16cd4 100644 --- a/.github/workflows/run_jcb_basic_testing.yaml +++ b/.github/workflows/run_jcb_basic_testing.yaml @@ -63,8 +63,8 @@ jobs: cd jcb_repo pip install pyyaml ./jcb_client_init.py - echo "JCB_APP_REPO: $JCB_APP_REPO" - app_path=$(python jcb_client_path.py $JCB_APP_REPO) + echo "JCB_APP_REPO: ${{ github.repository }}" + app_path=$(python jcb_client_path.py ${{ github.repository }}) echo "Application path: $app_path" cd $app_path git checkout ${{ env.JCB_APP_BRANCH }} From 858d76d09ea40d08ed69f1f89f83e5edc70ea2dd Mon Sep 17 00:00:00 2001 From: danholdaway Date: Tue, 4 Jun 2024 11:48:50 -0400 Subject: [PATCH 06/14] action debugging --- .github/workflows/run_jcb_basic_testing.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/run_jcb_basic_testing.yaml b/.github/workflows/run_jcb_basic_testing.yaml index 9c16cd4..9f0a745 100644 --- a/.github/workflows/run_jcb_basic_testing.yaml +++ b/.github/workflows/run_jcb_basic_testing.yaml @@ -64,6 +64,7 @@ jobs: pip install pyyaml ./jcb_client_init.py echo "JCB_APP_REPO: ${{ github.repository }}" + echo "Currect directory: $(pwd)" app_path=$(python jcb_client_path.py ${{ github.repository }}) echo "Application path: $app_path" cd $app_path From 5c8a013b90e412251be296dcaba4849535172735 Mon Sep 17 00:00:00 2001 From: danholdaway Date: Tue, 4 Jun 2024 11:51:59 -0400 Subject: [PATCH 07/14] action debugging --- .github/workflows/run_jcb_basic_testing.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_jcb_basic_testing.yaml b/.github/workflows/run_jcb_basic_testing.yaml index 9f0a745..6787bd7 100644 --- a/.github/workflows/run_jcb_basic_testing.yaml +++ b/.github/workflows/run_jcb_basic_testing.yaml @@ -66,7 +66,7 @@ jobs: echo "JCB_APP_REPO: ${{ github.repository }}" echo "Currect directory: $(pwd)" app_path=$(python jcb_client_path.py ${{ github.repository }}) - echo "Application path: $app_path" + echo "Application path : $app_path" cd $app_path git checkout ${{ env.JCB_APP_BRANCH }} From 27a3f8732761bf5c58b44b3fce649436749f0253 Mon Sep 17 00:00:00 2001 From: danholdaway Date: Tue, 4 Jun 2024 11:52:51 -0400 Subject: [PATCH 08/14] action debugging --- .github/workflows/run_jcb_basic_testing.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/run_jcb_basic_testing.yaml b/.github/workflows/run_jcb_basic_testing.yaml index 6787bd7..9210e61 100644 --- a/.github/workflows/run_jcb_basic_testing.yaml +++ b/.github/workflows/run_jcb_basic_testing.yaml @@ -65,6 +65,7 @@ jobs: ./jcb_client_init.py echo "JCB_APP_REPO: ${{ github.repository }}" echo "Currect directory: $(pwd)" + python jcb_client_path.py ${{ github.repository }} app_path=$(python jcb_client_path.py ${{ github.repository }}) echo "Application path : $app_path" cd $app_path From 130001f6d340c0d345a6dcb01150bdf277ebd984 Mon Sep 17 00:00:00 2001 From: danholdaway Date: Tue, 4 Jun 2024 11:54:11 -0400 Subject: [PATCH 09/14] action debugging --- .github/workflows/run_jcb_basic_testing.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/run_jcb_basic_testing.yaml b/.github/workflows/run_jcb_basic_testing.yaml index 9210e61..874c495 100644 --- a/.github/workflows/run_jcb_basic_testing.yaml +++ b/.github/workflows/run_jcb_basic_testing.yaml @@ -65,6 +65,7 @@ jobs: ./jcb_client_init.py echo "JCB_APP_REPO: ${{ github.repository }}" echo "Currect directory: $(pwd)" + ls -l python jcb_client_path.py ${{ github.repository }} app_path=$(python jcb_client_path.py ${{ github.repository }}) echo "Application path : $app_path" From e012da614e9ee6b47d2a5729ac93868c9c96be40 Mon Sep 17 00:00:00 2001 From: danholdaway Date: Tue, 4 Jun 2024 11:56:26 -0400 Subject: [PATCH 10/14] action debugging --- .github/workflows/run_jcb_basic_testing.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/run_jcb_basic_testing.yaml b/.github/workflows/run_jcb_basic_testing.yaml index 874c495..88c7c79 100644 --- a/.github/workflows/run_jcb_basic_testing.yaml +++ b/.github/workflows/run_jcb_basic_testing.yaml @@ -66,6 +66,8 @@ jobs: echo "JCB_APP_REPO: ${{ github.repository }}" echo "Currect directory: $(pwd)" ls -l + ls -l src/jcb/configuration + ls -l src/jcb/configuration/apps python jcb_client_path.py ${{ github.repository }} app_path=$(python jcb_client_path.py ${{ github.repository }}) echo "Application path : $app_path" From 9dbe5dfc1a354c2baca9fb184b2512495b204984 Mon Sep 17 00:00:00 2001 From: danholdaway Date: Tue, 4 Jun 2024 11:58:29 -0400 Subject: [PATCH 11/14] action debugging --- .github/workflows/run_jcb_basic_testing.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run_jcb_basic_testing.yaml b/.github/workflows/run_jcb_basic_testing.yaml index 88c7c79..74832eb 100644 --- a/.github/workflows/run_jcb_basic_testing.yaml +++ b/.github/workflows/run_jcb_basic_testing.yaml @@ -28,7 +28,7 @@ jobs: - name: Add repo url to the environment run: | - JCB_APP_REPO="https://github.com/${{ github.repository }}" + JCB_APP_REPO="${{ github.repository }}" echo "JCB_APP_REPO=${JCB_APP_REPO}" >> $GITHUB_ENV - name: Determine the name of the client branch @@ -63,13 +63,13 @@ jobs: cd jcb_repo pip install pyyaml ./jcb_client_init.py - echo "JCB_APP_REPO: ${{ github.repository }}" + echo "JCB_APP_REPO: $JCB_APP_REPO" echo "Currect directory: $(pwd)" ls -l ls -l src/jcb/configuration ls -l src/jcb/configuration/apps - python jcb_client_path.py ${{ github.repository }} - app_path=$(python jcb_client_path.py ${{ github.repository }}) + python jcb_client_path.py $JCB_APP_REPO + app_path=$(python jcb_client_path.py $JCB_APP_REPO) echo "Application path : $app_path" cd $app_path git checkout ${{ env.JCB_APP_BRANCH }} From 4d7c1cc73038feff4f5936eeafcbe4d3be2f1e48 Mon Sep 17 00:00:00 2001 From: danholdaway Date: Tue, 4 Jun 2024 12:01:58 -0400 Subject: [PATCH 12/14] action debugging --- .github/workflows/run_jcb_basic_testing.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/run_jcb_basic_testing.yaml b/.github/workflows/run_jcb_basic_testing.yaml index 74832eb..a88fb79 100644 --- a/.github/workflows/run_jcb_basic_testing.yaml +++ b/.github/workflows/run_jcb_basic_testing.yaml @@ -65,9 +65,6 @@ jobs: ./jcb_client_init.py echo "JCB_APP_REPO: $JCB_APP_REPO" echo "Currect directory: $(pwd)" - ls -l - ls -l src/jcb/configuration - ls -l src/jcb/configuration/apps python jcb_client_path.py $JCB_APP_REPO app_path=$(python jcb_client_path.py $JCB_APP_REPO) echo "Application path : $app_path" From f821bfe40aff0a43a476bdfd9e9ab0c474820833 Mon Sep 17 00:00:00 2001 From: danholdaway Date: Tue, 4 Jun 2024 12:05:09 -0400 Subject: [PATCH 13/14] action debugging --- .github/workflows/run_jcb_basic_testing.yaml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/run_jcb_basic_testing.yaml b/.github/workflows/run_jcb_basic_testing.yaml index a88fb79..d8c318f 100644 --- a/.github/workflows/run_jcb_basic_testing.yaml +++ b/.github/workflows/run_jcb_basic_testing.yaml @@ -63,13 +63,14 @@ jobs: cd jcb_repo pip install pyyaml ./jcb_client_init.py - echo "JCB_APP_REPO: $JCB_APP_REPO" - echo "Currect directory: $(pwd)" - python jcb_client_path.py $JCB_APP_REPO - app_path=$(python jcb_client_path.py $JCB_APP_REPO) - echo "Application path : $app_path" - cd $app_path - git checkout ${{ env.JCB_APP_BRANCH }} + # If all the branches are found then at this point everything should be good. + # If not then the apps branch needs to be checked out explicitly. + if [ "${{ env.JCB_BRANCH }}" != "${{ env.JCB_APP_BRANCH }}" ]; then + echo "Checking out branch ${{ env.JCB_APP_BRANCH }} for ${{ env.JCB_APP_REPO }}" + app_path=$(python jcb_client_path.py $JCB_APP_REPO) + cd $app_path + git checkout ${{ env.JCB_APP_BRANCH }} + fi - name: Install dependencies run: | From d04a99bdeae8bfe6926be190e79467a066ff449f Mon Sep 17 00:00:00 2001 From: danholdaway Date: Tue, 4 Jun 2024 12:09:13 -0400 Subject: [PATCH 14/14] add comment --- .github/workflows/run_jcb_basic_testing.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_jcb_basic_testing.yaml b/.github/workflows/run_jcb_basic_testing.yaml index d8c318f..97714eb 100644 --- a/.github/workflows/run_jcb_basic_testing.yaml +++ b/.github/workflows/run_jcb_basic_testing.yaml @@ -63,8 +63,10 @@ jobs: cd jcb_repo pip install pyyaml ./jcb_client_init.py - # If all the branches are found then at this point everything should be good. - # If not then the apps branch needs to be checked out explicitly. + + # If all the branches are found then at this point everything should be good since + # jcb_client_init will check out the correct branches. If not then the app branch needs to + # be checked out explicitly. if [ "${{ env.JCB_BRANCH }}" != "${{ env.JCB_APP_BRANCH }}" ]; then echo "Checking out branch ${{ env.JCB_APP_BRANCH }} for ${{ env.JCB_APP_REPO }}" app_path=$(python jcb_client_path.py $JCB_APP_REPO)