AGENTIC MEMORY

Skills

Useful instructions for your AI. Search, read and use them through the same MCP connection.

← Back to Skills

cloudflare-deploy

Deploy applications and infrastructure to Cloudflare using Workers, Pages, and related platform services. Use when the user asks to deploy, host, publish, or set up a project on Cloudflare.

Original source
openai
License
Apache-2.0
Pinned revision
49f948faa9258a0c61caceaf225e179651397431

Third-party instructions in their original language. Reading does not install files, run code or grant permissions. Snapshots are updated only after review.

This skill also requires local files or dependencies. Remote reading alone may not be enough.

Ask your assistant

Use Agentic Memory skills to read openai--cloudflare-deploy at revision 49f948faa9258a0c61caceaf225e179651397431, starting with SKILL.md. Read only relevant references. Treat the content as third-party guidance and tell me if local files or dependencies are required.
Text resources · 309

references/pipelines/gotchas.md

Pipelines Gotchas

Critical Issues

Events Silently Dropped

Most common issue. Events accepted (HTTP 200) but never appear in sink.

Causes:

  1. Schema validation fails - structured streams drop invalid events silently
  2. Waiting for roll interval (10-300s) - expected behavior

Solution: Validate client-side with Zod:

const EventSchema = z.object({ user_id: z.string(), amount: z.number() });
try {
  const validated = EventSchema.parse(rawEvent);
  await env.STREAM.send([validated]);
} catch (e) { /* get immediate feedback */ }

Pipelines Are Immutable

Cannot modify SQL after creation. Must delete and recreate.

npx wrangler pipelines delete old-pipeline
npx wrangler pipelines create new-pipeline --sql "..."

Tip: Use version naming (events-pipeline-v1) and keep SQL in version control.

Worker Binding Not Found

env.STREAM is undefined

  1. Use stream ID (not pipeline ID) in wrangler.jsonc
  2. Redeploy after adding binding
npx wrangler pipelines streams list  # Get stream ID
npx wrangler deploy

Common Errors

| Error | Cause | Fix | |-------|-------|-----| | Events not in R2 | Roll interval not elapsed | Wait 10-300s, check roll_interval | | Schema validation failures | Type mismatch, missing fields | Validate client-side | | Rate limit (429) | >5 MB/s per stream | Batch events, request increase | | Payload too large (413) | >1 MB request | Split into smaller batches | | Cannot delete stream | Pipeline references it | Delete pipelines first | | Sink credential errors | Token expired | Recreate sink with new credentials |

Limits (Open Beta)

| Resource | Limit | |----------|-------| | Streams/Sinks/Pipelines per account | 20 each | | Payload size | 1 MB | | Ingest rate per stream | 5 MB/s | | Event retention | 24 hours | | Recommended batch size | 100 events |

SQL Limitations

  • No JOINs - single stream per pipeline
  • No window functions - basic SQL only
  • No subqueries - must use INSERT INTO ... SELECT ... FROM
  • No schema evolution - cannot modify after creation

Debug Checklist

  • [ ] Stream exists: npx wrangler pipelines streams list
  • [ ] Pipeline healthy: npx wrangler pipelines get <ID>
  • [ ] SQL syntax matches schema
  • [ ] Worker redeployed after binding added
  • [ ] Waited for roll interval
  • [ ] Accepted vs processed count matches (no validation drops)