Skip to content

Commit 2553167

Browse files
Eijebongahal
authored andcommitted
Don't assume the proxy is running on http://taskcluster
This fixes the two places where taskgraph assumed the proxy would be running on `http://taskcluster` instead of looking at the `TASKCLUSTER_PROXY_URL` environment variable.
1 parent 6ec960e commit 2553167

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/taskgraph/create.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import json
77
import logging
8+
import os
89
import sys
910
from concurrent import futures
1011

@@ -123,7 +124,11 @@ def create_task(session, task_id, label, task_def):
123124
return
124125

125126
logger.info(f"Creating task with taskId {task_id} for {label}")
126-
res = session.put(f"http://taskcluster/queue/v1/task/{task_id}", json=task_def)
127+
proxy_url = os.environ.get("TASKCLUSTER_PROXY_URL", "http://taskcluster")
128+
res = session.put(
129+
f"{proxy_url}/queue/v1/task/{task_id}",
130+
json=task_def,
131+
)
127132
if res.status_code != 200:
128133
try:
129134
logger.error(res.json()["message"])

src/taskgraph/run-task/run-task

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ from pathlib import Path
3939
from threading import Thread
4040
from typing import Optional
4141

42-
SECRET_BASEURL_TPL = "http://taskcluster/secrets/v1/secret/{}"
42+
SECRET_BASEURL_TPL = "{}/secrets/v1/secret/{{}}".format(os.environ.get("TASKCLUSTER_PROXY_URL", "http://taskcluster"))
4343

4444
GITHUB_SSH_FINGERPRINT = (
4545
b"github.com ssh-ed25519 "

0 commit comments

Comments
 (0)