commit f5eae8beb35db492376dbe3543050f2ac8b6fd6e
parent 57c1f8f3ef4921e449073fdbd51c57077bac4808
Author: myeongjun <myeongjun.ko@gmail.com>
Date: Mon, 6 Oct 2025 15:26:59 +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, 15 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,16 @@ 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")
+ if perfherder_path:
+ upload_path = pathlib.Path(perfherder_path)
+ else:
+ upload_dir = os.environ.get("MOZ_UPLOAD_DIR")
+ upload_path = pathlib.Path(upload_dir) / "perfherder-data-bugbug.json"
+
+ 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