-
Notifications
You must be signed in to change notification settings - Fork 8.3k
docs: update all content to reflect new Workers API #23774
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
base: production
Are you sure you want to change the base?
Conversation
Howdy and thanks for contributing to our repo. The Cloudflare team reviews new, external PRs within two (2) weeks. If it's been two weeks or longer without any movement, please tag the PR Assignees in a comment. We review internal PRs within 1 week. If it's something urgent or has been sitting without a comment, start a thread in the Developer Docs space internally. PR Change SummaryUpdated documentation to reflect the new Workers API, enhancing clarity and usability for developers.
Modified Files
How can I customize these reviews?Check out the Hyperlint AI Reviewer docs for more information on how to customize the review. If you just want to ignore it on this PR, you can add the Note specifically for link checks, we only check the first 30 links in a file and we cache the results for several hours (for instance, if you just added a page, you might experience this). Our recommendation is to add |
This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:
|
d095cd7
to
4254674
Compare
60387a3
to
e7e9d98
Compare
be29050
to
4d1f8b2
Compare
4d1f8b2
to
514c79f
Compare
deb73e3
to
b4cf47e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, see notes, taking another pass
## Technical notes | ||
|
||
- Current APIs remain operational during beta, and any deprecation notice will come with a defined support period. | ||
- Legacy Terraform resources and SDK methods will be supported until the next major version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does "supported" mean in this context
src/content/docs/workers/configuration/multipart-upload-metadata.mdx
Outdated
Show resolved
Hide resolved
--- | ||
You can now manage [**Workers**](/api/resources/workers/subresources/beta/subresources/workers/methods/create/), [**Versions**](/api/resources/workers/subresources/beta/subresources/workers/models/worker/#(schema)), and [**Deployments**](/api/resources/workers/subresources/scripts/subresources/content/methods/update/) as separate resources with a new, resource-oriented API (Beta). | ||
|
||
This new API is supported in our [Terraform provider](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs) and the [Cloudflare Typescript SDK](https://github.com/cloudflare/cloudflare-typescript), allowing platform teams to manage a Worker's infrastructure in Terraform, while development teams handle code deployments from a separate repository or workflow. We also designed this API with agents in mind, as a clear, predictable structure is essential for them to reliably build, test, and deploy applications. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not just TypeScript SDK, but all of them.
@@ -0,0 +1,154 @@ | |||
--- | |||
title: Introducing the new Workers API. From eight confusing endpoints to three clear resources | |||
description: Simpler Workers API, SDK methods, and Terraform resources for directly managing Workers, Versions, and Deployments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we be mentioning Deployments so prominently in this article since it hasn't actually changed, and we hope to change it in the future (boy who cried wolf)? Perhaps we can make more clear that users are intended to pair these new resource endpoints with the existing Deployments resource endpoint.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm good point -- I'll try to make more clear. Was aiming to explain more in terms of "these are the directly manageable resources"
|
||
This example uses the [cloudflare-python](https://github.com/cloudflare/cloudflare-python) library. | ||
Open a terminal or create a shell script to upload a Worker and manage versions and deployments with curl. Workers scripts are Javascript [ES Modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules), but we also support [Python Workers](/workers/languages/python/) (open beta) and [Rust Workers](/workers/languages/rust/). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Open a terminal or create a shell script to upload a Worker and manage versions and deployments with curl. Workers scripts are Javascript [ES Modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules), but we also support [Python Workers](/workers/languages/python/) (open beta) and [Rust Workers](/workers/languages/rust/). | |
Open a terminal or create a shell script to upload a Worker and manage versions and deployments with curl. Workers scripts are JavaScript [ES Modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules), but we also support [Python Workers](/workers/languages/python/) (open beta) and [Rust Workers](/workers/languages/rust/). |
|
||
## Considerations with Durable Objects | ||
|
||
[Durable Object](/durable-objects/) migrations are applied with deployments. This means you can't bind to a durable object in a Version if a deployment doesn't exist i.e. migrations haven't been applied. For example, running this in Terraform will fail the first time the plan is applied: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Durable Object](/durable-objects/) migrations are applied with deployments. This means you can't bind to a durable object in a Version if a deployment doesn't exist i.e. migrations haven't been applied. For example, running this in Terraform will fail the first time the plan is applied: | |
[Durable Object](/durable-objects/) migrations are applied with deployments. This means you can't bind to a Durable Object in a Version if a deployment doesn't exist i.e. migrations haven't been applied. For example, running this in Terraform will fail the first time the plan is applied: |
Co-authored-by: Brendan Irvine-Broque <[email protected]>
Co-authored-by: Brendan Irvine-Broque <[email protected]>
Co-authored-by: Brendan Irvine-Broque <[email protected]>
Co-authored-by: Brendan Irvine-Broque <[email protected]>
Co-authored-by: Brendan Irvine-Broque <[email protected]>
Co-authored-by: Brendan Irvine-Broque <[email protected]>
Co-authored-by: Brendan Irvine-Broque <[email protected]>
Co-authored-by: Cina Saffary <[email protected]>
Co-authored-by: Cina Saffary <[email protected]>
Co-authored-by: Cina Saffary <[email protected]>
Co-authored-by: Brendan Irvine-Broque <[email protected]>
Co-authored-by: Brendan Irvine-Broque <[email protected]>
Summary
Screenshots (optional)
Documentation checklist