airflow.providers.common.ai.durable.base

Shared interface for durable execution storage backends.

Attributes

DURABLE_KEY_PREFIX

RUN_ID_KEY

RUNS_KEY

Classes

DurableStorageProtocol

Persistence contract shared by the durable execution storage backends.

Functions

build_step_key(run, position)

Build the journal key for the step at position of the agent run run.

build_run_meta_key(run)

Build the journal key for what the agent run run keeps about itself across attempts.

Module Contents

airflow.providers.common.ai.durable.base.DURABLE_KEY_PREFIX = '__commonai_durable__'[source]
airflow.providers.common.ai.durable.base.build_step_key(run, position)[source]

Build the journal key for the step at position of the agent run run.

airflow.providers.common.ai.durable.base.build_run_meta_key(run)[source]

Build the journal key for what the agent run run keeps about itself across attempts.

airflow.providers.common.ai.durable.base.RUN_ID_KEY = '__commonai_durable__run_id'[source]
airflow.providers.common.ai.durable.base.RUNS_KEY = '__commonai_durable__runs'[source]
class airflow.providers.common.ai.durable.base.DurableStorageProtocol[source]

Bases: Protocol

Persistence contract shared by the durable execution storage backends.

Implemented by DurableStorage (ObjectStorage, Airflow < 3.3) and TaskStateStoreDurableStorage (AIP-103 task state store, Airflow >= 3.3). The journal depends on this interface, not a concrete backend.

An entry is a JSON-compatible dict. save_step returns whether the entry was written: a backend may skip a write (a value it cannot store, a store write that fails) without failing the step, which then runs again on retry.

save_step(key, entry)[source]
load_step(key)[source]
delete_steps(keys)[source]

Delete these entries. Best-effort: runs after the work succeeded, so it must not raise.

Was this entry helpful?