I tried to use get_latest_job_shallow as documented here:
workflow_job_shallow = onedata_api.workflows.jobs.get_latest_job_shallow(wf_id,JobExecutionState.SUCCESS)
first parameter wf_id is a string and second parameter is of the type required in the docu
getting the following error:
raceback (most recent call last):
File “/Users/julia.hehl/PycharmProjects/one_org/scripts/monitoring/testing_repartition.py”, line 69, in
exeuction_time = get_execution_time(onedata_api, ‘d9ce1666-9207-4bdc-98dc-6645dd479550’)
File “/Users/julia.hehl/PycharmProjects/one_org/scripts/monitoring/testing_repartition.py”, line 23, in get_execution_time
workflow_job_shallow = onedata_api.workflows.jobs.get_latest_job_shallow(wf_id,JobExecutionState.SUCCESS)
File “/Users/julia.hehl/PycharmProjects/one_org/env/lib/python3.8/site-packages/onedata/util/decorators.py”, line 131, in wrapper_uuid_as_string
return func(*new_args, **kwargs)
File “/Users/julia.hehl/PycharmProjects/one_org/env/lib/python3.8/site-packages/onedata/workflows/jobs/api.py”, line 79, in get_latest_job_shallow
return self._execute(
File “/Users/julia.hehl/PycharmProjects/one_org/env/lib/python3.8/site-packages/onedata/common/api.py”, line 27, in _execute
return self._executor_service.execute(command, options)
File “/Users/julia.hehl/PycharmProjects/one_org/env/lib/python3.8/site-packages/onedata/util/services.py”, line 169, in execute
return self._deserializer_service.deserialize(matching_executor.execute(command), command)
File “/Users/julia.hehl/PycharmProjects/one_org/env/lib/python3.8/site-packages/onedata/workflows/jobs/executors.py”, line 59, in execute
paginated_result: Paginated = self._executor_service.execute(
File “/Users/julia.hehl/PycharmProjects/one_org/env/lib/python3.8/site-packages/onedata/util/services.py”, line 169, in execute
return self._deserializer_service.deserialize(matching_executor.execute(command), command)
File “/Users/julia.hehl/PycharmProjects/one_org/env/lib/python3.8/site-packages/onedata/workflows/jobs/executors.py”, line 128, in execute
handle_error(response)
File “/Users/julia.hehl/PycharmProjects/one_org/env/lib/python3.8/site-packages/onedata/util/error_handler.py”, line 14, in handle_error
raise Exception(f"{msg}: {response.status_code}: {response.text}")
Exception: Wrong error code returned: 500: {“errors”:[“Failed to convert value of type ‘java.lang.String’ to required type ‘de.onelogic.forecasting.dto.jobs.WorkflowJobExecutionStateDTO’; nested exception is java.lang.IllegalArgumentException: Could not map string to a representation type”]}
Process finished with exit code 1