canonical-ubuntu-qa team mailing list archive
-
canonical-ubuntu-qa team
-
Mailing list archive
-
Message #03601
[Merge] autopkgtest-cloud:confirm-using-all into autopkgtest-cloud:master
Brian Murray has proposed merging autopkgtest-cloud:confirm-using-all into autopkgtest-cloud:master.
Requested reviews:
Canonical's Ubuntu QA (canonical-ubuntu-qa)
For more details, see:
https://code.launchpad.net/~ubuntu-release/autopkgtest-cloud/+git/autopkgtest-cloud/+merge/463354
It's far to easy to dump the queues right now so let's require confirmation.
--
Your team Canonical's Ubuntu QA is requested to review the proposed merge of autopkgtest-cloud:confirm-using-all into autopkgtest-cloud:master.
diff --git a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/filter-amqp b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/filter-amqp
index 47e4e42..6b301fc 100755
--- a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/filter-amqp
+++ b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/filter-amqp
@@ -5,6 +5,7 @@ import configparser
import logging
import optparse # pylint: disable=deprecated-module
import re
+import sys
import time
import urllib.parse
@@ -95,6 +96,14 @@ def main():
if len(args) != 2:
parser.error("Need to specify queue name and regex")
+ if opts.all:
+ print("""Do you really want to flush this queue? [yN]""", end="")
+ sys.stdout.flush()
+ response = sys.stdin.readline()
+ if not response.strip().lower().startswith("y"):
+ print("""Exiting""")
+ sys.exit(1)
+
deletion_count_history = []
while True:
num_deleted = filter_amqp(opts, creds, args[0], args[1])