Skip to content
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

Testing out the beta Cloudflare SDK #720

Open
jacobbednarz opened this issue Mar 22, 2024 · 4 comments
Open

Testing out the beta Cloudflare SDK #720

jacobbednarz opened this issue Mar 22, 2024 · 4 comments
Labels
enhancement New feature or request
Milestone

Comments

@jacobbednarz
Copy link

👋 thanks for keeping this project going! it's been a great source of improvements for the cloudflare-go library and as a by product, the Terraform Provider.

we've been working on a beta of the cloudflare-go library (cloudflare/cloudflare-go#1538) that is generated from our OpenAPI schemas and if you've got some free time, i'd love you to kick the tyres on it and let us know if you have any feedback! (no pressure of course). we have a migration guide included but you're also welcome to just eyeball it and see if it all feels like it should.

if you do find anything that doesn't work nicely for your use case, or just have some design/library wide questions, please don't hesitate to drop them into the linked discussion.

cheers!

@favonia favonia added this to the near future milestone Jun 21, 2024
@favonia
Copy link
Owner

favonia commented Jul 28, 2024

@jacobbednarz I will have time working on this after finishing up #797. Sorry about the loooooong delay!

@jacobbednarz
Copy link
Author

all good, no rush at all!

@favonia favonia modified the milestones: near future, 1.14.0, 1.15.0 Aug 11, 2024
@favonia favonia modified the milestones: 1.15.0, near future Aug 25, 2024
@favonia favonia added the enhancement New feature or request label Oct 2, 2024
@favonia
Copy link
Owner

favonia commented Oct 4, 2024

@jacobbednarz I'm just writing down my own notes for my self. There's no new information.

Observed Improvements of the New SDK

  • It offers significantly better error handling: a reliable way to tell whether an error is from the Cloudflare API or other networking issues.
  • It resolves a long-standing issue where zero values in Go might be unintentionally omitted when generating JSON requests. This was addressed on a case-by-case basis in the old SDK, and the new SDK adopts a systematic solution, albeit adding some overhead.
  • The code is (almost?) perfectly synchronized with the new API documentation site.
  • The immediate availability of the DNS batch API. Use the new batch API for DNS records #963

Blocker

The only blocker seems to be the lack of the ability to easily create a "clean" client from the new API. This can be worked around by undoing the reading of environment variables. The above improvements might eventually convince me to adopt the new SDK with such a workaround.

@jacobbednarz
Copy link
Author

thanks for kicking the tyres here and keeping us updated ❤️

The code is (almost?) perfectly synchronized with the new API documentation site.

there is currently a one hour (maximum) delay. they are built and triggered from the same pipeline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants