mavilein
mavilein
CDCloudflare Developers
Created by mavilein on 4/12/2024 in #workers-help
Regression in wrangler 3.46.0: Accessing a Durable Object in another locally running Worker Project
We noticed a regression in accessing a Durable Object in another Worker Project when runnig locally after upgrading to 3.46.0. After this upgrade all calls to the Durable Object are failing with opaque errors. All responses result in a 500 without useful response bodies or headers. We used the following approach to enable a locally running Worker to call another locally running Worker. With this approch we were able to start the two workers locally using wrangler dev and have them communicate with each other.
##############################
# Local Dev Environment
name = "accelerate-edge-local"
durable_objects.bindings = [
# This script_name is important so that this worker talks to the local tenant manager.
# If there's a deployed version with the same name, wrangler dev would talk to the deployed version.
# Hence we use special names only locally.
{ name = "TENANT_MANAGER", class_name = "TenantManager", script_name = "tenant-manager-local" }
]
##############################
# Local Dev Environment
name = "accelerate-edge-local"
durable_objects.bindings = [
# This script_name is important so that this worker talks to the local tenant manager.
# If there's a deployed version with the same name, wrangler dev would talk to the deployed version.
# Hence we use special names only locally.
{ name = "TENANT_MANAGER", class_name = "TenantManager", script_name = "tenant-manager-local" }
]
With this config we were calling the worker with:
const doid = c.env.TENANT_MANAGER.idFromString(apiKey.tenant_id);
const stub = c.env.TENANT_MANAGER.get(doid);
stub.fetch(...)
const doid = c.env.TENANT_MANAGER.idFromString(apiKey.tenant_id);
const stub = c.env.TENANT_MANAGER.get(doid);
stub.fetch(...)
However this approach does not work anymore. Are there any known workarounds for this?
3 replies
CDCloudflare Developers
Created by mavilein on 11/29/2023 in #workers-help
Which products are running on Edge exclusively?
Given the recent outage we would like to better understand which Cloudflare Products are guaranteed to not be effected by something similar should it happen. Our understanding is that the following products are running exclusively in edge data centers: - Workers - Durable Objects - Workers KV - R2 - Cache API - D1 - Queue - Workers Analytics Engine - Pages - Edge Functions - LogPush - Pub/Sub Is this list correct? It would be amazing if the Cloudflare Docs would have a page outlining this aspect. As the product surface will grow it would be very useful to have a central location to refer to.
8 replies