Skip to content

Commit

Permalink
Merge pull request #1714 from edx/ihassan/GSRE-997_update_slow_logs_job
Browse files Browse the repository at this point in the history
chore: Update check slow logs job to run for whitelisted regions
  • Loading branch information
syedimranhassan authored Dec 12, 2023
2 parents 4ad2e30 + 540636e commit 9d8ec78
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions devops/jobs/ExportRDSSlowQueryLogs.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,16 @@ class ExportRDSSlowQueryLogs {
rdsignore = "${rdsignore}-i ${ignore} "
}

def whitelistregions = ""
configuration.REGION_LIST.each { include ->
whitelistregions = "${whitelistregions}-r ${include} "
}

environmentVariables {
env('AWS_DEFAULT_REGION', extraVars.get('REGION'))
env('ENVIRONMENT', environment)
env('RDSIGNORE', rdsignore)
env('WHITELISTREGIONS', whitelistregions)
}

multiscm {
Expand Down
5 changes: 4 additions & 1 deletion devops/resources/export-slow-query-logs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,8 @@ set -x
if [[ ! -v RDSIGNORE ]]; then
RDSIGNORE=""
fi
if [[ ! -v WHITELISTREGIONS ]]; then
WHITELISTREGIONS=""
fi

python export_slow_query_logs.py --environment ${ENVIRONMENT} ${RDSIGNORE}
python export_slow_query_logs.py --environment ${ENVIRONMENT} ${RDSIGNORE} ${WHITELISTREGIONS}

0 comments on commit 9d8ec78

Please sign in to comment.