summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2022-08-30 01:45:17 +0000
committerGerrit Code Review <review@openstack.org>2022-08-30 01:45:17 +0000
commit3cd5c7ddc4544669698dcf52f3b22905fba5c862 (patch)
tree7f4fe64445a87081338e166047f700a73edede0f
parent6e4067c5536c31fbbc48d57540885bcaf8228723 (diff)
parent0887c2b85173fe6f9e756d346344f0d10e0f5cb6 (diff)
downloadzuul-3cd5c7ddc4544669698dcf52f3b22905fba5c862.tar.gz
Merge "web: fix package task results in console"
-rw-r--r--web/src/containers/build/Console.jsx13
1 files changed, 13 insertions, 0 deletions
diff --git a/web/src/containers/build/Console.jsx b/web/src/containers/build/Console.jsx
index 0b365df62..194e314ee 100644
--- a/web/src/containers/build/Console.jsx
+++ b/web/src/containers/build/Console.jsx
@@ -50,6 +50,19 @@ class TaskOutput extends React.Component {
renderResults(value) {
const interesting_results = []
+
+ // This was written to assume "value" is an array of
+ // key/value mappings to output. This seems to be a
+ // good assumption for the most part, but "package:" for
+ // whatever reason outputs a result that is just an array of
+ // strings with what packages were installed. So, if we
+ // see an array of strings as the value, we just swizzle
+ // that into a key/value so it displays usefully.
+ const isAllStrings = value.every(i => typeof i === 'string')
+ if (isAllStrings) {
+ value = [ {output: [...value]} ]
+ }
+
value.forEach((result, idx) => {
const keys = Object.entries(result).filter(
([key, value]) => shouldIncludeKey(