#35 Added more timeouts.
Merged 3 years ago by asaleh. Opened 3 years ago by asaleh.
fedora-ci/ asaleh/monitor-gating fix_and_improve  into  production

@@ -161,8 +161,10 @@ 

                  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 @@ 

                  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 @@ 

                  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 @@ 

                  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 @@ 

                  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 @@ 

                  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

@@ -228,12 +228,16 @@ 

              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 @@ 

              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 @@ 

              name="resultsdb",

              topic=f"org.fedoraproject.{conf['_env']}.resultsdb.result.new",

              nevr=nevr,

-             duration=45,

+             duration=120,

              start=start_dg,

          )

  
@@ -276,7 +280,7 @@ 

              name="greenwave",

              topic=f"org.fedoraproject.{conf['_env']}.greenwave.decision.update",

              nevr=nevr,

-             duration=60,

+             duration=150,

              start=start_dg,

          )

  
@@ -300,6 +304,8 @@ 

                  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 @@ 

                  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

file modified
+9 -5
@@ -575,17 +575,20 @@ 

          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 @@ 

          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:

no initial comment

Pull-Request has been merged by asaleh

3 years ago