bug(trainer): ContainerBackend.wait_for_job_status missing polling_interval validation
- 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
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