Codebase list rust-stfu8 / a2ba87f
rust-excuses: distinguish between temp and permanent fails Ximin Luo 4 years ago
1 changed file(s) with 13 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
6060 BG_NOT_IN_DEBIAN = "#cc0000"
6161 BG_OLD_IN_DEBIAN = "#ffcc66"
6262 BG_TOO_NEW = "#66ff99"
63 BG_MISC_WAIT = "#ffcc99"
6364 BG_MISC_FAIL = "#ff6666"
6465 BG_SOURCEONLY = "#9999ff"
66 VERDICT_FAIL = ("REJECTED_CANNOT_DETERMINE_IF_PERMANENT", "REJECTED_NEEDS_APPROVAL", "REJECTED_PERMANENTLY")
6567
6668 def traverse(name, arch="", d=0):
6769 if name in already_seen:
106108 traverse(dep, arch, d + 1)
107109
108110 policy = excuses.get(name, {}).get("policy_info", {})
109 failed = [k for (k, v) in policy.items() if v.get("verdict", "") != "PASS"]
111 failed = {k: v["verdict"] for (k, v) in policy.items() if v.get("verdict", "") != "PASS"}
110112 attrs = {"shape": "box"}
111113 if "age" in failed:
112 failed.remove("age")
114 del failed["age"]
113115 attrs.update({ "fillcolor": BG_TOO_NEW, "style": "filled" })
114116 if "autopkgtest" in failed:
115117 for k, v in policy["autopkgtest"].items():
120122 if u and u.startswith("https://ci.debian.net/data/autopkgtest/testing"):
121123 print(u, file=rust_regressions)
122124 if failed:
123 attrs.update({ "label": "\\N\\nfailed: %s" % ",".join(failed) })
124 bg = BG_SOURCEONLY if failed == ["builtonbuildd"] else BG_MISC_FAIL
125 if list(failed.keys()) == ["builtonbuildd"]:
126 bg = BG_SOURCEONLY
127 attrs.update({ "label": "\\N\\nneeds source-only upload" })
128 elif any(v in VERDICT_FAIL for v in failed.values()):
129 bg = BG_MISC_FAIL
130 attrs.update({ "label": "\\N\\nfailed: %s" % ",".join(failed.keys()) })
131 else:
132 bg = BG_MISC_WAIT
133 attrs.update({ "label": "\\N\\nwaiting: %s" % ",".join(failed.keys()) })
125134 attrs.update({ "fillcolor": bg, "style": "filled" })
126135 print_all('"%s" [%s]' % (name, ",".join("%s=\"%s\"" % p for p in attrs.items())))
127136