#20 Do not assume the scratch field is always present
Merged 3 years ago by pingou. Opened 3 years ago by pingou.
pingou/ci-resultsdb-listener fix_broken_msg  into  master

@@ -34,7 +34,7 @@ 

      # All CI messages of versions 0.2.X should have the same fields...

      elif message.body["version"].startswith("0.2."):

          # ignore scratch builds

-         if message.body["artifact"]["scratch"]:

+         if message.body["artifact"].get("scratch"):

              return None

          data = {

              "build_url": message.body["run"]["url"],

We have ran in production into a message that did not have the
scratch field in the "artifact" section, thus breaking our consumer
and doing so, the entire gating pipeline in Fedora.

The message:
https://apps.fedoraproject.org/datagrepper/id?is_raw=true&size=extra-large&id=2020-5626e1e7-4d8f-4acb-9a5e-d9dfe860a26e

Signed-off-by: Pierre-Yves Chibon pingou@pingoured.fr

rebased onto 1bfbaa3

3 years ago

Pull-Request has been merged by pingou

3 years ago
Metadata