From 396ef40367eaf3de7fb5ce4d33b9f1ac928cd939 Mon Sep 17 00:00:00 2001 From: Bastien Orivel Date: Tue, 29 Oct 2024 17:30:52 +0100 Subject: [PATCH] Rstrip `/` from the proxy URL --- src/taskgraph/create.py | 4 +++- src/taskgraph/run-task/run-task | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/taskgraph/create.py b/src/taskgraph/create.py index 000c7c9d..ac026e10 100644 --- a/src/taskgraph/create.py +++ b/src/taskgraph/create.py @@ -124,7 +124,9 @@ def create_task(session, task_id, label, task_def): return logger.info(f"Creating task with taskId {task_id} for {label}") - proxy_url = os.environ.get("TASKCLUSTER_PROXY_URL", "http://taskcluster") + proxy_url = os.environ.get("TASKCLUSTER_PROXY_URL", "http://taskcluster").rstrip( + "/" + ) res = session.put( f"{proxy_url}/queue/v1/task/{task_id}", json=task_def, diff --git a/src/taskgraph/run-task/run-task b/src/taskgraph/run-task/run-task index defc4f56..3c9a42aa 100755 --- a/src/taskgraph/run-task/run-task +++ b/src/taskgraph/run-task/run-task @@ -39,7 +39,7 @@ from pathlib import Path from threading import Thread from typing import Optional -SECRET_BASEURL_TPL = "{}/secrets/v1/secret/{{}}".format(os.environ.get("TASKCLUSTER_PROXY_URL", "http://taskcluster")) +SECRET_BASEURL_TPL = "{}/secrets/v1/secret/{{}}".format(os.environ.get("TASKCLUSTER_PROXY_URL", "http://taskcluster").rstrip('/')) GITHUB_SSH_FINGERPRINT = ( b"github.com ssh-ed25519 "