Skip to content

Commit 4ec58f6

Browse files
committed
contest: collector: skip stability on WIP results
Signed-off-by: Jakub Kicinski <[email protected]>
1 parent fc47541 commit 4ec58f6

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

contest/results-collector.py

+9-5
Original file line numberDiff line numberDiff line change
@@ -119,16 +119,17 @@ def insert_wip(self, remote, run):
119119
def psql_json_split(self, data):
120120
# return "normal" and "full" as json string or None
121121
# "full" will be None if they are the same to save storage
122-
data = copy.deepcopy(data)
123122
full_s = json.dumps(data)
123+
if data.get("results") is None: # WIP result
124+
return full_s, None
125+
data = copy.deepcopy(data)
124126

125127
# Filter down the results
126128
apply_stability(self, data, {})
127129

128-
if data.get("results"):
129-
for row in data["results"]:
130-
if "results" in row:
131-
del row["results"]
130+
for row in data.get("results", []):
131+
if "results" in row:
132+
del row["results"]
132133

133134
norm_s = json.dumps(data)
134135

@@ -284,6 +285,9 @@ def fetch_remote(fetcher, remote, seen):
284285

285286

286287
def apply_stability(fetcher, data, unstable):
288+
if data.get("results") is None: # WIP result
289+
return
290+
287291
u_key = (data['remote'], data['executor'])
288292
if u_key not in unstable:
289293
unstable[u_key] = fetcher.psql_get_unstable(data)

0 commit comments

Comments
 (0)