fix(KONFLUX-8910): fix results to show when ec command fails #2538
+9
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check the logs for the error message when ec is missing
Verify TEST_OUTPUT contains "result":"ERROR" instead of "result":""
Ensure the task exits cleanly without attempting failed ec test commands
Confirm Konflux UI shows the task as failed (ERROR) rather than successful
The key verification is that when ec is missing, you get a proper ERROR result instead of an invalid/empty result that was shown as successful
In below content of the Jira Ticket KONFLUX-8910:
Description
Description of problem:
The clamav-scan task doesn't handle failed
ec test
command calls gracefully, instead it carries on and reports an invalid TEST_OUTPUT tekton result. which is then shown as successful in the Konflux UI.How reproducible:
Steps to Reproduce:
ec
utilActual results:
The clamav-scan task outputs an invalid TEST_OUTPUT with an empty
result
value:TEST_OUTPUT{"timestamp":"0","namespace":"","successes":0,"failures":0,"warnings":0,"result":"","note":""}
Expected results:
The TEST_OUTPUT's result value should be
ERROR
Is this a customer issue: Yes
Please attach any logs/print screens to the ticket or share any additional info/links:
Task log gist: https://gist.github.com/dirgim/3dfb03897e648f1deb6fa7ffef625e2a