How to check if push_container_exec_base_images() succeeded

Options
yashpuranik
yashpuranik Partner, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2022, Neuron 2023 Posts: 69 Neuron

Hi,

I was looking at using push_container_exec_base_images() in connection with some other steps to work on building and updating some base images for Dataiku using the Python API (https://developer.dataiku.com/latest/api-reference/python/other-administration.html#dataikuapi.dss.admin.DSSGeneralSettings.push_container_exec_base_images).

The method appears to be non-blocking: I imagine it triggers the image pushes but returns control immediately. What is a good way to check if the base image push process has successfully completed before continuing on in the script? Currently, I simply sleep in my script for 10 minutes, but a more efficient method would be ideal

Thanks,

Yash

Best Answer

  • Zach
    Zach Dataiker, Dataiku DSS Core Designer, Dataiku DSS Adv Designer, Registered Posts: 153 Dataiker
    Answer ✓
    Options

    Hi @yashpuranik
    ,

    Instead of using DSSGeneralSettings.push_container_exec_base_images, you can use DSSClient.push_base_images, which returns a DSSFuture object that you can wait on.

    Example:

    import dataikuclient = dataiku.api_client()# Start pushing the base imagesfuture = client.push_base_images()# Wait for the push to complete, and get the resultresult = future.wait_for_result()

    Thanks,

    Zach

Answers

Setup Info
    Tags
      Help me…