Treat pre-existing dependency issues as warnings (exit code 0)
When we notice a pre-existing dependency issue, it seems strange to exit non-zero, since the update being tested didn't break anything new. Let's just treat it more like a warning. Let's exit 0 in this case as there's no 'warning' exit code; the pipelines can use the JSON output to report an INFO or WARN result. Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
f036b42298
commit
bd1af29d84
3 changed files with 9 additions and 10 deletions
|
|
@ -316,14 +316,6 @@ def parse_display_exit(
|
|||
else:
|
||||
format_rc_errors(newrc, form="strip")
|
||||
exitcode += 2
|
||||
if preexisting:
|
||||
if dojson:
|
||||
jsonout["installability_preexisting"] = [list(err) for err in preexisting]
|
||||
else:
|
||||
print("")
|
||||
print("Pre-existing dependency problems in the tested packages themselves:")
|
||||
format_rc_errors(preexisting)
|
||||
exitcode += 4
|
||||
if fixederrors:
|
||||
if dojson:
|
||||
jsonout["fixederrors"] = [list(err) for err in fixederrors]
|
||||
|
|
@ -331,6 +323,13 @@ def parse_display_exit(
|
|||
print("")
|
||||
print(f"Dependencies of other packages that would be FIXED by {iut}:")
|
||||
format_rc_errors(fixederrors)
|
||||
if preexisting:
|
||||
if dojson:
|
||||
jsonout["installability_preexisting"] = [list(err) for err in preexisting]
|
||||
else:
|
||||
print("")
|
||||
print("Warning: pre-existing dependency problems in the tested packages themselves:")
|
||||
format_rc_errors(preexisting)
|
||||
if dojson:
|
||||
json.dump(jsonout, sys.stdout, indent=4)
|
||||
sys.stdout.write("\n")
|
||||
|
|
|
|||
|
|
@ -421,7 +421,7 @@ class TestE2E:
|
|||
sys.argv.insert(1, "--json")
|
||||
with pytest.raises(SystemExit) as excinfo:
|
||||
repos.main()
|
||||
assert excinfo.value.code == 4
|
||||
assert excinfo.value.code == 0
|
||||
captured = capsys.readouterr()
|
||||
if output == "human":
|
||||
fname = "test_e2e_unfixed.txt"
|
||||
|
|
|
|||
2
tests/testdata/test_e2e_unfixed.txt
vendored
2
tests/testdata/test_e2e_unfixed.txt
vendored
|
|
@ -1,4 +1,4 @@
|
|||
|
||||
Pre-existing dependency problems in the tested packages themselves:
|
||||
Warning: pre-existing dependency problems in the tested packages themselves:
|
||||
package: ddd-3.0-1.x86_64 from file://{REPOS}/unfixed
|
||||
ccc = 3.0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue