Open abhilasharevur opened 1 year ago
There was only one workflow and it was still running when I executed "list_workflow". So the value for the variable 'finished_at' is null.
Add _check_return_type=False
to your list_workflow()
.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is a mentoring request, please provide an update here. Thank you for your contributions.
This issue has been closed due to inactivity. Feel free to re-open if you still encounter this issue.
_check_return_type=False
seems more like a workaround rather than a fix for the problem. Any plans on fixing this?
This problem is really important when I was trying to use this whole argo python client, please see this comment and consider make this function more friendly, please
The SDKs are autogenerated via OpenAPI. The OpenAPI spec should allow unset finished_at
; if it doesn't, that is a fixable bug.
If the SDK generation tools have a bug though, that is not necessarily fixable within Argo code.
As of right now, Hera is recommended as a Python SDK.
Checklist
* [x] Double-checked my configuration. * [ ] Tested using the latest version. * [x] Used the Emissary executor. ## Summary What happened/what you expected to happen? listing workflows using Python sdk example in the document returns this error: argo_workflows.exceptions.ApiTypeError: Invalid type for variable 'finished_at'. Required value type is datetime and passed type was NoneType at ['received_data']['items'][0]['status']['finished_at'] What version are you running? argo==3.3.7 argo-workflows==6.3.0rc2 ## Diagnostics 1. create, delete workflows work fine 2. list workflow has issue ``` from pprint import pprint import requests import argo_workflows from argo_workflows.api import workflow_service_api configuration = argo_workflows.Configuration(host="https://127.0.0.1:2746") configuration.verify_ssl = False with argo_workflows.ApiClient(configuration) as api_client: api_instance = workflow_service_api.WorkflowServiceApi(api_client) namespace = "dev" try: api_response = api_instance.list_workflows(namespace) pprint(api_response) except argo_workflows.ApiException as e: print("Exception when calling WorkflowServiceApi->list_workflows: %s\n" % e) ``` ```bash # Logs from the workflow controller: Traceback (most recent call last): File "./python_sdk_example.py", line 122, inMessage from the maintainers:
Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.