fmt/v1: correctly infer result from assembler
If a pipeline has an assembler and that assembler failed, the overall status of the build also needs to be marked as failed. This used to be the case, but a bug got introduced when the format abstraction code was added.
This commit is contained in:
parent
72ffa50c45
commit
dfd7ff2500
1 changed files with 12 additions and 7 deletions
|
|
@ -216,18 +216,23 @@ def output(manifest: Manifest, res: Dict) -> Dict:
|
||||||
stages = current.get("stages")
|
stages = current.get("stages")
|
||||||
if stages:
|
if stages:
|
||||||
retval["stages"] = stages
|
retval["stages"] = stages
|
||||||
assembler = current.get("assembler")
|
|
||||||
if assembler:
|
|
||||||
retval["assembler"] = assembler
|
|
||||||
return retval
|
return retval
|
||||||
|
|
||||||
result = result_for_pipeline(manifest["tree"])
|
result = result_for_pipeline(manifest["tree"])
|
||||||
|
|
||||||
assembler = manifest.get("assembler")
|
assembler = manifest.get("assembler")
|
||||||
if assembler:
|
if not assembler:
|
||||||
current = res.get(assembler.id)
|
return result
|
||||||
if current:
|
|
||||||
result["assembler"] = current["stages"][0]
|
current = res.get(assembler.id)
|
||||||
|
# if there was an error before getting to the assembler
|
||||||
|
# pipeline, there might not be a result present
|
||||||
|
if not current:
|
||||||
|
return result
|
||||||
|
|
||||||
|
result["assembler"] = current["stages"][0]
|
||||||
|
if not result["assembler"]["success"]:
|
||||||
|
result["success"] = False
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue