From 1b8ee9cb1ed09b2a8158d2bdd9bc8bf88d471410 Mon Sep 17 00:00:00 2001 From: Parwinder Bhagat Date: Tue, 22 Oct 2024 16:51:17 -0500 Subject: [PATCH] Removed logging, added sslmode=require --- .github/workflows/cclf-import-test-integration.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/cclf-import-test-integration.yml b/.github/workflows/cclf-import-test-integration.yml index fcd519eef..48f61073b 100644 --- a/.github/workflows/cclf-import-test-integration.yml +++ b/.github/workflows/cclf-import-test-integration.yml @@ -96,25 +96,18 @@ jobs: FILENAME: ${{needs.trigger.outputs.filename}} # CAUTION: if changing the script below, validate that sensitive information is not printed in the workflow run: | - log() { - local level="$1" - shift - echo "[$(date '+%Y-%m-%d %H:%M:%S')] [$level] $*" - } - HOST=$(aws rds describe-db-instances --db-instance-identifier bcda-test-rds 2>&1 | jq -r '.DBInstances[0].Endpoint.Address' 2>&1) CONNECTION_URL=$(echo $CONNECTION_INFO 2>&1 | sed -E "s/@.*\/bcda/\@$HOST\/bcda/" 2>&1) # Verify that we have a record of the CCLF file in the database - CCLF_FILE=`psql -t "$CONNECTION_URL" -c "SELECT id FROM cclf_files WHERE name = '$FILENAME' LIMIT 1" 2>&1` - log "DEBUG" "CCLF File: $CCLF_FILE" + CCLF_FILE=`psql -t "$CONNECTION_URL?sslmode=require" -c "SELECT id FROM cclf_files WHERE name = '$FILENAME' LIMIT 1" 2>&1` if [[ $? -ne 0 || -z $CCLF_FILE ]]; then echo "cclf_file query returned zero results or command failed" exit 1 else # Verify that the correct number of benes were imported into the database. - CCLF_BENES=`psql -t "$CONNECTION_URL" -c "SELECT count(mbi) FROM cclf_beneficiaries WHERE file_id = $CCLF_FILE" 2>&1` + CCLF_BENES=`psql -t "$CONNECTION_URL?sslmode=require" -c "SELECT count(mbi) FROM cclf_beneficiaries WHERE file_id = $CCLF_FILE" 2>&1` if [[ $? -ne 0 || -z $CCLF_BENES ]]; then echo "CCLF beneficiaries query returned zero results or command failed" exit 1