Skip to content

CC-8364 Support Durable Object container settings and exports - #15597

Open
skepticfx wants to merge 1 commit into
mainfrom
nafeez/CC-8364-do-application-configuration-wrangler
Open

CC-8364 Support Durable Object container settings and exports#15597
skepticfx wants to merge 1 commit into
mainfrom
nafeez/CC-8364-do-application-configuration-wrangler

Conversation

@skepticfx

@skepticfx skepticfx commented Sep 10, 2026

Copy link
Copy Markdown
Member

Fixes #CC-8364

Resolve name-only Durable Object-managed Containers through declarative exports for validation, image preparation, version metadata, and application reconciliation.

Apply explicit application-wide flags and log settings on deploy using POST for missing applications and PATCH for existing ones. Preserve omitted settings, existing settings during version commands, and rollout-none behavior.

Cover name-only exports with settings across application creation, updates, uploads, and version deployment.


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: private beta

Devin Review

@changeset-bot

changeset-bot Bot commented Sep 10, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: dc4afa8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 10 packages
Name Type
wrangler Minor
@cloudflare/workers-utils Minor
@cloudflare/deploy-helpers Minor
@cloudflare/containers-shared Patch
@cloudflare/vite-plugin Patch
@cloudflare/vitest-plugin Patch
@cloudflare/autoconfig Patch
@cloudflare/cli-shared-helpers Patch
@cloudflare/remote-bindings Patch
@cloudflare/workers-auth Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-project-automation github-project-automation Bot moved this to Untriaged in workers-sdk Sep 10, 2026
@workers-devprod
workers-devprod requested review from a team and dario-piotrowicz and removed request for a team September 10, 2026 16:45
@workers-devprod

workers-devprod commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • @cloudflare/cloudchamber
  • @cloudflare/wrangler
Show detailed file reviewers
  • .changeset/durable-object-application-settings.md: [@cloudflare/wrangler]
  • .changeset/named-container-image-build-options.md: [@cloudflare/wrangler]
  • .changeset/tidy-sandboxes-link.md: [@cloudflare/wrangler]
  • packages/containers-shared/src/build.ts: [@cloudflare/cloudchamber @cloudflare/wrangler]
  • packages/containers-shared/tests/build-and-push.test.ts: [@cloudflare/cloudchamber @cloudflare/wrangler]
  • packages/deploy-helpers/src/deploy/deploy.ts: [@cloudflare/wrangler]
  • packages/deploy-helpers/src/deploy/helpers/container-image-bindings.ts: [@cloudflare/wrangler]
  • packages/deploy-helpers/src/deploy/helpers/container-metadata.ts: [@cloudflare/wrangler]
  • packages/deploy-helpers/src/deploy/helpers/durable-object-container-applications.ts: [@cloudflare/wrangler]
  • packages/deploy-helpers/src/deploy/versions-upload.ts: [@cloudflare/wrangler]
  • packages/deploy-helpers/tests/container-image-bindings.test.ts: [@cloudflare/wrangler]
  • packages/deploy-helpers/tests/container-metadata.test.ts: [@cloudflare/wrangler]
  • packages/deploy-helpers/tests/durable-object-container-applications.test.ts: [@cloudflare/wrangler]
  • packages/workers-utils/src/config/containers.ts: [@cloudflare/wrangler]
  • packages/workers-utils/src/config/environment.ts: [@cloudflare/wrangler]
  • packages/workers-utils/src/config/index.ts: [@cloudflare/wrangler]
  • packages/workers-utils/src/config/validation.ts: [@cloudflare/wrangler]
  • packages/workers-utils/src/index.ts: [@cloudflare/wrangler]
  • packages/workers-utils/src/print-bindings.ts: [@cloudflare/wrangler]
  • packages/workers-utils/tests/config/containers.test.ts: [@cloudflare/wrangler]
  • packages/workers-utils/tests/config/durable-object-container-settings.test.ts: [@cloudflare/wrangler]
  • packages/workers-utils/tests/config/validation/normalize-and-validate-config.test.ts: [@cloudflare/wrangler]
  • packages/workers-utils/tests/print-bindings.test.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/tests/config-schema.test.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/tests/containers/deploy.test.ts: [@cloudflare/cloudchamber @cloudflare/wrangler]
  • packages/wrangler/src/tests/deployment-bundle/build-container-images.test.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/tests/versions/versions.deploy.test.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/tests/versions/versions.upload.test.ts: [@cloudflare/wrangler]
  • packages/wrangler/src/deployment-bundle/build-container-images.ts: [@cloudflare/wrangler]

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Note

