retries

command
v1.0.0-beta.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

README

Retries and durable failures

This sample demonstrates retry behavior with deterministic, activity-owned failure injection. It does not use randomness, wall-clock time, or atomics inside orchestrator or retry-handler code.

Run

export DTS_CONNECTION_STRING='Endpoint=http://127.0.0.1:8080;TaskHub=default;Authentication=None'
go run ./samples/retries

What it proves

  • A transient activity failure is retried and recovers after the known first two failures.
  • The retry handler uses task.RetryContext and durable failure details to stop retrying a typed permanent failure.
  • A custom non-retriable error bypasses retry and preserves custom properties in the failure chain.

Successful paths use api.WithFetchPayloads(true) and dtssample.RequireCompleted. Intentional failure paths assert FAILED status, concrete durable error types, properties, and attempt counts. SAMPLE_OK retries appears only after all assertions and exact-ID cleanup succeed.

Documentation

Overview

Command retries demonstrates deterministic activity retry policies against DTS.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL