Skip to content

Commit

Permalink
Merge pull request apache#9719: [BEAM-8339] Quietly skip cleanup_pubs…
Browse files Browse the repository at this point in the history
…ub in automation script
  • Loading branch information
markflyhigh committed Oct 3, 2019
2 parents 4f7f89f + c1ca55f commit 7e65dc8
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,11 @@ function create_pubsub() {
# None
#######################################
function cleanup_pubsub() {
# Suppress error since topic/subscription may not exist
gcloud pubsub topics delete --project=$PROJECT_ID $PUBSUB_TOPIC1 2> /dev/null
gcloud pubsub topics delete --project=$PROJECT_ID $PUBSUB_TOPIC2 2> /dev/null
gcloud pubsub subscriptions delete --project=$PROJECT_ID $PUBSUB_SUBSCRIPTION 2> /dev/null
# Suppress error and pass quietly if topic/subscription not exists. We don't want the script
# to be interrupted in this case.
gcloud pubsub topics delete --project=$PROJECT_ID $PUBSUB_TOPIC1 2> /dev/null || true
gcloud pubsub topics delete --project=$PROJECT_ID $PUBSUB_TOPIC2 2> /dev/null || true
gcloud pubsub subscriptions delete --project=$PROJECT_ID $PUBSUB_SUBSCRIPTION 2> /dev/null || true
}


Expand Down

0 comments on commit 7e65dc8

Please sign in to comment.