tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit b5fb864e953ebb95f7bb8275ad81511db26b360f
parent 276ee4a6f5a3d703cbb3aee099644239f4f7dd3f
Author: Andrew Halberstadt <ahal@mozilla.com>
Date:   Thu, 23 Oct 2025 14:42:42 +0000

Bug 1990567 - [ci] Remove unused 'use_proxy' flag in util/taskcluster.py, r=taskgraph-reviewers,releng-reviewers,bhearsum

Differential Revision: https://phabricator.services.mozilla.com/D269696

Diffstat:
Mtaskcluster/gecko_taskgraph/actions/cancel.py | 2+-
Mtaskcluster/gecko_taskgraph/actions/cancel_all.py | 2+-
Mtaskcluster/gecko_taskgraph/actions/purge_caches.py | 4+---
Mtaskcluster/gecko_taskgraph/decision.py | 2+-
Mtaskcluster/gecko_taskgraph/target_tasks.py | 2+-
Mtaskcluster/gecko_taskgraph/util/taskcluster.py | 12+++++-------
6 files changed, 10 insertions(+), 14 deletions(-)

diff --git a/taskcluster/gecko_taskgraph/actions/cancel.py b/taskcluster/gecko_taskgraph/actions/cancel.py @@ -25,9 +25,9 @@ def cancel_action(parameters, graph_config, input, task_group_id, task_id): # Note that this is limited by the scopes afforded to generic actions to # only cancel tasks with the level-specific schedulerId. try: - cancel_task(task_id, use_proxy=True) except requests.HTTPError as e: if e.response.status_code == 409: + cancel_task(task_id) # A 409 response indicates that this task is past its deadline. It # cannot be cancelled at this time, but it's also not running # anymore, so we can ignore this error. diff --git a/taskcluster/gecko_taskgraph/actions/cancel_all.py b/taskcluster/gecko_taskgraph/actions/cancel_all.py @@ -32,9 +32,9 @@ def cancel_all_action(parameters, graph_config, input, task_group_id, task_id): def do_cancel_task(task_id): logger.info(f"Cancelling task {task_id}") try: - cancel_task(task_id, use_proxy=True) except requests.HTTPError as e: if e.response.status_code == 409: + cancel_task(task_id) # A 409 response indicates that this task is past its deadline. It # cannot be cancelled at this time, but it's also not running # anymore, so we can ignore this error. diff --git a/taskcluster/gecko_taskgraph/actions/purge_caches.py b/taskcluster/gecko_taskgraph/actions/purge_caches.py @@ -27,8 +27,6 @@ def purge_caches_action(parameters, graph_config, input, task_group_id, task_id) task = get_task_definition(task_id) if task["payload"].get("cache"): for cache in task["payload"]["cache"]: - purge_cache( - task["provisionerId"], task["workerType"], cache, use_proxy=True - ) + purge_cache(task["provisionerId"], task["workerType"], cache) else: logger.info("Task has no caches. Will not clear anything!") diff --git a/taskcluster/gecko_taskgraph/decision.py b/taskcluster/gecko_taskgraph/decision.py @@ -490,7 +490,7 @@ def set_decision_indexes(decision_task_id, params, graph_config): subs["trust-domain"] = graph_config["trust-domain"] for index_path in index_paths: - insert_index(index_path.format(**subs), decision_task_id, use_proxy=True) + insert_index(index_path.format(**subs), decision_task_id) def write_artifact(filename, data): diff --git a/taskcluster/gecko_taskgraph/target_tasks.py b/taskcluster/gecko_taskgraph/target_tasks.py @@ -1092,7 +1092,7 @@ def target_tasks_searchfox(full_task_graph, parameters, graph_config): print("Skipping index tasks") return [] if not create.testing: - insert_index(index_path, os.environ["TASK_ID"], use_proxy=True) + insert_index(index_path, os.environ["TASK_ID"]) return [ "searchfox-linux64-searchfox/opt", diff --git a/taskcluster/gecko_taskgraph/util/taskcluster.py b/taskcluster/gecko_taskgraph/util/taskcluster.py @@ -16,7 +16,7 @@ from taskgraph.util.taskcluster import ( logger = logging.getLogger(__name__) -def insert_index(index_path, task_id, data=None, use_proxy=False): +def insert_index(index_path, task_id, data=None): # Find task expiry. expires = get_task_definition(task_id)["expires"] @@ -33,14 +33,13 @@ def insert_index(index_path, task_id, data=None, use_proxy=False): return response -def status_task(task_id, use_proxy=False): +def status_task(task_id): """Gets the status of a task given a task_id. In testing mode, just logs that it would have retrieved status. Args: task_id (str): A task id. - use_proxy (bool): Whether to use taskcluster-proxy (default: False) Returns: dict: A dictionary object as defined here: @@ -55,7 +54,7 @@ def status_task(task_id, use_proxy=False): return response.get("status", {}) -def state_task(task_id, use_proxy=False): +def state_task(task_id): """Gets the state of a task given a task_id. In testing mode, just logs that it would have retrieved state. This is a subset of the @@ -63,7 +62,6 @@ def state_task(task_id, use_proxy=False): Args: task_id (str): A task id. - use_proxy (bool): Whether to use taskcluster-proxy (default: False) Returns: str: The state of the task, one of @@ -72,7 +70,7 @@ def state_task(task_id, use_proxy=False): if tc_util.testing: logger.info(f"Would have gotten state for {task_id}.") else: - status = status_task(task_id, use_proxy=use_proxy).get("state") or "unknown" + status = status_task(task_id).get("state") or "unknown" return status @@ -118,6 +116,6 @@ def list_task_group_complete_tasks(task_group_id): return tasks -def find_task(index_path, use_proxy=False): +def find_task(index_path): index = get_taskcluster_client("index") return index.findTask(index_path)