Workers deployment compatibility_date transition: failed deploy triage when Workers Logs are empty
0 reputation · 18 May 2024, 10:42 UTC
0 reputation · 18 May 2024, 10:42 UTC
A Worker deploy that previously succeeded may fail after the compatibility_date in wrangler.toml is moved forward or after nodejs_compat_v2 is added to compatibility_flags. Workers Logs generally capture requests served by an activated Worker version, so an empty log stream can indicate that the failing deploy never reached activation, rather than a runtime exception. This creates a triage boundary: the failure may be a pre-activation configuration error, such as an invalid binding or permission issue, or it may be a post-activation behavior change caused by the compatibility transition. Because nodejs_compat_v2 requires a sufficiently recent compatibility_date and alters available Node.js APIs, the exact flag and date interaction is version-sensitive. The goal is to isolate whether the compatibility_date change itself is the boundary that broke the deploy, without assuming request logs exist for the failed version.
Which signals distinguish a compatibility_date or compatibility_flags failure that occurs before version activation from one that occurs after?
How can the required compatibility_date for nodejs_compat_v2 be confirmed against current Cloudflare documentation before a deploy attempt?
When Workers Logs contain no entries for a failed deploy, what configuration fields should be compared between the last known-good and failing versions to identify the transition point?
34275 reputation · 18 May 2024, 17:21 UTC
Empty Workers Logs after moving compatibility_date forward or adding nodejs_compat_v2 usually means the new Worker version was never activated. Workers Logs record requests served by an activated version, so a deploy that fails during validation or upload produces no version, no route assignment, and no log entries.
| Observation | Pre-activation failure | Post-activation failure |
|---|---|---|
wrangler deploy result | Non-zero exit; validation or upload error naming compatibility_date, compatibility_flags, or a binding | Zero exit; deploy reports success |
| Dashboard versions | No new version; previous version still serves the route | New version listed and assigned to a route or preview |
| Workers Logs | Empty for the failing version because it never received requests | Errors or entries for the new version; empty logs can also mean no traffic, sampling, delay, or logging disabled |
nodejs_compat_v2 date requirement before deployingwrangler --version; flag support and date requirements vary by Wrangler release.compatibility_flags reference matching that toolchain.nodejs_compat_v2 lists a minimum compatibility_date, set compatibility_date on or after it in wrangler.toml.Compare names, types, and presence only. Never compare or log secret values.
compatibility_datecompatibility_flags, especially nodejs_compat and nodejs_compat_v2main or module entry pointvars and secret presence[env] overridesThis guidance assumes the Wrangler CLI and the Cloudflare Workers dashboard. Exact flag behavior and any minimum compatibility_date for nodejs_compat_v2 are version-sensitive and must be confirmed against current documentation for your wrangler --version. Empty logs alone are not proof of a pre-activation failure.
Did wrangler deploy return an error, and does the dashboard show a new version assigned to the route? That answer determines whether to fix a pre-activation configuration error or investigate a post-activation runtime change.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.