From 169025cee1cc934980cae599848e13ae1652a94a Mon Sep 17 00:00:00 2001 From: Adam Saleh Date: Oct 09 2020 12:32:30 +0000 Subject: Added more timeouts. --- diff --git a/monitor_gating/multi_builds.py b/monitor_gating/multi_builds.py index bf81400..ef59242 100644 --- a/monitor_gating/multi_builds.py +++ b/monitor_gating/multi_builds.py @@ -161,8 +161,10 @@ def main(args, utils=None): name="CI (running)", topic=f"org.centos.{conf['_ci_env']}.ci.koji-build.test.running", nevr=nevr, + duration=180, start=start_dg, ) + # Check at the CI pipeline has completed utils.lookup_results_datagrepper( base_url=conf["datagrepper"], @@ -170,6 +172,7 @@ def main(args, utils=None): topic=f"org.centos.{conf['_ci_env']}.ci.koji-build.test.error", nevr=nevr, start=start_dg, + duration=180, ) # Check the tag of the build @@ -191,6 +194,7 @@ def main(args, utils=None): topic=f"org.fedoraproject.{conf['_env']}.resultsdb.result.new", nevr=nevr, start=start_dg, + duration=180, ) # Check that greenwave reacted to resultsdb's new results @@ -200,6 +204,7 @@ def main(args, utils=None): topic=f"org.fedoraproject.{conf['_env']}.greenwave.decision.update", nevr=nevr, start=start_dg, + duration=180, ) # Check the tag of the build -- build is blocked but should be signed @@ -223,6 +228,8 @@ def main(args, utils=None): name="waiverdb", topic=f"org.fedoraproject.{conf['_env']}.waiverdb.waiver.new", nevrs=nevr_names, + start=start_dg, + duration=180, ) # Check that greenwave reacted to the new waiver @@ -231,6 +238,8 @@ def main(args, utils=None): name="greenwave", topic=f"org.fedoraproject.{conf['_env']}.greenwave.decision.update", nevrs=nevr_names, + start=start_dg, + duration=180, ) # Check the tag of the build -- build was waived, let is through diff --git a/monitor_gating/single_build.py b/monitor_gating/single_build.py index 6fd308b..5c5c520 100644 --- a/monitor_gating/single_build.py +++ b/monitor_gating/single_build.py @@ -228,12 +228,16 @@ def main(args): bodhi_id=updateid, ) + start_dg = datetime.datetime.utcnow() + # Check that the CI pipeline is running utils.lookup_results_datagrepper( base_url=conf["datagrepper"], name="CI (running)", topic=f"org.centos.{conf['_ci_env']}.ci.koji-build.test.running", nevr=nevr, + duration=120, + start=start_dg, ) start_dg = datetime.datetime.utcnow() @@ -244,7 +248,7 @@ def main(args): name="CI (complete)", topic=f"org.centos.{conf['_ci_env']}.ci.koji-build.test.error", nevr=nevr, - duration=30, + duration=60, start=start_dg, ) @@ -266,7 +270,7 @@ def main(args): name="resultsdb", topic=f"org.fedoraproject.{conf['_env']}.resultsdb.result.new", nevr=nevr, - duration=45, + duration=120, start=start_dg, ) @@ -276,7 +280,7 @@ def main(args): name="greenwave", topic=f"org.fedoraproject.{conf['_env']}.greenwave.decision.update", nevr=nevr, - duration=60, + duration=150, start=start_dg, ) @@ -300,6 +304,8 @@ def main(args): name="waiverdb", topic=f"org.fedoraproject.{conf['_env']}.waiverdb.waiver.new", nevr=nevr, + start=start_dg, + duration=180, ) # Check that greenwave reacted to the new waiver @@ -308,6 +314,8 @@ def main(args): name="greenwave", topic=f"org.fedoraproject.{conf['_env']}.greenwave.decision.update", nevr=nevr, + start=start_dg, + duration=180, ) # Check the tag of the build -- build was waived, let is through diff --git a/monitor_gating/utils.py b/monitor_gating/utils.py index 14cdefb..6051bf7 100644 --- a/monitor_gating/utils.py +++ b/monitor_gating/utils.py @@ -575,17 +575,20 @@ class MonitoringUtils: if not success: self.failed.append("datagrepper") - def lookup_ci_resultsdb(self, nevr, name, url, start=None, duration=(15 * 60)): + def lookup_ci_resultsdb(self, nevr, name, url, start=None, duration=(60 * 60)): """ Check the CI results in the specified resultsdb for results about our specified build. """ if start is None: start = datetime.datetime.utcnow() # previously "org.centos.prod.ci.pipeline.allpackages-build.complete" - topic = "fedora-ci.koji-build.tier0.functional" + topics = [ + "fedora-ci.koji-build.tier0.functional", + "fedora-ci.koji-build.tier0-tf.functional" + ] if ".stg" in url: - topic = "org.centos.stage.ci.pipeline.allpackages-build.complete" - url = f"{url}?testcases={topic}" + topics = ["org.centos.stage.ci.pipeline.allpackages-build.complete"] + urls = [f"{url}?testcases={topic}" for topic in topics] self.print_user(f"CI results query from {url}&page=0", success=True) info_log = f"Checking {name} for CI results" @@ -597,7 +600,8 @@ class MonitoringUtils: while True: # Assume we won't have more than 10 pages of results coming in b/w # our checks - for page in range(0, 9): + topicIteration = [(u, p) for p in range(0, 9) for u in urls] + for url, page in topicIteration: end_url = url end_url += f"&page={page}" try: