Argo Workflows DAGs: CAPA practice questions
A dag template describes work as tasks and the dependencies between them, rather than as a fixed list of stages. Each task names the template it runs and, optionally, the tasks it depends on.
By Ibrahim Yesilay · Published · Updated
Independent community practice, not affiliated with or endorsed by CNCF or The Linux Foundation.
What Argo Workflows DAGs covers in CAPA
A dag template describes work as tasks and the dependencies between them, rather than as a fixed list of stages. Each task names the template it runs and, optionally, the tasks it depends on. Tasks without dependencies start as soon as the DAG starts, and every other task starts once the tasks it depends on have finished, so independent branches run in parallel without any extra configuration. Steps can express the same work as a list of lists, where the outer list runs in sequence and each inner list runs in parallel, but a DAG is usually simpler when the shape is a diamond or a wide fan-out.
Dependencies can be written in two ways. The dependencies field lists task names. The depends field takes an expression over task results, such as A.Succeeded, B.Failed, C.Errored, D.Skipped or E.Omitted, combined with &&, || and !. A bare task name inside depends means that the task Succeeded, was Skipped or is Daemoned. depends therefore lets a task run only when another one failed, for example to send a notification, which plain dependencies cannot express. The documentation does not allow both fields in the same task group.
Data moves between tasks with the tasks prefix: {{tasks.generate.outputs.result}} reads the standard output of a script task, and {{tasks.generate.outputs.parameters.name}} or the artifacts equivalent reads a declared output. A when expression on a task skips it unless the condition is true, and a skipped task counts as resolved for the default depends meaning. Tasks can loop with withItems, withParam or withSequence, which expand one task into several parallel copies.
Failure handling is the part that most often surprises people. By default a DAG fails fast: once one task fails, the controller schedules no new tasks, lets the running ones finish and then marks the DAG as failed. Setting failFast to false on the dag template lets every branch run to completion before the result is reported. A target field can also limit a run to a named task and the tasks it needs, which is useful for testing one branch of a large graph.
Key points
- Tasks with no dependencies start immediately; the others wait for the tasks they depend on.
- depends accepts results such as A.Failed and the operators &&, || and !.
- A bare name in depends means Succeeded, Skipped or Daemoned.
- DAGs fail fast by default; failFast: false lets the other branches finish.
Three sample questions
11 CAPA questions on Argo Workflows DAGs, 11 with explanations. How practice works
Question 1
dag:
tasks:
- name: A
template: process
- name: B
dependencies: [A]
template: analyze- A.The syntax is incorrect
- B.The syntax is correct and B will run after A
- C.The syntax is correct but missing required fields
- D.Dependencies should use "depends" instead of "dependencies"
Correct answer: B
Sources: Argo Workflows docs: DAG, Argo Workflows docs: Enhanced Depends Logic
Question 2
- A.Steps
- B.Container
- C.DAG
- D.Suspend
Correct answer: C
dependencies list, so a task starts as soon as the tasks it depends on have finished while independent tasks run in parallel; the docs describe this as allowing maximum parallelism. Why the other options are wrong. "Steps": a steps template is an ordered list of step groups where only the entries inside one group run together, and there is no per-task dependency graph. "Container": a container template only describes the work of a single container and does not orchestrate other tasks. "Suspend": a suspend template pauses execution for a duration or until it is resumed, it does not schedule tasks.Sources: Argo Workflows docs: DAG, Argo Workflows docs: Steps, Argo Workflows docs: Core Concepts
Question 3
failFast is left at its default. What happens next?- A.Tasks that depend on it are skipped, but every independent task that has not started yet still starts
- B.No new tasks are scheduled; tasks already running finish, then the DAG is marked failed
- C.The whole workflow is terminated at once, including tasks that are still running
- D.The failed task is retried automatically three times before the DAG continues
Correct answer: B
failFast: false, where all branches run to completion. "The whole workflow is terminated at once ...": running tasks are allowed to finish. "The failed task is retried automatically three times ...": retries happen only when a retryStrategy is set.Sources: Argo Workflows docs: DAG, Argo Workflows docs: Field Reference
Practice this topic
Focus mode keeps every question on Argo Workflows DAGs until you leave it. 10 free guest answers, then a free account; no credit card.
Or open CAPA practice across all topics.
Sources
The explanation above was checked against these official documents.
- Argo Workflows docs: DAG walk-through (checked 2026-10-28)
- Argo Workflows docs: Enhanced depends logic (checked 2026-10-28)
- Argo Workflows docs: Core concepts (checked 2026-10-28)
- Argo Workflows docs: Loops (checked 2026-10-28)