Skip to content

Commit 790fbae

Browse files
authored
fix: block tc proxy in script_url (taskcluster#847)
It's possible this is a terrible idea, but when I tried to run [a generic-worker task with run-task](https://firefox-ci-tc.services.mozilla.com/tasks/CyQ3aIZyRE6NdWBwyeif6Q) and the proxy enabled, it failed to download `run-task`: ``` [taskcluster 2025-10-30T01:05:04.835Z] [mounts] Downloading url http://taskcluster/api/queue/v1/task/YpWux6HWR6ux40YwCpi5fg/artifacts/public/run-task to D:\downloads\ZenjqqtWT76WhzgTtovcNQ [taskcluster:warn 2025-10-30T01:05:07.534Z] [mounts] Download of url http://taskcluster/api/queue/v1/task/YpWux6HWR6ux40YwCpi5fg/artifacts/public/run-task failed on this attempt: Get "http://taskcluster/api/queue/v1/task/YpWux6HWR6ux40YwCpi5fg/artifacts/public/run-task": dial tcp: lookup taskcluster: no such host ``` Opening this is a starting point, because [it works](https://firefox-ci-tc.services.mozilla.com/tasks/EFT5KvV3QVS7fzowTAyfVQ), and it's [similar to what we do in Gecko](https://searchfox.org/firefox-main/rev/75f89f7dee3f30c371af717da54ba8bbf046e5fd/taskcluster/gecko_taskgraph/transforms/job/run_task.py#119); but I'm not tied to it.
1 parent c884607 commit 790fbae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/taskgraph/transforms/run/run_task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def script_url(config, script):
184184
raise Exception("TASK_ID must be defined to use run-task on generic-worker")
185185
task_id = os.environ.get("TASK_ID", "<TASK_ID>")
186186
# Assumes the cluster allows anonymous downloads of public artifacts
187-
tc_url = taskcluster.get_root_url()
187+
tc_url = taskcluster.get_root_url(block_proxy=True)
188188
# TODO: Use util/taskcluster.py:get_artifact_url once hack for Bug 1405889 is removed
189189
return f"{tc_url}/api/queue/v1/task/{task_id}/artifacts/public/{script}"
190190

0 commit comments

Comments
 (0)