From a1f3c4de40da1b86040ac9ca20dcfb199577f387 Mon Sep 17 00:00:00 2001 From: sophia Date: Mon, 20 Jan 2025 12:24:14 -0800 Subject: [PATCH] debug --- .github/workflows/test_local_integration.yaml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test_local_integration.yaml b/.github/workflows/test_local_integration.yaml index 97152a659..d5ddc17a4 100644 --- a/.github/workflows/test_local_integration.yaml +++ b/.github/workflows/test_local_integration.yaml @@ -172,14 +172,14 @@ jobs: # install conda-store-server python -m pip install conda-store/conda-store-server - - name: Get conda store token from terraform state + - name: Get conda-store token from terraform state id: conda-store-token working-directory: ${{ steps.init.outputs.directory }} run: | - cat stages/07-kubernetes-services/terraform.tfstate | jq | grep conda-store-service-account | sed -n '2 p' | tr -s ' ' | sed "s/\"config.json\": \"//" | sed -e 's/\\\"/\"/g' -e 's/^.//g' -e 's/.$//g' | jq '."service-tokens-mapping"."conda-store-service-account"' - echo "CONDA_STORE_TOKEN=$(cat stages/07-kubernetes-services/terraform.tfstate | jq | grep conda-store-service-account | sed -n '2 p' | tr -s ' ' | sed "s/\"config.json\": \"//" | sed -e 's/\\\"/\"/g' -e 's/^.//g' -e 's/.$//g' | jq '."service-tokens-mapping"."conda-store-service-account"')" >> "$GITHUB_OUTPUT" + kubectl get secret -n default tfstate-default-${{ steps.init.outputs.project }}-dev-07-kubernetes-services --template={{.data}} | cut -d ":" -f2 | cut -d "]" -f1 | base64 --decode | gzip -d --to-stdout > terraform_state + echo "CONDA_STORE_TOKEN=$(cat terraform_state | jq | grep conda-store-service-account | sed -n '2 p' | tr -s ' ' | sed "s/\"config.json\": \"//" | sed -e 's/\\\"/\"/g' -e 's/^.//g' -e 's/.$//g' | jq --raw-output '."service-tokens-mapping"."conda-store-service-account"')" | tee --append "${GITHUB_OUTPUT}" - - name: Run conda-store-server user_journey tests + - name: Run conda-store server user_journey tests env: NEBARI_CONFIG_PATH: ${{ steps.init.outputs.config }} KEYCLOAK_USERNAME: ${{ env.TEST_USERNAME }} @@ -188,9 +188,15 @@ jobs: CONDA_STORE_TEST_VERIFY_SSL: 0 CONDA_STORE_TOKEN: ${{ steps.conda-store-token.outputs.CONDA_STORE_TOKEN }} run: | + curl --insecure --header "Authorization: Bearer ${CONDA_STORE_TOKEN}" ${CONDA_STORE_BASE_URL}/conda-store/api/v1/permission/ | jq cd conda-store/conda-store-server python -m pytest -m "user_journey" + - name: Get conda-store-server logs + if: ${{ failure() }} + run: | + kubectl logs -n dev deployment/nebari-conda-store-server + ### CLEANUP AFTER TESTS - name: Cleanup nebari deployment # Since this is not critical for most pull requests and takes more than half of the time