commit 0ecdad9c6337c60ddc973951460fa639f6921057
parent d9bfbc144e7941fc8564230d84118ae1e1caaa58
Author: myeongjun <myeongjun.ko@gmail.com>
Date: Wed, 15 Oct 2025 13:59:18 +0000
Bug 1987585 - [part] Ensure perfherder data is output to a JSON file for Bugbug push schedules r=sparky,taskgraph-reviewers,perftest-reviewers,ahal,releng-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D264184
Diffstat:
2 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/taskcluster/gecko_taskgraph/util/bugbug.py b/taskcluster/gecko_taskgraph/util/bugbug.py
@@ -4,6 +4,7 @@
import os
+import pathlib
import sys
import time
@@ -69,6 +70,20 @@ def _write_perfherder_data(lower_is_better):
],
}
print(f"PERFHERDER_DATA: {json.dumps(perfherder_data)}", file=sys.stderr)
+ perfherder_path = os.environ.get("MOZ_PERFHERDER_UPLOAD")
+ decision_upload_dir = os.environ.get("MOZ_UPLOAD_DIR")
+ if perfherder_path:
+ upload_path = pathlib.Path(perfherder_path)
+ elif decision_upload_dir:
+ upload_path = (
+ pathlib.Path(decision_upload_dir) / "perfherder-data-bugbug.json"
+ )
+ else:
+ return
+
+ upload_path.parent.mkdir(parents=True, exist_ok=True)
+ with upload_path.open("w", encoding="utf-8") as f:
+ json.dump(perfherder_data, f)
@memoize
diff --git a/taskcluster/kinds/source-test/shadow-scheduler.yml b/taskcluster/kinds/source-test/shadow-scheduler.yml
@@ -12,8 +12,12 @@ task-defaults:
- type: file
name: public/shadow-scheduler/optimized-tasks.json
path: /builds/worker/optimized-tasks.json
+ - type: file
+ name: public/build/perfherder-data-bugbug.json
+ path: /builds/worker/perfherder-data-bugbug.json
env:
DECISION_TASK_ID: {task-reference: <decision>}
+ MOZ_PERFHERDER_UPLOAD: /builds/worker/perfherder-data-bugbug.json
treeherder:
kind: other
tier: 3