Generator packages.list(iterator=True) fails to paginate when deleting packages #2271
andreirogov
started this conversation in
Show and tell
Replies: 3 comments
|
In this specific case, I'm not sure I'd recommend using the iterator as the number of items changes while iterating over them, so pagination might not return items properly - a bit like trying to delete dict items while looping over it sometimes isn't safe. Maybe we can look at the docs again though, thanks for the report! |
0 replies
|
Yes, that's what I thought. I think, though, it'd be useful to note such a case in the docs. Thanks for the reply! |
0 replies
|
For this case would probably want to use |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Description of the problem, including code/CLI snippet
Generator for a project packages list does not return the complete list of packages when iterating through them with deletion.
Steps to reproduce:
CI_PROJECT_IDNotes:
list(iterator=True)is the recommended way to iterate through a large number of items.list(get_all=True)works as expected.list(iterator=True)without deletion, generator returns the complete list, as expected.Expected Behavior
Output:
Actual Behavior
Output:
Specifications
All reactions