feat: add --show-estimates flag to job list and job get#992
feat: add --show-estimates flag to job list and job get#992vinadomi11 wants to merge 13 commits intoaws-deadline:mainlinefrom
Conversation
There was a problem hiding this comment.
There seems to an issue with the comment quotes (e.g. """). The one in line 108 should be removed.
There was a problem hiding this comment.
Issue addressed in the latest revision.
There was a problem hiding this comment.
This is pretty cool, @vinadomi11! Could we add unit tests?
There was a problem hiding this comment.
Issue addressed in the latest revision.
There was a problem hiding this comment.
Could we move all the imports to the top of the file? As opposed to have an import in each test.
There was a problem hiding this comment.
The spacing is broken here. You should be able to run 'hatch run fmt' to fix this up to 4 instead of 3 spaces.
This docstring should also not change in your PR. I see that below, it's adjacent to code, which looks wrong.
There was a problem hiding this comment.
This helper function could go into _job_helpers.py instead of in this main job_group file, to keep this one focused on the interface itself.
| }, | ||
| } | ||
|
|
||
| with patch.object(api._session, "get_boto3_session") as session_mock: |
There was a problem hiding this comment.
We're using the deadline_mock fixture for this instead of patching the boto3 session directly, it would be great to switch these tests over to that.
|



What was the problem/requirement? (What/Why)
Users have no way to see estimated time remaining for in-progress jobs from the CLI. This makes it harder to plan and monitor long-running render jobs.
What was the solution? (How)
Added a --show-estimates flag to deadline job list and deadline job get commands that displays estimated time remaining for in-progress jobs. The estimate is calculated by:
Computing average time per completed task
Multiplying by remaining tasks (running + pending)
Output shows human-readable durations like "5 minutes" or "1 hour, 30 minutes".
What is the impact of this change?
New optional CLI flag - no impact on existing behavior.
How was this change tested?
Have you run the unit tests?
Have you run the integration tests?
Was this change documented?
Are relevant docstrings in the code base updated?
Has the README.md been updated?
Does this PR introduce new dependencies?
This PR does not add any new dependencies.
Is this a breaking change?
No - this adds an optional flag with no changes to existing behavior.
Does this change impact security?
No security impact.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.