Skip to content

Commit 0e020eb

Browse files
committed
add benchmark site protection
1 parent 886d7c0 commit 0e020eb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ajet/utils/testing_utils.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,14 @@ def send_test_result(
9999
Post a single experiment result to the /report_test_result endpoint.
100100
Raises requests.HTTPError on non-2xx responses.
101101
"""
102+
103+
access_token = os.environ.get("BENCHMARK_ACCESS_TOKEN", None)
104+
if not access_token:
105+
logger.error("Cannot report to benchmark site, missing administrator token (`BENCHMARK_ACCESS_TOKEN` env variable).")
106+
return {}
107+
102108
payload = {
109+
"access_token": access_token,
103110
"git_hash": git_hash,
104111
"target": target,
105112
"status": status,

0 commit comments

Comments
 (0)