From 82c82b1ee6991915928fcde964a81e1e8a230544 Mon Sep 17 00:00:00 2001 From: Daniel Sola Date: Wed, 27 Mar 2024 15:37:40 -0700 Subject: [PATCH 1/3] Change retry error from RuntimeError to FlyteRecoverableException Signed-off-by: Daniel Sola --- docs/flyte_fundamentals/optimizing_tasks.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/flyte_fundamentals/optimizing_tasks.md b/docs/flyte_fundamentals/optimizing_tasks.md index 9f3124e270..00b3c693f1 100644 --- a/docs/flyte_fundamentals/optimizing_tasks.md +++ b/docs/flyte_fundamentals/optimizing_tasks.md @@ -66,12 +66,13 @@ import random @task(retries=3) def compute_mean(data: List[float]) -> float: if random() < 0.05: - raise RuntimeError("Something bad happened 🔥") + raise FlyteRecoverableException("Something bad happened 🔥") return sum(data) / len(data) ``` ```{note} -Retries only take effect when running a task on a Flyte cluster. +Retries only take effect when running a task on a Flyte cluster. +See {ref}`Fault Tolerance ` for details on the types of errors that will be retried. ``` ## Timeouts From e50b377e891f3f4c90e2ef52f7119acb3dcd7174 Mon Sep 17 00:00:00 2001 From: Daniel Sola Date: Thu, 28 Mar 2024 08:42:31 -0700 Subject: [PATCH 2/3] add fault-tolerance header Signed-off-by: Daniel Sola --- docs/concepts/tasks.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/concepts/tasks.rst b/docs/concepts/tasks.rst index 94807d3632..929b615d21 100644 --- a/docs/concepts/tasks.rst +++ b/docs/concepts/tasks.rst @@ -71,6 +71,7 @@ types in the system. Flyte has a set of defined, battle-tested task types. It al Inherent Features ----------------- +.. _fault-tolerance: Fault tolerance ^^^^^^^^^^^^^^^ From 422167478088dc147a2d9ba244ef07d124ce88ac Mon Sep 17 00:00:00 2001 From: Daniel Sola Date: Thu, 28 Mar 2024 08:55:44 -0700 Subject: [PATCH 3/3] add blank line Signed-off-by: Daniel Sola --- docs/concepts/tasks.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/concepts/tasks.rst b/docs/concepts/tasks.rst index 929b615d21..8e5cc7aaec 100644 --- a/docs/concepts/tasks.rst +++ b/docs/concepts/tasks.rst @@ -72,6 +72,7 @@ Inherent Features ----------------- .. _fault-tolerance: + Fault tolerance ^^^^^^^^^^^^^^^