-
Notifications
You must be signed in to change notification settings - Fork 93
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
Doesn't return all on-call schedules #43
Comments
Also forgot to mention that the returned subset of results are different each time "who is on call" is used. |
The default (in most places) is 100 results. This script currently uses |
@technicalpickles – Any chance this will be worked on? Or tips on how to fix it? Spent about two hours trying to fix this with no luck. |
@technicalpickles – I eventually fixed it on my end on a heavily modified fork of this repo: https://github.com/optimizely/hubot-pager-me/blob/devel/src/scripts/pagerduty.coffee I also eliminated most of the features since we only want the "who is on call" functionality. The code isn't very elegant but it works (and I already spent way too long working on it 😄)! |
@danoc I took a look at your fork, and I'm not seeing anything obvious that fixes the issue you reported. I would have guessed that we needed to deal with pagination or something, but I don't see code for that. Interestingly, I've been working on some refactorings that also use the |
@technicalpickles I guess my issue may be a little different. We only have around 20 schedules, but flooding Slack with that many My solution uses See |
That's exactly what #50 does too 😁 |
@technicalpickles Heh, awesome. Thanks! I guess my issue is different then. |
We were also having this same issue, @danoc. I eventually ended up requesting the who's on call list one person at a time, appending each result to an array as it came back, and then sending the array as the message. I put in the PR to fix this at its source and made sure to mention this issue. |
We have a large number of on-call schedules. "Who is on call" only lists some subset. My guess is that we are only getting the first "page" of results from the PD API and pagination is not being used. See "This action is paginated. See the pagination documentation for details." here,
https://developer.pagerduty.com/documentation/rest/schedules/list
The text was updated successfully, but these errors were encountered: