Cloudflare Developers

CD

Cloudflare Developers

Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news

Join

You don’t need to buffer the whole thing

You don’t need to buffer the whole thing in memory, you can stream directly from R2 into the Cache

.dev.vars end up in server bundle

well happened to me on svelte worker assets but same happens with https://github.com/cloudflare/agents-starter if you add a .dev.vars in the root...

Workers CI Variables

Ah okay, sry I thought that was just to confirm which build configuration I meant. Question still there. Within the link you provided there‘s an section about build configuration and how to provide build time secrets and variables. I added a secret and try to access it via process.env.DATABASE_URL but it seems like there is no issue available. So I‘m wondering how to get access to this issue from within the drizzle.config.ts file to execute the Migration?

Astro Pages do not migrate to Workers Assets

It's weird. There's some build configuration issue. You can replicate it easily. Create a new project on Pages using Astro. set it up so that it builds on push to Github. Then, use that repository as a Workers Assets project. There is no way you can configure it, that I have found in code or admin, that will build.

Hey peeps I'm encountering some

Hey peeps I'm encountering some mysterious behaviour. My Pages Function is throwing intermittent 401 errors. I traced the code back to some packages I'm using: @propelauth/cloudflare-worker which calls jose. Debugging that shouldn't be a problem. The issue is that the 401 request that I receive in my browser is not reflected in the Real Time Logs stream. It's mysterious because it's only ever this intermittent error that does not show up. Every other request I make I can see in the logs stream. I even deployed changes with dummy errors and they show up as expected....

Source maps and stack traces · Cloudflar...

Workers only maps stack traces for unhandled exceptions. So if you catch and log an exception in you code, it will not be source mapped. https://developers.cloudflare.com/workers/observability/source-maps/#stack-traces...

the docs say that `cf.cacheKey` is only

the docs say that cf.cacheKey is only available for Enterprise accounts -- does that include accounts that have been granted Enterprise status via the Cloudflare for Startups program? I'm in the program and I cannot get cacheKey working for the life of me -- it seems to be always set to the request url

Is it possible to create a worker/

Is it possible to create a worker/project before deploying?

request id / id

How are requestId and id different in Worker Logs?
No description

ah opps the worker to worker case wouldn

ah opps the worker to worker case wouldn't be a 521 anyway. so your worker is fetching another subdomain? If the other subdomain is unproxied, it's worth noting the worker fetch request goes through the full cdn pipeline as if it was proxied. A Common issue is your SSL/TLS Mode (under SSL/TLS -> Overview) is Flexible, so the Worker's trying to connect to your origin over http/80 and your origin only supports https/443, need full or full (strict). Otherwise 521 is a generic connection refused (could be firewall/etc). I assume it works fine not through the worker...

Can you describe a bit more what this

Can you describe a bit more what this solution entails? Generating token upon login and sending to client browser, then verifying when required? I found this which might help me https://github.com/tsndr/cloudflare-worker-jwt

i was able to get by with a monorepo

i was able to get by with a monorepo with workers each in their own directory, with a single tsconfig.json and single package.json at root. Code sharing is no problem and yes, dependencies aren’t as easy to track between each of the workers, but Wrangler anyway would bundle only whats required for each of the workers. The way i see it, each worker has a separate wrangler.toml in its respective folders, and that is the more important/ separate manifest than package.json....

The struggle is real. I can only imagine

The struggle is real. I can only imagine the pain you went through. I'm strongly of the mind the cloudflare themselves should be producing these kinds of templates—so they can dog food their own work. I hope you will consider submitting this to the remix.guide. appreciate it...

Does it need to happen synchronously,

Does it need to happen synchronously, before the HTTP response ends? If not, you could use Workflows and do batches of 100 and then a sleep. Alternatively, you could use Queues and publish a message per item and have some rate limiting, but Workflows will be better imo. Only drawback will be you’d need to create sub Workflows at a certain point with the current step limit (e.g. you’d have an effective cap of 51,200 inserts per Workflow)

@thomasgauvin , I posted a question

@thomasgauvin , I posted a question about hyperdrive on local a little earlier

Also, I'm having trouble connecting with

Also, I'm having trouble connecting with a local postgres DB when using hyperdrive. I've tried both using the env variable & the localConnectionString, but I keep getting this error: ```...

Workflows result

👋 Is it possible to get a result from creating a workflow? Something like this? let result = this.env.MYWORKFLOW.create({ params: { id }, })...

still weird I'm getting those high read

still weird I'm getting those high read latencies when its pretty much all hot reads

I am, its working pretty good. The

I am, its working pretty good. The durable object isn't that big of a cost factor if you use it at scale. Maximum like $10 dollars a month orso? That you use it like 24/7. As currently there are not session costs?

What's your payload?

What's your payload?
Next