Skip to content

Commit

Permalink
fix markdown in admonition with an ignore and some new line corrections
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Gilgur <[email protected]>
  • Loading branch information
Anton Gilgur committed Apr 4, 2024
1 parent decbcc2 commit 02ce8da
Showing 1 changed file with 22 additions and 17 deletions.
39 changes: 22 additions & 17 deletions docs/container-set-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,33 +151,38 @@ 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]
# fail with a 66% probability
args: ["import random; import sys; exit_code = random.choice([0, 1, 1]); sys.exit(exit_code)"]
```

!!! Note Template-level `retryStrategy` vs Container Set `retryStrategy`
<!-- markdownlint-disable MD046 -- allow indentation within the admonition -->

!!! 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="<nil>"
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="<nil>"
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.

<!-- markdownlint-enable MD046 -->

0 comments on commit 02ce8da

Please sign in to comment.