Skip to content

Enhance agent.tasks.run() core library with retry logic for unavailable modules #7914

@DavidePrincipi

Description

@DavidePrincipi

The agent.tasks() in the core library does not implement a retry or appropriate handling for unready modules.

Proposed solution

Enhance the agent.tasks.run() Python library so that if a 404 (or possibly a 503) error is returned for module tasks (meaning the target module/agent is not ready), it implements a retry mechanism before aborting.

Alternative solutions

Not handling the core agent.tasks library, requires workaround logic to be added in every affected service or helper (such as imapsync). But this duplicates efforts and logic across multiple components.

Additional context

See #7910 for the concrete failure case, including logs and example scenario. A late or failed response from api-server causes the process to abort immediately instead of cleanly retrying for a short time.

See also

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions