feat(wrangler): send detected framework as annotation during deploy#13743
feat(wrangler): send detected framework as annotation during deploy#13743ericclemmons wants to merge 1 commit intomainfrom
Conversation
When autoconfig detects a framework (e.g. 'next', 'astro', 'static'), include it as a 'workers/framework' annotation in the deploy metadata. This enables EWC to include the framework in its workerdeploy Ready Analytics events (blob9), which in turn enables the Pages Convergence dashboard to cross-reference framework with deploy type (static vs dynamic). The annotation follows the same pattern as 'workers/message' and 'workers/tag' — it's included in the WorkerMetadata annotations record and persisted on the script version. BANDA-1799 Dashboard: https://grafana.cfdata.org/d/efkkw60x3nu9se/pages-convergence
|
|
Now I have full context to evaluate the PR. Let me summarize my findings: The change is straightforward and correct:
There is one thing worth noting but it's not a bug: the changeset bot flagged this PR has no changeset. Per the repo's AGENTS.md: "Every change to package code requires a changeset or it will not trigger a release." This is a I don't see any logic bugs, security issues, backward compatibility violations, or incorrect API behavior. The code follows existing patterns correctly. LGTM |
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
|
|
||
| let detectedFramework: string | undefined; | ||
|
|
||
| if (shouldRunAutoConfig) { |
There was a problem hiding this comment.
This is the gotcha – auto-config doesn't always run.
The thinking is being able to leverage the same inference for auto-config to ensure successful zero-config support long-term for any recognized framework.
(Example: auto-config may not support Vite+ today, but if detected but not instrumented, this data would move it up in priority)
Summary
When autoconfig detects a framework during
wrangler deploy, include it as aworkers/frameworkannotation in the deploy metadata sent to EWC.Why
The Pages Convergence dashboard needs to cross-reference framework with deploy type (static vs dynamic) for Workers. Currently:
autoconfig_detection_completed), NOT to EWCworkerdeployReady Analytics event has no framework fieldWhat
detectedFramework(fromgetDetailsForAutoConfig()) through todeploy()"workers/framework"in theannotationsrecord (same pattern asworkers/messageandworkers/tag)Companion changes
workers/frameworkfrom annotations and emit asblob9in theworkerdeployRA eventImpact
wrangler deploy(auto-config detects framework)workers/frameworkannotationwrangler deploy(existing wrangler.toml, no autoconfig)detectedFrameworkis undefined, annotation omittedSupported frameworks (from autoconfig)
Next.js, Astro, Nuxt, TanStack Start, SolidStart, React Router, SvelteKit, Docusaurus, Qwik, Analog, Hono, Vite, Vike, Waku, Hydrogen, + "static" for static-only sites