Hi,
Fair question, and the honest answer is that the docs don't say. I went through the For each page, the repair page and the monitoring page and none of them mention how a repair treats iterations. So anything you read claiming "only failed iterations are re-run" is someone's observation, not documented behavior.
What is documented is the general rule, and it's worth reading with For each in mind. A repair run re-runs "only the subset of unsuccessful tasks and any dependent tasks", and the page is explicit that "A repair re-runs each unsuccessful task from the beginning. Lakeflow Jobs doesn't make tasks idempotent, so if a task wrote part of its output before it failed, re-running it can duplicate that data." The For each is a single task in the job graph; the iterations are runs of the nested task inside it, and the repair API only takes task keys (rerun_tasks, rerun_all_failed_tasks, rerun_dependent_tasks), not iteration ids. Reading the documented rule literally, if the For each task ended as failed or canceled, the repair re-runs that task from the beginning, which means all iterations. I would not bet production data on the opposite until Databricks writes it down.
https://docs.databricks.com/aws/en/jobs/repair-job-failures
https://docs.databricks.com/aws/en/jobs/tasks/for-each
Two practical things. First, it's a five-minute test: a For each over 5 values with a nested notebook that fails on one of them, then Repair run, and check the iterations table with the "Only failed iterations" filter off. Second, whatever the answer, make the nested task idempotent (MERGE, or check-and-skip on the input value) so a full re-run is harmless. That's what the docs are steering you towards anyway.
https://docs.databricks.com/aws/en/jobs/monitor#view-task-run-history-for-a-for-each-task
For the docs request, use the feedback control on that page; that goes straight to the docs team and they do pick these up. If you run the test, post the result here, I'd like to know too.
Thomaz A. Rossito Neto
Principal Data & AI โ CI&T
thomazn@ciandt.com
linkedin.com/in/thomaz-antonio-rossito-neto