From af79673b13e49dcabca1380914cb11b309d3b18d Mon Sep 17 00:00:00 2001 From: myeongjun Date: Mon, 3 Nov 2025 21:33:31 +0900 Subject: [PATCH] Bug 1996563 - Generate perfherder_data artifacts for jobs running fetch-content --- src/taskgraph/run-task/fetch-content | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/taskgraph/run-task/fetch-content b/src/taskgraph/run-task/fetch-content index 97b4e75df..596723029 100755 --- a/src/taskgraph/run-task/fetch-content +++ b/src/taskgraph/run-task/fetch-content @@ -949,11 +949,11 @@ def command_task_artifacts(args): ], } print(f"PERFHERDER_DATA: {json.dumps(perfherder_data)}", file=sys.stderr) - upload_dir = os.environ.get("UPLOAD_DIR") - if os.environ.get("MOZ_AUTOMATION", "0") == "1" and upload_dir: - upload_path = pathlib.Path(upload_dir) / "perfherder-data-fetch-content.json" + perfherder_fetch_content_json_path = os.environ.get("PERFHERDER_FETCH_CONTENT_JSON_PATH") + if os.environ.get("MOZ_AUTOMATION", "0") == "1" and perfherder_fetch_content_json_path: + upload_path = pathlib.Path(perfherder_fetch_content_json_path) upload_path.parent.mkdir(parents=True, exist_ok=True) - with upload_path.open("w") as f: + with upload_path.open("w", encoding="utf-8") as f: json.dump(perfherder_data, f)