Skip to content

Expose tracked child runs as a readable API #1129

Description

@vdusek

Once named child runs are tracked (#1127), the registry already knows every child and its state.
It should be readable.

Depends on #1127.

Proposal

runs = await Actor.child_runs()
# {'scrape-eu': RunInfo(run_id='abc123', status='RUNNING', started_at=...),
#  'scrape-us': RunInfo(run_id='def456', status='SUCCEEDED', started_at=...)}

That is enough for a caller to build their own progress reporting:

Counter(r.status for r in (await Actor.child_runs()).values())
# Counter({'RUNNING': 3, 'SUCCEEDED': 1, 'FAILED': 2})

One question this raises for #1127: whether the registry keeps a history per name. If scrape-eu
failed and was restarted under the same name, a report covering only the live run hides the failed
attempts. apify-orchestrator keeps both, in a failedHistory map alongside the current runs.

Out of scope

An on_update callback firing whenever a child changes status, which apify-orchestrator exposes as
UpdateCallback.

It would put a polling loop and an interval option inside the SDK, a callback cannot be persisted
across a migration the way the registry is, and the orchestrator needed a second callback for
item-count changes on top of the status one. A caller can poll Actor.child_runs() instead. Worth
revisiting if the SDK shares a single poll across all children, since that part a caller cannot do
from outside.

Prior art

✍️ Drafted by Claude Code

Activity

  1. added
    t-tooling
    on Sep 16, 2026
  2. added
    enhancement
    on Sep 16, 2026
  3. B4nan commented on Sep 22, 2026

    @B4nan
    Member

    On the history question: keep it. A retry policy (see the concurrency/retry issues) needs to count previous attempts per name, and "how many times did scrape-eu fail before it succeeded" is exactly what a progress report needs. The orchestrator's current + failedHistory split is a reasonable shape.

  4. self-assigned this
    on Sep 30, 2026
  5. added a commit that references this issue on Oct 9, 2026
    d382995
  6. vdusek commented on Oct 9, 2026

    @vdusek
    ContributorAuthor

    resolved by #1151

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementt-tooling

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions