diff --git a/.github/tools/verify_config_has_been_expanded.sh b/.github/tools/verify_config_has_been_expanded.sh deleted file mode 100755 index e43c6964b..000000000 --- a/.github/tools/verify_config_has_been_expanded.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env bash - -# This script will fail if original and expanded config are not in sync in a PR. - -# For each underlay, this script expands config. Afterwards, if git reports any -# modified files, this script will fail. - -# Expand configs for all Broad, VUMC underlays. (This repo's SA doesn't have -# permission to read Verily source datasets.) -underlay_root_dirs=$(find service/src/main/resources/config -mindepth 2 -maxdepth 2 -type d | grep -v verily) -for underlay_root_dir in ${underlay_root_dirs} -do - echo "Expanding config for ${underlay_root_dir}" - underlay_absolute_root_dir=$(realpath ${underlay_root_dir}) - underlay_name=$(basename ${underlay_root_dir}) - original_json_file_path=$(echo "${underlay_absolute_root_dir}/original/${underlay_name}.json") - expanded_dir=$(echo "${underlay_absolute_root_dir}/expanded") - ./gradlew indexer:index -Dexec.args="EXPAND_CONFIG ${original_json_file_path} ${expanded_dir}" -done - -# Check for modified files -# https://stackoverflow.com/a/61748401/6447189 -modified_files=$(git status -s -uno service/src/main/resources/config) - -if [[ $(echo ${modified_files} | wc -c) -eq 1 ]] -then - echo "No modified files found" - exit -fi - -git diff --cached . - -echo "Modified files found:" -echo "${modified_files}" -echo "Please expand and add those files to your PR." -exit 1 diff --git a/.github/tools/verify_config_in_sync.sh b/.github/tools/verify_config_in_sync.sh index a0e583dd7..b1951388d 100755 --- a/.github/tools/verify_config_in_sync.sh +++ b/.github/tools/verify_config_in_sync.sh @@ -7,8 +7,8 @@ configs_to_compare_list=" cms_synpuf broad/cms_synpuf verily/cms_synpuf\n -aou_synthetic broad/aou_synthetic verily/aou_synthetic\n -sdd vumc/sdd verily/sdd +sdd vumc/sdd verily/sdd\n +sdd_refresh0323 vumc/sdd_refresh0323 verily/sdd_refresh0323 " # Needed for for loop to split only on newline, not on space @@ -23,8 +23,8 @@ do underlay_2=$(echo ${configs_to_compare} | awk '{print $3}') printf "\nComparing ${underlay_1} to ${underlay_2}\n" - underlay_dir_1=$(echo service/src/main/resources/config/${underlay_1}/original) - underlay_dir_2=$(echo service/src/main/resources/config/${underlay_2}/original) + underlay_dir_1=$(echo service/src/main/resources/config/${underlay_1}) + underlay_dir_2=$(echo service/src/main/resources/config/${underlay_2}) # --ignore-all-space because files sometimes have newline and at of file, and sometimes don't diff_output=$(diff -rq --ignore-all-space --exclude ${underlay_name}.json --exclude sql ${underlay_dir_1} ${underlay_dir_2}) diff --git a/.github/workflows/validate-config.yaml b/.github/workflows/validate-config.yaml index 96af45714..bf5e0d096 100644 --- a/.github/workflows/validate-config.yaml +++ b/.github/workflows/validate-config.yaml @@ -44,8 +44,3 @@ jobs: TEST_PROJECT_SA_KEY: ${{ secrets.TEST_PROJECT_SA_KEY }} - name: Verify configs are in sync, for example vumc/sdd and verily/sdd run: .github/tools/verify_config_in_sync.sh - - name: Verify underlay configs have been expanded - if: always() - run: .github/tools/verify_config_has_been_expanded.sh - env: - GOOGLE_APPLICATION_CREDENTIALS: ../rendered/broad/tanagra_sa.json