Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The list_item_job_instances not return text when Failed in column Failure Reason #375

Open
stjeloma opened this issue Dec 19, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@stjeloma
Copy link

Describe the bug
The list_item_job_instances not return text when Failed in column Failure Reason:

Image

@stjeloma stjeloma added the bug Something isn't working label Dec 19, 2024
@m-kovalsky
Copy link
Collaborator

what does the response.json().get('value') show?

@stjeloma
Copy link
Author

[{'id': '3ea58be5-b3e9-4959-ab1c-4ae0ce9383a2', 'itemId': '8d201d5e-8628-40b2-87a7-93086e61793c', 'jobType': 'Pipeline', 'invokeType': 'Scheduled', 'status': 'Completed', 'failureReason': None, 'rootActivityId': '5604640b-f7c3-426d-8983-a0f0fce188a7', 'startTimeUtc': '2024-12-19T04:15:02.7858664', 'endTimeUtc': '2024-12-19T04:24:16.8630936'}, {'id': 'a3126aa7-bbea-4695-8ab2-0a84fc5ced5b', 'itemId': '8d201d5e-8628-40b2-87a7-93086e61793c', 'jobType': 'Pipeline', 'invokeType': 'Manual', 'status': 'Cancelled', 'failureReason': None, 'rootActivityId': 'fe75d87c-8a11-530c-7609-5a5809e2bca9', 'startTimeUtc': '2024-12-18T13:22:03.3583534', 'endTimeUtc': '2024-12-18T13:22:49.5477326'}, {'id': '43ec65de-2096-4bef-902a-d23e754b1cb1', 'itemId': '8d201d5e-8628-40b2-87a7-93086e61793c', 'jobType': 'Pipeline', 'invokeType': 'Scheduled', 'status': 'Completed', 'failureReason': None, 'rootActivityId': 'a0dabb53-37d6-4259-a527-afbdce01aaba', 'startTimeUtc': '2024-12-18T04:15:02.7687141', 'endTimeUtc': '2024-12-18T04:30:13.8358501'}, {'id': '42fbf27f-4979-4f58-b47c-404784ba8906', 'itemId': '8d201d5e-8628-40b2-87a7-93086e61793c', 'jobType': 'Pipeline', 'invokeType': 'Scheduled', 'status': 'Completed', 'failureReason': None, 'rootActivityId': '332dda5f-5615-464a-96e0-8265f1837d3a', 'startTimeUtc': '2024-12-17T04:15:02.726455', 'endTimeUtc': '2024-12-17T04:20:38.1548443'}, {'id': 'a9ef08ca-ae85-4598-afb7-48a42031fe0d', 'itemId': '8d201d5e-8628-40b2-87a7-93086e61793c', 'jobType': 'Pipeline', 'invokeType': 'Scheduled', 'status': 'Completed', 'failureReason': None, 'rootActivityId': '076e8e6d-325c-426a-a9e3-33968cd38427', 'startTimeUtc': '2024-12-16T04:15:02.6238468', 'endTimeUtc': '2024-12-16T04:23:04.8876376'}, {'id': '66cffc88-b53e-47d7-ad1e-58fab7388fe9', 'itemId': '8d201d5e-8628-40b2-87a7-93086e61793c', 'jobType': 'Pipeline', 'invokeType': 'Scheduled', 'status': 'Completed', 'failureReason': None, 'rootActivityId': 'ae6c92fd-8be5-4047-8dd9-d3d37dbf8b43', 'startTimeUtc': '2024-12-15T04:15:02.7692068', 'endTimeUtc': '2024-12-15T04:26:19.9296012'}, {'id': 'd731ac55-7052-40fb-b7e7-d849a180512a', 'itemId': '8d201d5e-8628-40b2-87a7-93086e61793c', 'jobType': 'Pipeline', 'invokeType': 'Scheduled', 'status': 'Completed', 'failureReason': None, 'rootActivityId': '15764198-93f6-474a-80ec-7eb16754861e', 'startTimeUtc': '2024-12-14T04:15:02.4165177', 'endTimeUtc': '2024-12-14T04:24:11.4824986'}, {'id': '61d48e21-434d-4481-b4dc-ae81d8e8db3b', 'itemId': '8d201d5e-8628-40b2-87a7-93086e61793c', 'jobType': 'Pipeline', 'invokeType': 'Scheduled', 'status': 'Failed', 'failureReason': {'requestId': 'd52e4cd1-031e-4876-9a37-a378875fb8c9', 'errorCode': 'Failed', 'message': 'Operation on target Truncar tablas failed: Please check your network connectivity to ensure your on-premises data gateway can access we.frontend.clouddatahub.net and restart the service to retry the connection again once the connectivity issue has been resolved.'}, 'rootActivityId': '24d11fd0-30b8-4056-8dd3-064f847e692e', 'startTimeUtc': '2024-12-13T04:15:02.4347927', 'endTimeUtc': '2024-12-13T04:18:43.1056291'}, ....

@stjeloma
Copy link
Author

@m-kovalsky this is me code for this:
for artifact_run in artifact_runs:
# Add all fields
runs_total.append({
"ItemName": artifact_name,
"ItemId": artifact_run.get("itemId"),
"JobType": artifact_run.get("jobType"),
"JobId": artifact_run.get("id"),
"InvokeType": artifact_run.get("invokeType"),
"Status": artifact_run.get("status"),
"FailureReason": artifact_run.get("failureReason", {}).get("message", "No allow") if artifact_run.get("failureReason") else "No allow",
"RootActivityId": artifact_run.get("rootActivityId"),
"StartTimeUTC": artifact_run.get("startTimeUtc"),
"EndTimeUTC": artifact_run.get("endTimeUtc")
})

@m-kovalsky
Copy link
Collaborator

See PR #374. This will be made available in the next version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants