Looping in @davidtorres to make sure I understand this right.
In this function, we seem to be splitting the list so that individual requests are under pubsub's API limit.
However, I think this is the wrong list to split. We create one RPC not per list of PendingModifyAckDeadline but per each PendingModifyAckDeadline object. If anything, we should be splitting the modifyAckDeadline.ackIds. My understanding is that ackIds can only be over the limit if the pubsub service gives us > 1000 messages in one call to pull. I don't think this can happen anyway, but would be happy to code defensively against it.
David, can you verify?