Skip to content

Commit c2aa4a7

Browse files
authored
Merge pull request #1268 from vvbandeira/check-metrics
ci: value not found in build is an error
2 parents 3d18d8f + 9dc9957 commit c2aa4a7

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

flow/util/checkMetadata.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,12 @@ def try_number(string):
7777
compare = rule['compare']
7878
op = ops[compare]
7979
rule_value = try_number(rule['value'])
80-
build_value = try_number(metadata[field])
80+
81+
if field in metadata.keys():
82+
build_value = try_number(metadata[field])
83+
else:
84+
print(f"[ERROR] Value not found for {field}.")
85+
sys.exit(1)
8186

8287
formatError = list()
8388
if not isinstance(rule_value, float):

flow/util/genReport.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def gen_report(name, data):
102102
TODO: docs
103103
'''
104104

105-
if args.verbose >= 2 and data['status'] != STATUS_GREEN:
105+
if args.verbose >= 2 or data['status'] != STATUS_GREEN:
106106
output = f"{name}\n"
107107
if data['finished']:
108108
output += ' Flow reached last stage.\n'

0 commit comments

Comments
 (0)