Alation / Allie-SDK

A Python library for the Alation REST APIs.
https://alation.github.io/Allie-SDK/
Apache License 2.0
9 stars 2 forks source link

Return both job details for Custom Fields Values API #26

Closed diethard-at-alation closed 2 months ago

diethard-at-alation commented 3 months ago

The Custom Field Values API now runs two jobs. Currently Allie SDK only returns job details for the first job. Amend, so that job details for both are returned.

diethard-at-alation commented 3 months ago

"You only get one job ID back from the initial request. When you send that job ID to the jobs API, you will get back the ID of the second job." This behaviour is related to the migration of the LMS from the old storage method to the new one. Even after the migration, for a good amount of time, this behaviour will continue.

diethard-at-alation commented 3 months ago

I just checked what the response is from an Alation instance that's on the latest version:

{
    "status": "successful",
    "msg": "Job finished in 0.162926 seconds at 2024-08-22 09:18:02.994214+00:00",
    "result": [
        "Start bulk upsert values to annotation value microservice... Legacy(Rosemeta) write job_id (can be tracked using jobs API): 7637",
        "Updated values count: 1. Error count: 0. Errors: [] Legacy(Rosemeta) write job_id (can be tracked using jobs API): 7637",
        "Finished bulk upsert values to annotation value microservice. Legacy(Rosemeta) write job_id (can be tracked using jobs API): 7637"
    ]
}

Notice that the secondary job id is mentioned as part of a longer sentence, so it is a bit cumbersome to extract. Also, my impression is, that not many people will be worried about checking the status of a job that updates a legacy component.

diethard-at-alation commented 2 months ago

Merged into main. Closing.