Mutated items in launchpadlib search results iterator can break iteration
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Triaged
|
Low
|
Unassigned | ||
launchpadlib |
Triaged
|
Low
|
Unassigned |
Bug Description
We want to standardize away from using Triaged, so I have been running:
>>> for t in p.searchTasks(
...
where flip_task changes the status and saves the task.
I would have thought this would update all the tasks, but for some reason it does not!
Is this a kind of unstable iterator where you're not allowed to change things while using it? That seems pretty strange for a web api.
>>> for t in p.searchTasks(
...
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
>>> for t in p.searchTasks(
...
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
https:/
>>>
Changed in launchpad-foundations: | |
status: | Incomplete → Triaged |
Changed in launchpadlib: | |
status: | Incomplete → Triaged |
Changed in launchpad-foundations: | |
importance: | Undecided → Low |
Changed in launchpadlib: | |
importance: | Undecided → Low |
summary: |
- searchTasks doesn't return all matching tasks?! + Mutated items in launchpadlib search results iterator can break + iteration |
I guess the actual requests are batched, and the batching is not stable.
However it does seem very poor that by reading all the batches one after the other, you miss out on a lot of data. Perhaps missing a few that are eg inserted during iteration would be ok, but missing a lot that existed the whole time seems just wrong. Perhaps it would have done better if I'd specified a sort order?