This report is out of date. Scroll down for Devin Review's latest report on this PR.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@pkg-pr-new

pkg-pr-new Bot commented Sep 10, 2026

Copy link
Copy Markdown
@cloudflare/autoconfig

npm i https://pkg.pr.new/@cloudflare/autoconfig@15597

@cloudflare/build-output-utils

npm i https://pkg.pr.new/@cloudflare/build-output-utils@15597

@cloudflare/codemods

npm i https://pkg.pr.new/@cloudflare/codemods@15597

@cloudflare/config

npm i https://pkg.pr.new/@cloudflare/config@15597

@cloudflare/containers-shared

npm i https://pkg.pr.new/@cloudflare/containers-shared@15597

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@15597

@cloudflare/deploy-helpers

npm i https://pkg.pr.new/@cloudflare/deploy-helpers@15597

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@15597

miniflare

npm i https://pkg.pr.new/miniflare@15597

@cloudflare/pages-functions

npm i https://pkg.pr.new/@cloudflare/pages-functions@15597

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@15597

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@15597

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@15597

@cloudflare/vitest-plugin

npm i https://pkg.pr.new/@cloudflare/vitest-plugin@15597

@cloudflare/workers-auth

npm i https://pkg.pr.new/@cloudflare/workers-auth@15597

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@15597

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@15597

wrangler

npm i https://pkg.pr.new/wrangler@15597

commit: dc4afa8

@ask-bonk

ask-bonk Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

LGTM

github run

@skepticfx
skepticfx force-pushed the nafeez/CC-8364-do-application-configuration-wrangler branch from 5269712 to b96799e Compare September 11, 2026 04:40
@dario-piotrowicz
dario-piotrowicz removed their request for review September 11, 2026 09:59
@skepticfx
skepticfx force-pushed the nafeez/CC-8364-do-application-configuration-wrangler branch from b96799e to 2098bc7 Compare September 11, 2026 16:46
Resolve name-only Durable Object-managed Containers through declarative exports for validation, image preparation, version metadata, and application reconciliation.

Apply explicit application-wide flags and log settings on deploy using POST for missing applications and PATCH for existing ones. Preserve omitted settings, existing settings during version commands, and rollout-none behavior.

Cover name-only exports with settings across application creation, updates, uploads, and version deployment.
@skepticfx
skepticfx force-pushed the nafeez/CC-8364-do-application-configuration-wrangler branch from 2098bc7 to dc4afa8 Compare September 11, 2026 17:42

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 1 new potential issue.

Devin Review

): Promise<void> {
let existing: DurableObjectApplicationState;
try {
existing = await ApplicationsService.getApplication(namespaceId);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔴 Existing applications look missing

On redeploy, applyApplication queries the application endpoint with a namespace ID. Application stores its ID and namespace separately, so Wrangler retries creation and fails on the duplicate.

Learn more

The application API addresses GET /applications/{application_id} by application ID. A Durable Object-backed application stores that ID separately from durable_objects.namespace_id in Application. The code only has a namespace ID here, so a previously created application is not reliably addressable through this endpoint. A 404 then enters the create path, where the namespace already owns an application and the deployment fails instead of updating or preserving settings.

Example: Namespace ns-123 owns application app-456. A second deploy requests /applications/ns-123, receives 404, and POSTs another application for ns-123; the API rejects it as already attached.

Recommended fix: Resolve the application by its Durable Object namespace before calling getApplication or modifyApplication. Use an SDK endpoint that filters by namespace if available, or list applications and match durable_objects.namespace_id, then retain the returned application.id for PATCH. Preserve the existing identity checks against the matched application.

Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

2 participants