tor-browser

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

commit 1663328a9c776c937a718366940874696bab7274
parent c95e5a1691708d8e5121ccfc7df4caf8a1718e1f
Author: Andrew Halberstadt <ahal@mozilla.com>
Date:   Fri, 24 Oct 2025 06:35:39 +0000

Bug 1996176 - Update exception handling for taskcluster calls in mozbuild, r=taskgraph-reviewers,jcristau

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

Diffstat:
Mpython/mozbuild/mozbuild/artifacts.py | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/python/mozbuild/mozbuild/artifacts.py b/python/mozbuild/mozbuild/artifacts.py @@ -60,6 +60,7 @@ from mozpack import executables from mozpack.files import FileFinder, JarFinder, TarFinder from mozpack.mozjar import JarReader, JarWriter from mozpack.packager.unpack import UnpackFinder +from taskcluster.exceptions import TaskclusterRestFailure from taskgraph.util.taskcluster import find_task_id, get_artifact_url, list_artifacts from mozbuild.artifact_builds import JOB_CHOICES @@ -1178,7 +1179,10 @@ class TaskCache(CacheManager): ) try: taskId = find_task_id(namespace) - except KeyError: + except (KeyError, TaskclusterRestFailure) as e: + if isinstance(e, TaskclusterRestFailure) and e.status_code != 404: + raise + # Not all revisions correspond to pushes that produce the job we # care about; and even those that do may not have completed yet. raise ValueError(f"Task for {namespace} does not exist (yet)!")