Skip to content

Data processing with Argo Workflows: CAPA practice questions

Argo Workflows suits batch and data processing because each task is an ordinary container and the controller handles ordering, fan-out, retries and clean-up. A typical job lists its inputs, processes them in parallel and then merges the results, and each of those stages has a matching feature.

By Ibrahim Yesilay · Published · Updated

Independent community practice, not affiliated with or endorsed by CNCF or The Linux Foundation.

What Data processing with Argo Workflows covers in CAPA

Argo Workflows suits batch and data processing because each task is an ordinary container and the controller handles ordering, fan-out, retries and clean-up. A typical job lists its inputs, processes them in parallel and then merges the results, and each of those stages has a matching feature.

Fan-out uses loops. withItems runs a task once for every entry of a literal list, withSequence runs it for a range of numbers given with count or start and end, and withParam runs it for every item of a JSON array. The last form is the one used for dynamic jobs: an earlier step lists the files or partitions to process and prints them as JSON, and the next step loops over {{steps.list.outputs.result}}. Loop iterations run in parallel. A later step can collect the outputs of all iterations, and artifacts move the actual data through the artifact repository instead of through parameters.

Parallelism needs limits so that a large fan-out does not flood the cluster. parallelism on the workflow caps the Pods it runs at once, and parallelism on a template caps the tasks it starts. The controller can also cap the number of running workflows across the cluster or per namespace. Mutexes and semaphores in the synchronization block go further: a mutex allows a single holder at a time, and a semaphore, sized in a ConfigMap, allows a configured number, at either workflow or template level.

Long jobs fail in many small ways, so retries matter. retryStrategy sets a limit, a retryPolicy of OnFailure (the default), OnError, OnTransientError or Always, and an exponential backoff with a duration, a factor and a maximum. A failed run can be retried with argo retry, which reruns only the nodes that did not succeed. Volumes give steps a shared working directory: volumeClaimTemplates creates a claim for the run and removes it at the end.

Running thousands of Pods also leaves objects behind. podGC deletes completed Pods, ttlStrategy deletes finished workflows after a delay, and CronWorkflow history limits trim scheduled runs, which together keep the API server and the controller from slowing down.

Key points

  • withParam loops over a JSON list, often produced by an earlier step, for dynamic fan-out.
  • Loop iterations run in parallel unless parallelism limits them.
  • A semaphore allows a configured number of concurrent holders; a mutex allows one.
  • The default retryPolicy is OnFailure; Always also retries on errors.

Three sample questions

12 CAPA questions on Data processing with Argo Workflows, 12 with explanations. How practice works

Question 1

What does the parallelism field control in a Workflow?
  1. A.The maximum number of pods that can run simultaneously
  2. B.The number of Workflows the controller runs at once across the cluster
  3. C.The number of workflow replicas
  4. D.The number of CPU cores allocated to each pod

Correct answer: A

spec.parallelism on a Workflow limits how many of its pods run at the same time, which keeps a large fan-out from flooding the cluster. Why the other options are wrong. "The number of Workflows the controller runs at once ...": that limit is the workflow controller's own parallelism setting in its ConfigMap, not a field of one Workflow. "The number of workflow replicas": Workflows are not replicated; each submission is a separate Workflow object. "The number of CPU cores allocated to each pod": CPU is set with container resource requests and limits.

Sources: Argo Workflows docs: Parallelism, Argo Workflows docs: Field Reference

Question 2

What is the purpose of the withItems field in a Workflow?
  1. A.To include multiple templates in one step and run them in sequence
  2. B.To attach items to artifacts
  3. C.To iterate over a list and execute a template for each item
  4. D.To list the workflow parameters that the entrypoint template accepts

Correct answer: C

The Loops walk-through lists three ways to run a template multiple times: withSequence, withItems and withParam. withItems takes a list of plain values or JSON objects, which a template reads as {{item}} or {{item.key}}, and the template is instantiated once per element. Why the other options are wrong. "To include multiple templates in one step and run them ...": withItems repeats one template once per element; combining different templates in a step is done in the steps or DAG structure, not through this field. "To attach items to artifacts": The items are values substituted through {{item}}; the field has no connection to artifacts. "To list the workflow parameters that the entrypoint tem...": It supplies the values to iterate over; it does not list or declare workflow parameters.

Sources: Argo Workflows docs: Loops

Question 3

What does the memoization feature do in Argo Workflows?
  1. A.Reduces controller memory by offloading large node status to a database
  2. B.Stores workflow history
  3. C.Creates workflow backups that can be restored after a cluster failure
  4. D.Caches step outputs to skip re-execution of identical steps

Correct answer: D

Step-level memoization records the outputs of previously run steps in a cache under a key you set on the template (usually derived from inputs), so an identical step can reuse the stored result instead of running again. The cache is kept in ConfigMaps labelled workflows.argoproj.io/configmap-type: Cache, and an optional maxAge limits how long an entry is valid. Why the other options are wrong. "Stores workflow history": Memoization is a result cache, not an archive of workflow history (that is the separate workflow archive feature). "Reduces controller memory by offloading large node stat...": The Memoization page frames it as reducing cost and execution time, not as a tool for lowering controller memory use or offloading node status. "Creates workflow backups that can be restored after a c...": Cache entries store step outputs in ConfigMaps for reuse; they are not backups of workflows.

Sources: Argo Workflows docs: Memoization

Practice this topic

Focus mode keeps every question on Data processing with Argo Workflows 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.