-
Notifications
You must be signed in to change notification settings - Fork 52
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
Increase default pagination size #10
Comments
Sounds very sensible. |
Without digging too much into the code, what data do you need from the Agents List? Is it looking for stuff on |
@keithpitt it just gets the agent |
It's all the |
Ah right, is there anything I could do to convince you to use the GraphQL API? :) Or would that be too hard basket? So we have queue search in the API:
|
@keithpitt yeah, I don't see why not! People's API tokens would need changing tho? We don't need to do queue search tho, we just want to grab all the agents… and then we loop through the list and collate them by queue and whether or not they have a job assigned. |
I was just worried that since the Agents API endpoint has a really slow pagination mechanism, and includes all the things. Ah yeah...the API tokens would need to change. Maybe too hard basket for now... |
Say you had 45 agents with 3 queues. What if we add an endpoint to the Agents REST API… curl "https://api.buildkite.com/v2/organizations/{org.slug}/agents/queue-metrics"
which would return… {
"count": 45,
"busy": 20,
"idle": 25,
"queues": {
"default": {
"count": 20,
"busy": 15,
"idle": 5
},
"osx": {
"count": 10,
"busy": 2,
"idle": 8
},
"elastic": {
"count": 15,
"busy": 12,
"idle": 3
}
}
} |
That could be a pretty straight forward SQL call as well - no pagination required! I'm in favour! |
I'd love this repo to not be a thing. |
I hate things. |
What would it be if it wasn't a thing?! |
Yeah, fair point, unless you guys ended up pushing metrics directly into Cloudwatch it's going to stick around. I'd be perfectly happy to talk to a different less brute force endpoint or GraphQL. I tried that first, but it was very early days @keithpitt. |
That's something I've always thought would be a good future change, but I figured it'd be too hard. In saying that though, I only think it's hard mostly because I've never actually asked what it would entail! Is it a matter of just sending queue metrics |
Yeah, probably too hard. Providing a better API for these metrics sounds like the bigger win, or at On Thu, Nov 17, 2016 at 8:17 AM Keith Pitt <notifications@github.com
|
Fixed in master. |
With lots of agents and a few stacks, it's easy to go over 100RPM on agents/list pagination.
We should up the page size to be 100. The default is 30.
The text was updated successfully, but these errors were encountered: