argoproj-labs / hera

Hera makes Python code easy to orchestrate on Argo Workflows through native Python integrations. It lets you construct and submit your Workflows entirely in Python. ⭐️ Remember to star!
https://hera.rtfd.io
Apache License 2.0
609 stars 107 forks source link

support asyncio for workflow service #1266

Open yulin-li opened 5 days ago

yulin-li commented 5 days ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. e.g.. I'm always frustrated when [...]

For workflow service actions, such as list/submit workflows, it will be great if an asyncio version is provided in the SDK.

Describe the solution you'd like A clear and concise description of what you want to happen.

provide an asyncio version of WorkflowsService based on e.g., aiohttp instead of request

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

flaviuvadan commented 5 days ago

Hi @yulin-li, this is a great idea. Are you open to submit a PR? Hera uses this script https://github.com/argoproj-labs/hera/blob/main/scripts/service.py to generate the workflow service. We need an async_service.py with some templates adjusted and a Make recipe like this. The submit API of cron and workflow have to change as well to account for the async nature of the injected service as well