Skip to content

Commit

Permalink
Don't assume the proxy is running on http://taskcluster
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Eijebong committed Oct 28, 2024
1 parent 6ec960e commit 63e2e3e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/taskgraph/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import json
import logging
import os
import sys
from concurrent import futures

Expand Down Expand Up @@ -123,7 +124,11 @@ def create_task(session, task_id, label, task_def):
return

logger.info(f"Creating task with taskId {task_id} for {label}")
res = session.put(f"http://taskcluster/queue/v1/task/{task_id}", json=task_def)
proxy_url = os.environ.get("TASKCLUSTER_PROXY_URL", "http://taskcluster")
res = session.put(
f"{proxy_url}/queue/v1/task/{task_id}",
json=task_def,
)
if res.status_code != 200:
try:
logger.error(res.json()["message"])
Expand Down
2 changes: 1 addition & 1 deletion src/taskgraph/run-task/run-task
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ from pathlib import Path
from threading import Thread
from typing import Optional

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

GITHUB_SSH_FINGERPRINT = (
b"github.com ssh-ed25519 "
Expand Down

0 comments on commit 63e2e3e

Please sign in to comment.