← All changes ·

Smart retries in Cloud

Retry a failed asset based on why it failed: temporary errors without using its retries, out of memory on a larger instance.

Retrying every failure the same way spends retries on failures a retry can't fix, and runs out of them on a flaky API. With smart retries, Bruin Cloud reads why an asset failed and retries it accordingly: temporary errors without using its retries, out of memory on a larger instance, and failures a retry won't fix not at all.

An asset run in Bruin Cloud that smart retries retried once after a temporary error, without using the asset's retries.

1. Turn it on

Add smart_retries under default: in pipeline.yml to turn it on for every asset in the pipeline:

default:
  smart_retries:
    enabled: true

You can also set smart_retries on a single asset. In a SQL or Python asset's comment header, use @bruin.smart_retries.enabled: true. Set enabled: false on an asset to keep it on regular retries.

2. How each failure is retried

  • Temporary failures, such as a timeout, a rate limit, a dropped connection or a server error from an API: retried up to 100 times in a run, without using the asset's retries.
  • Out of memory: retried on the next larger instance your team allows (or the same one if it's already the largest), for that run only. This uses one of the asset's retries.
  • Failures a retry won't fix, such as a SQL error, a missing connection, missing permissions or billing limits at the provider: not retried, so the asset fails right away. Fix the cause and rerun it.
  • Anything else is retried up to retries times, as before.

3. See what smart retries did

Assets and pipelines that use smart retries show a Smart retries badge. When smart retries act on a run, the asset's run page says what they did: how many temporary errors were retried, which instance each try ran on after running out of memory, or why the asset wasn't retried.

What the run page shows after temporary errors, after running out of memory twice, and after a SQL error that a retry won't fix.

Your pipeline's failure notifications say the same, so you know why an asset was or wasn't retried without opening the run.

Good to know

  • retries: 0 turns off all retries, temporary failures included.
  • rerun_cooldown, if set, still applies between retries.
  • An asset isn't retried after its run ends or after you mark it as failed.
  • Rerunning a run starts over: the retry counts and the instance size reset.
  • Quality checks keep their own retries.

See the smart retries docs for details.

Sign up to our newsletter

Practical updates on open-source data pipelines, AI analysts, governance, and what we are shipping at Bruin.

The signup form is hosted by Brevo. Allow marketing cookies to load it.