-
-
Notifications
You must be signed in to change notification settings - Fork 102
lab project list
offers only incomplete results
#185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@alerque, pagination works by passing a number as the last argument, with with out without a search. Similar is true in the other list commands. By default only your projects are listed, -a makes includes the rest. Right now the command is hard code to only return 10 results per page, I'm planning to make that configurable like in other list commands in the next release. Let me know if any of that helps |
Oh weird, my sleepy eyes over read your bit about groups. I'm sure theres something more we can do to specifically make that better. I'll check the gitlab API when I'm awake |
Okay pagination does work, I just didn't understand how to use it. And I would add that it wasn't at all clear from the help pages. Perhaps #147 could use some attention on that front. That does changes this issue a bit, but it still doesn't accomplish what I need. Scripting something that gives paginated output is really complicated. I'm trying to write scripts that check out all projects in a group, any the only way I see to do it while a loop that iterates over an incrementing integer and test until it fails, then combine the results. This is tedious and brittle scripting for something that should be one command. If the API must be iterated to get all results, this is something Additionally being able to list or search inside a group specifically would be useful. |
@alerque Thanks for the great feedback here. I completely agree there needs to be an easier way to work with all results (pages). I haven't forgotten about this issue, particularly the bit about groups. Any suggestions on syntax are appreciated. Some ideas:
|
Also forgot to underscore, I love the idea of being able to clone an entire group. I'll look at implementing that for |
After playing around with this a bit, I'm thinking the way to handle getting all the results is to use Also remove
Regarding groups looks like we can use the Groups API to list all projects in a group. https://docs.gitlab.com/ee/api/groups.html#list-a-group-s-projects I'm currently thinking a flag for |
From a CLI perspective paginated results are not useful. Ever. Shells have ways of handling that; if output is too much to look at one uses commands like The main reason for I agree the |
Here's what I current have going. Agree on paginated results not being very useful and upon reflection the user shouldn't really have to think about there being a paginated API.
At the moment I'm planning to bump the default results up to 100 (max for 1 page). But since its easy for instances to have enough projects for the operation to take a long time for all projects (think gitlab.com) I'm still thinking you should have to be explicit. I'm going to get this implemented for the other list commands. Regarding group operations, I'm thinking about just supporting the various options through a new |
That sounds reasonable to me. Having to explicitly set a higher limit makes some sense in the case of making a bunch of API queries. I did hack the limits off a build for myself and was surprised to find how slow the Gitlab API responded to the request. For just listing available project names it's pretty disappointing to wait that long when the full project list web pages load faster than that. It's bad enough that I'm going to have to cache the results locally. It's really convenient to get the list in my script, but I need to run the script dozens of times per day and 30 seconds a pop is unacceptable. Having the latest full project list is really nice, but it doesn't change minute to minute so much as day to day. |
Partial fix implements the better listing described above: #195 |
Running
lab project list
I expect to find all my user's projects, but instead I get a small sampling of them. There does not appear to be any pagination mechanism, and adding the-a
flag does nothing, I get the same truncated list.Adding a search term does pull up results not in the list, but it only searches by matches in the project name.
I'm trying to get the list of projects in a group, but this seems impossible. I could grep the results for the group name if it returned a full list, but it does not. Searching doesn't search on the group name, so that doesn't help.
The text was updated successfully, but these errors were encountered: