Skip to content

Commit

Permalink
Fix error for no bench (#10)
Browse files Browse the repository at this point in the history
Fix error message for when signature or nps is missing
  • Loading branch information
Viren6 authored Aug 16, 2024
1 parent 4fcd3f2 commit ee0af92
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion server/montytest/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
according to the route/URL mapping defined in `__init__.py`.
"""

WORKER_VERSION = 7
WORKER_VERSION = 8


@exception_view_config(HTTPException)
Expand Down
5 changes: 3 additions & 2 deletions worker/games.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,13 +406,14 @@ def verify_signature(engine, signature, active_cores):
bench_nps = 0.0

for sig, nps in results:
bench_nps += nps

if sig is None or bench_nps is None:
if sig is None or nps is None:
raise RunException(
"Unable to parse bench output of {}".format(os.path.basename(engine))
)

bench_nps += nps

if int(sig) != int(signature):
message = "Wrong bench in {}, user expected: {} but worker got: {}".format(
os.path.basename(engine),
Expand Down
2 changes: 1 addition & 1 deletion worker/sri.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"__version": 7, "updater.py": "gSJX/HbsPwsZnUZaFbAgF0zwWPWXv+LEw9jBhJkxFOrCH9CZS0+4U4nE2fJdeNze", "worker.py": "YlLPByFLklFmr7+O9dN4lBb53bBd7VwOL9huIOCwdbU61H+gQ5nbLvPstux9q5eV", "games.py": "t8zqbxWzFH9akr8pkhkUKbQHxJtg5tVfCS/xx9CeFucAcLQrgHRWo2Tt7TUYwOQf"}
{"__version": 8, "updater.py": "gSJX/HbsPwsZnUZaFbAgF0zwWPWXv+LEw9jBhJkxFOrCH9CZS0+4U4nE2fJdeNze", "worker.py": "rFlovYBYNuqCmEJCNV1JRl1MmgHxEJLf/56xpVq39OSwy2HtxDwEhnwLz2V9EfNL", "games.py": "Gy3Y9/DisuptYUu/zV4ZViHUU/jSJ2a5WGSPyjP9hTRxDqV47xir4RBWhkh7IIbi"}
2 changes: 1 addition & 1 deletion worker/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
MIN_CARGO_MAJOR = 1
MIN_CARGO_MINOR = 77

WORKER_VERSION = 7
WORKER_VERSION = 8
FILE_LIST = ["updater.py", "worker.py", "games.py"]
HTTP_TIMEOUT = 30.0
INITIAL_RETRY_TIME = 15.0
Expand Down

0 comments on commit ee0af92

Please sign in to comment.