CallCounter
Package: flyte.models
Numbers identical sub-action calls made from one action scope: foo(); foo(); foo() → 1, 2, 3.
The sequence disambiguates identical calls in a deterministic sub-action name. A TaskContext owns one, and the TaskContext is built fresh for every action attempt, so numbering always starts from zero — even in a reusable container where one controller outlives many actions and retries. Controllers are the only callers.
Parameters
def CallCounter()Methods
| Method | Description |
|---|---|
next() |
Return the next sequence number for call_key, starting at 1. |
next()
def next(
call_key: str,
) -> intReturn the next sequence number for call_key, starting at 1.
call_key should combine the task identity, the inputs hash, and the group (every component that
is folded into the action name) so that concurrent calls producing different names never share a
count — sequence assignment (and therefore action names) then stays independent of event-loop
scheduling order. Calls that do share a count are byte-identical, same-group, and interchangeable.
| Parameter | Type | Description |
|---|---|---|
call_key |
str |