kubeflow / kubeflow/sdk

bug(trainer): ContainerBackend.wait_for_job_status missing polling_interval validation

Open
#411 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
148
Forks
262
Avg merge
1d 2h
Merged PRs (30d)
1

Description

## What happened?

`ContainerBackend.wait_for_job_status` does not validate that `polling_interval`
is less than `timeout`. Both the kubernetes and localprocess backends have this
guard, but the container backend is missing it entirely.

When `polling_interval >= timeout`, the time-based while loop exits before
the first sleep completes — job status is checked zero times — and a
`TimeoutError` is raised immediately with a misleading message.
No error is raised for clearly invalid input.

## What did you expect?

A clear `ValueError` should be raised before the loop starts, matching
the behavior of the other two backends.

## Affected file

`kubeflow/trainer/backends/container/backend.py` — `wait_for_job_status`

## Related

Same class of bug as #400 (kubernetes backend), fixed in #402.

Contributor guide

Open the contributing guide

Research direction

Start in kubeflow/trainer/backends/container/backend.py at ContainerBackend.wait_for_job_status, then compare the polling_interval validation in the kubernetes and localprocess backends and the related fix in #402. Done means invalid intervals raise ValueError before the polling loop, matching the other backends.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.