Skip to content

Commit d1ef368

Browse files
committed
fix: avoid proxy by default in get_index_url
This aligns with get_artifact_url. Typically if you're building a url rather than actually fetching something, then it's because the downloading will happen in a downstream task, where the proxy might not be available, or might have a different url. So defaulting to not using it makes the most sense.
1 parent d8179b3 commit d1ef368

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/taskgraph/util/taskcluster.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,10 @@ def get_artifact_path(task, path):
194194
return f"{get_artifact_prefix(task)}/{path}"
195195

196196

197-
def get_index_url(index_path, multiple=False):
198-
index_tmpl = liburls.api(get_root_url(), "index", "v1", "task{}/{}")
197+
def get_index_url(index_path, multiple=False, use_proxy=False):
198+
index_tmpl = liburls.api(
199+
get_root_url(block_proxy=not use_proxy), "index", "v1", "task{}/{}"
200+
)
199201
return index_tmpl.format("s" if multiple else "", index_path)
200202

201203

0 commit comments

Comments
 (0)