Skip to content

fix: report sub-minute job timeouts in seconds - #9547

Closed
charan-rathore wants to merge 1 commit into
OpenMined:devfrom
charan-rathore:fix-subminute-timeout-9527
Closed

charan-rathore wants to merge 1 commit into
OpenMined:devfrom
charan-rathore:fix-subminute-timeout-9527

Conversation

@charan-rathore

Copy link
Copy Markdown

Summary

Job timeouts under a minute were printed as "0 minutes" because the message used integer division. A 3 second timeout now reads "3 seconds". Fixes #9527.

Changes

  • Add a small format_timeout helper in job_runner.py that reports seconds below 60 and minutes otherwise.
  • Use it at all three places that print the timeout.
  • Add test_format_timeout.py (8 formatter cases) and an assertion in test_job_flow.py that a real 3 second job prints the timeout in seconds.

Testing

Asana task

N/A, external contribution.

@charan-rathore

Copy link
Copy Markdown
Author

Closing since this has sat without activity. Glad to reopen if someone wants to take it forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sub-minute job timeouts are reported as zero minutes

1 participant