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
Reserve_ids documentation has a typo, and implementation seems bugged #37
Comments
The more I look at the reserveIds API, the more convinced I am that the behavior at this line is completely wrong, in a way that's so weirdly obvious that I'm having trouble believing that I'm not mistaken. Can someone confirm whether or not that is the case? Just to note:
|
It seems to me like the client method should accept a list of complete keys, not a single "basis" key, and should not accept a "num" argument at all. |
@IlyaFaer I've updated the issue with some additional concerns that are not just centered around documentation. I think this implementation is wrong but cannot confirm the intended behavior because I don't have any special insight into GCD's behavior. |
Pinging this since it's been a month. |
@tseaver Hello! Thanks for accepting the documentation patch, but I think there is more to this issue. Could someone from the team please have a look at #37 (comment) and tell me if I'm crazy or not? |
tl;dr: I'm pretty sure it's constructing a request with a list of ids like
when it should be like
Am I reading it wrong, or is this bugged? |
OK, looking at
|
`Client.reserve_ids` has been reimplemented in a way that should be a lot more useful, and has been renamed `Client_reserve_ids_sequential`, leaving the old name as a deprecated alias. `Client.reserve_ids_multi` has been added, which takes sequence of complete keys to reserve. Fixes googleapis#37
`Client.reserve_ids` has been reimplemented in a way that should be a lot more useful, and has been renamed `Client_reserve_ids_sequential`, leaving the old name as a deprecated alias. `Client.reserve_ids_multi` has been added, which takes sequence of complete keys to reserve. Fixes #37
I've omitted all the usual fields because I feel they are irrelevant, I hope that is okay. Please refer to the PR here: #36
One basic issue is that the documentation of reserve_ids doesn't match the the typespec. The other issue is that the documentation overall is ambiguous enough that I'm actually not sure of its behavior. I would expect it to sequentially reserve all IDs starting from the provided complete key, up to a count of "num", but since all it passes to the underlying API is
[complete_key] * num
I'm actually not positive that that's what it's doing, or even what it's exactly doing, without anything further to refer to.The text was updated successfully, but these errors were encountered: