-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Fix ListProjects when ContentLength header is not defined #26
Conversation
@novln Hey Thomas! Thank you for your contribution! May I kindly ask to share an example/add a test case? Please include the content of the raw response (including headers) when you make an API call directly, without SDK. It's important to understand if the issue shall be opened in the Neon repo. For context, AFAIK the
For more info, please check the rfc. Thanks! |
Hello 👋
Yeah, no worries. I've offuscated some stuff but it shouldn't tamper the example. First test caseFor the first test case, it's working fine with the SDK when we have few neon projects:
Second test caseFor the second test case, it's not working with the SDK when we have a lot of neon projects (+75):
As you can see, content-length is not defined in the response, which returns the "object not found" error. Content-Length header
I kindly disagree because, from my understanding, the Nonetheless, if it was mandatory and Neon should return this header, I still think that we should remove this workaround because, from my understanding, the root issue is fixed. Or at least, make it optional/ignored for listing projects. I would very much like to not maintain a fork of this SDK. I hope we'll find some middle ground on this. Have a nice day, |
@novln Hey Thomas! Thank you very much for your contribution and your examples! I confirm the issue: I experienced it when tried to list my projects for acceptance tests of the Neon terraform provider. Unexpected behavior occurs when the number of projects exceeds two.
No worries, I reckon we found it already - your proposal will be released with new SDK version tomorrow. Your contribution will not only unblock you, but it will also enable release of new version of the terraform provider to unblock a couple of teams relying on it! Thanks a lot for your help! Speaking of maintenance, would you be open to collaborate and maintain the SDK together? I believe that it'd greatly benefit its quality and reliability. WDYT? Regards, |
Glad to hear it 😃 Should I update
Absolutely, but I should warn you that I'll only collaborate through Koyeb, my current employer. |
@novln Hey Thomas!
The SDK code is generated using the "generator" app. Hence, the delivery of proposed changes will require the following steps:
make generate-sdk
It's totally fine as long as your employer is OK with the SDK distributed under the MIT licence. BTW is your employer hiring? :) I'm looking for new gig, and Koyeb's product seems promising, and the company values are quite in line with mine. WDYT, would you be open to introducing me to the founders to discuss if my profile could be a fit? Thanks! |
…ader. Closes #26 Signed-off-by: Dmitry Kisler <[email protected]>
Hello 👋,
Currently, it's not possible to use the ListProjects without receiving an "object not found" error (but not always).
This error is returned because
https://console.neon.tech/api/v2/projects
doesn't return theContentLength
when the list of projects is quite large.From my understanding, it was a protection that you made for the first version of Neon API but looking at the issue, it seems this behavior was fixed ?!
Have a great day and thank you for taking the time to review this.