diff --git a/docs/container-set-template.md b/docs/container-set-template.md index 7ff22e068f77..2108fa3d08b9 100644 --- a/docs/container-set-template.md +++ b/docs/container-set-template.md @@ -151,7 +151,7 @@ spec: args: - | print("hi") - # if fails, it will retry at most ten times. + # if fails, it will retry at most ten times. - name: fail-retry image: python:alpine3.6 command: ["python", -c] @@ -159,25 +159,30 @@ spec: args: ["import random; import sys; exit_code = random.choice([0, 1, 1]); sys.exit(exit_code)"] ``` -!!! Note Template-level `retryStrategy` vs Container Set `retryStrategy` + + +!!! Note "Template-level `retryStrategy` vs Container Set `retryStrategy`" `containerSet.retryStrategy` works differently from [template-level retries](retries.md): + 1. Your `command` will be re-ran by the Executor inside the same container if it fails. - - As no new containers are created, the nodes in the UI remain the same, and the retried logs are appended to original container's logs. For example, your container logs may look like: -```text -time="2024-03-29T06:40:25 UTC" level=info msg="capturing logs" argo=true -intentional failure -time="2024-03-29T06:40:25 UTC" level=debug msg="ignore signal child exited" argo=true -time="2024-03-29T06:40:26 UTC" level=info msg="capturing logs" argo=true -time="2024-03-29T06:40:26 UTC" level=debug msg="ignore signal urgent I/O condition" argo=true -intentional failure -time="2024-03-29T06:40:26 UTC" level=debug msg="ignore signal child exited" argo=true -time="2024-03-29T06:40:26 UTC" level=debug msg="forwarding signal terminated" argo=true -time="2024-03-29T06:40:27 UTC" level=info msg="sub-process exited" argo=true error="" -time="2024-03-29T06:40:27 UTC" level=info msg="not saving outputs - not main container" argo=true -Error: exit status 1 -``` + - As no new containers are created, the nodes in the UI remain the same, and the retried logs are appended to original container's logs. For example, your container logs may look like: + ```text + time="2024-03-29T06:40:25 UTC" level=info msg="capturing logs" argo=true + intentional failure + time="2024-03-29T06:40:25 UTC" level=debug msg="ignore signal child exited" argo=true + time="2024-03-29T06:40:26 UTC" level=info msg="capturing logs" argo=true + time="2024-03-29T06:40:26 UTC" level=debug msg="ignore signal urgent I/O condition" argo=true + intentional failure + time="2024-03-29T06:40:26 UTC" level=debug msg="ignore signal child exited" argo=true + time="2024-03-29T06:40:26 UTC" level=debug msg="forwarding signal terminated" argo=true + time="2024-03-29T06:40:27 UTC" level=info msg="sub-process exited" argo=true error="" + time="2024-03-29T06:40:27 UTC" level=info msg="not saving outputs - not main container" argo=true + Error: exit status 1 + ``` -!!! Note 1. If a container's `command` cannot be located, it will not be retried. + - As it will fail each time, the retry logic is short-circuited. + +