When requesting tasks for a service the task history appears in an indeterminate order
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.2k
- Forks
- 1.7k
- Avg merge
- 13d 8h
- Merged PRs (30d)
- 2
Description
When using
myservice=client.services.get('servicename')
and iterating
myservice.tasks()
the currently running tasks can be anywhere in the list.
I have to iterate this and interrogate all the dates and times to find which is the most current task.
If the tasks structure was ordered by time (like for command line 'docker service ps myservice' ) this would be very helpful
most recent first such that the most current state would be task[0] would be good, but ordered either way would I think be better than what we have now
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Service.tasks() entry point described in the issue and compare its results with the ordering shown by the Docker CLI command docker service ps myservice. Confirm the intended ordering for returned tasks, then add or update coverage so the task list has a deterministic order, with the most recent task first if that behavior is selected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, python
- Domain
- devops
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100