Skip to content

Conversation

markjmiller
Copy link
Contributor

@markjmiller markjmiller commented Jul 17, 2025

Summary

Screenshots (optional)

Documentation checklist

Copy link
Contributor

hyperlint-ai bot commented Jul 17, 2025

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 Summary

Updated documentation to reflect the new Workers API, enhancing clarity and usability for developers.

  • Introduced a note about the new API for uploading Workers in the multipart upload metadata documentation.
  • Removed outdated examples and replaced them with updated API usage instructions across various sections.
  • Enhanced clarity in the infrastructure-as-code documentation regarding programmatic uploads and management of Workers.

Modified Files

  • src/content/docs/workers/configuration/multipart-upload-metadata.mdx
  • src/content/docs/workers/observability/logs/logpush.mdx
  • src/content/docs/workers/platform/infrastructure-as-code.mdx
  • src/content/docs/workers/static-assets/direct-upload.mdx

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 hyperlint-ignore label to the PR. Future changes won't trigger a Hyperlint review.

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 hyperlint-ignore to the PR to ignore the link check for this PR.

Copy link
Contributor

github-actions bot commented Jul 17, 2025

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/content/changelog/ @cloudflare/pm-changelogs, @cloudflare/pcx-technical-writing
/src/content/docs/workers/ @cloudflare/workers-docs, @GregBrimble, @irvinebroque, @mikenomitch, @korinne, @WalshyDev, @cloudflare/deploy-config, @cloudflare/pcx-technical-writing, @kodster28, @cloudflare/wrangler, @cloudflare/workers-runtime-1, @cloudflare/wrangler
/src/content/docs/workers/observability/ @irvinebroque, @mikenomitch, @rohinlohe, @kodster28, @cloudflare/pcx-technical-writing
/src/content/docs/workers/static-assets @irvinebroque, @GregBrimble, @WalshyDev, @kodster28, @cloudflare/deploy-config, @cloudflare/pcx-technical-writing

Copy link
Contributor

github-actions bot commented Jul 17, 2025

@markjmiller markjmiller force-pushed the markmiller/update-to-new-workers-api branch 3 times, most recently from d095cd7 to 4254674 Compare July 22, 2025 18:33
@markjmiller markjmiller force-pushed the markmiller/update-to-new-workers-api branch 4 times, most recently from 60387a3 to e7e9d98 Compare July 25, 2025 22:45
@markjmiller markjmiller force-pushed the markmiller/update-to-new-workers-api branch 2 times, most recently from be29050 to 4d1f8b2 Compare August 11, 2025 17:58
@markjmiller markjmiller force-pushed the markmiller/update-to-new-workers-api branch from 4d1f8b2 to 514c79f Compare August 11, 2025 19:26
@markjmiller markjmiller marked this pull request as ready for review August 26, 2025 23:27
@korinne korinne force-pushed the markmiller/update-to-new-workers-api branch from deb73e3 to b4cf47e Compare September 3, 2025 15:38
Copy link
Contributor

@irvinebroque irvinebroque left a 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.
Copy link
Contributor

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

---
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.
Copy link
Contributor

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
Copy link
Contributor

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.

Copy link
Contributor

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/).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[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:

korinne and others added 12 commits September 3, 2025 17:27
Co-authored-by: Brendan Irvine-Broque <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product:workers Related to Workers product size/l
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants