Skip to content

Commit

Permalink
Fix cleanup dataproc cluster name pattern (#29154)
Browse files Browse the repository at this point in the history
  • Loading branch information
Abacn authored Oct 26, 2023
1 parent 32d1cc0 commit f4574bc
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions .test-infra/dataproc/cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ clustersList=( )
toDeleteList=( )


generatedResources=("beam-loadtests-go-cogbk-flink" "beam-loadtests-python-cogbk-flink" \
"beam-loadtests-go-combine-flink" "beam-loadtests-python-combine-flink" \
"beam-loadtests-go-gbk-flink" "beam-loadtests-python-gbk-flink" \
"beam-loadtests-go-pardo-flink" "beam-loadtests-python-pardo-flink" \
generatedResources=("beam-loadtests-go-*-flink" "beam-loadtests-python-*-flink" \
"beam-postcommit-python-chicago" )

function deleteFilteredClusters(){
Expand Down Expand Up @@ -51,7 +48,7 @@ function filterClusters(){
if [[ $elapsedHours -ge 2 ]]; then
for name in ${generatedResources[@]}; do
# Only resources generated by the groovy jobs set are queued for deletion
if [[ "$cluster" == *"$name"* ]]; then
if [[ "$cluster" == *${name}* ]]; then
toDeleteList+=( "$cluster" )
break
fi
Expand Down

0 comments on commit f4574bc

Please sign in to comment.