Skip to content

When job-wait is executed immediately after job-create, it cause an IndexError #165

@haracejacob

Description

@haracejacob

When job-wait is executed immediately after job-create, the core_v1.list_namespaced_pod() function sometimes returns an empty array, it cause an IndexError when accessing pod_list.items[0]. I think this is due to the delay between job creation and pod creation.

In this case the pod should be considered not ready. So it have to wait for the pod to be ready. But the script terminates without error handling. (rel https://github.com/rundeck-plugins/kubernetes/blob/master/contents/job-wait.py#L68)

So i made PR fixing this problem, could you please review it? (PR #155)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions