Skip to content

Commit 19e035e

Browse files
committedFeb 26, 2025
contest: fetcher: trim the result manifest at 500 entries
NIPA CI has now run for a year, we have generated ~3150 branches. The size of the each is around 0.5MB. It's not a problem, yet, but keep the growth in check, trip the manifest at 500 entries. The result-fetcher does not care about disappearing entries, all-results.json will shrink accordingly but that's only for the best. Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 92625ef commit 19e035e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎contest/remote/lib/fetcher.py

+3
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ def _result_set(self, branch_name, url):
7171
if not found:
7272
old_db.append({'url': url, 'branch': branch_name, 'executor': self.name})
7373

74+
# Maintain only the last 500 entries
75+
old_db = old_db[-500:]
76+
7477
with open(self._results_manifest, "w") as fp:
7578
json.dump(old_db, fp)
7679

0 commit comments

Comments
 (0)