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

Add Worker bindings support for Services and Durable Objects #849

Closed

Conversation

sodabrew
Copy link

@sodabrew sodabrew commented Apr 1, 2022

Description

I manage some of my workers script using the cloudflare-terraform provider. The new binding types need to be supported in cloudflare-go first and can then be added there.

Has your change been tested?

Not tested yet, I wrote this cold.

Screenshots (if appropriate):

Types of changes

What sort of change does your code introduce/modify?

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • This change is using publicly documented (api.cloudflare.com or developers.cloudflare.com) and stable APIs.

@jacobbednarz
Copy link
Member

thanks for the PR, however, until we have public documentation for these endpoints we're going to have to put this PR on hold. we don't add functionality to our SDKs until the documentation is first in place.

@sodabrew
Copy link
Author

sodabrew commented Apr 2, 2022

Durable objects is GA for a few months now, so the API docs are overdue, IMO.

Services is still beta, but it just rescued a project for me. Very much looking forward to its GA!

I can split the PR if there's a substantial gap between getting each of these into the public docs. Anyways, I'll leave this PR as a public placeholder. These are publicly announced features even if the APIs aren't considered fully baked yet.

@sodabrew
Copy link
Author

sodabrew commented Apr 2, 2022

I went to check on the Durable Objects API docs, since it has been GA since November, 2021, but didn't find the docs. The only documented Bindings are deprecated: https://api.cloudflare.com/#worker-script-deprecated--properties

In fact, none of the other bindings supported in this file have public API documentation at api.cloudflare.com... how can this be a gating factor in any sensible way?

@jacobbednarz
Copy link
Member

don't confuse product maturity with API maturity. the reason we don't always add them together is that the APIs are still under development/changes and we don't release public API docs until the service teams are happy with the APIs to prevent building functionality on top of them.

at the time the functionality was added, there would have been documentation otherwise it wouldn't have landed. I'd recommend raising a customer support ticket to have the documentation updated to unblock this PR.

there is nothing stopping you from maintaining your own fork but we won't be adding it here until it is documented.

@sodabrew
Copy link
Author

sodabrew commented Apr 4, 2022

Uh, well this isn't ready for approval but I do hope to get review so that it's in good shape to land sooner than later. (context: someone approved the PR, which was weird. since deleted.)

@sodabrew
Copy link
Author

sodabrew commented May 10, 2022

Cloudflare Workers Service Bindings is now public GA and Wrangler 2.0 is released as GA, but the API documentation at https://api.cloudflare.com has not been updated! Can you escalate this issue internally to get the API docs updated?

I totally understand if the "happy path" is to use wrangler to create and update workers with bindings, but customers with their own tool wrappers rely on a stable API we can build on.

https://blog.cloudflare.com/service-bindings-ga/

https://blog.cloudflare.com/10-things-i-love-about-wrangler/

image

@jacobbednarz
Copy link
Member

Can you escalate this issue internally to get the API docs updated?

I'd recommend filing a support ticket to get these updated. I can nudge the team but customer wants speak louder :)

@sodabrew sodabrew mentioned this pull request May 17, 2022
9 tasks
@sodabrew
Copy link
Author

sodabrew commented May 17, 2022

Support for Service bindings has landed in wrangler but the API remains undocumented at api.cloudflare.com
cloudflare/workers-sdk@3279f10

I would appreciate if you would nudge the team internally please.

@sodabrew
Copy link
Author

sodabrew commented Jun 2, 2022

@jacobbednarz Would it be helpful if I put up a PR to remove the existing undocumented bindings from the Go client library in order to reduce confusion? { "some_binding": "stuff" } is as close as there are to docs for any of this code you've written.

image

@jacobbednarz
Copy link
Member

services landed in #947 by the service team. if you scope this back to durable objects (https://api.cloudflare.com/#durable-objects-namespace-properties) we can get this merged too.

@sodabrew
Copy link
Author

Usually I'd rebase and stay in the same PR, but the branch was named for service workers so I didn't want that to cause any confusion. New branch at #949!

@sodabrew sodabrew closed this Jun 23, 2022
@sodabrew sodabrew deleted the sodabrew/workers-service-binding branch June 23, 2022 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants