Skip to content

Comments

Bump Cloudflare Worker compatibility_date to 2026-02-19#647

Merged
tillrohrmann merged 2 commits intorestatedev:mainfrom
tillrohrmann:bump-wrangler-compatibility
Feb 19, 2026
Merged

Bump Cloudflare Worker compatibility_date to 2026-02-19#647
tillrohrmann merged 2 commits intorestatedev:mainfrom
tillrohrmann:bump-wrangler-compatibility

Conversation

@tillrohrmann
Copy link
Contributor

Update from 2024-05-13 to current date. This implicitly enables
nodejs_compat_populate_process_env (default since 2025-04-01),
so the explicit flag can be removed from compatibility_flags.

This PR is based on #645.

@tillrohrmann tillrohrmann requested a review from nikrooz February 19, 2026 08:57
Enable identity verification (request signing) in the 5 runtime
compatibility tests (Node, Bun, Deno, Cloudflare Workers, Vercel) to
ensure that dependency upgrades in restate-sdk-shared-core won't break
JWT signature verification across JS runtimes.

Changes:
- Add a test-only ED25519 keypair in test/fixtures/request-signing/
- Modify all 6 example services to optionally enable identity
  verification via the RESTATE_IDENTITY_KEYS env var
- Switch 5 CI workflow templates from services: block to docker run
  so the Restate server's signing private key PEM file can be mounted
- Lambda template is unchanged (uses same WASM core as Node)

Fix Cloudflare Worker: enable nodejs_compat_populate_process_env

The Cloudflare Workers runtime does not define `process` by default,
even with nodejs_compat enabled. Add the nodejs_compat_populate_process_env
compatibility flag so that process.env is populated from Worker bindings
(including .dev.vars in local development). This allows the identity key
env var to be read at module scope without restructuring the example.

Bump wrangler to ^4.66.0

Update wrangler minimum version to get a newer workerd runtime that
may properly support nodejs_compat_populate_process_env at module
evaluation time.

Update pnpm-lock.yaml for wrangler ^4.66.0

Fix Cloudflare Worker: use globalThis.process for safe env access

The Cloudflare Workers runtime does not define the process global at
module evaluation time, even with nodejs_compat_populate_process_env.
Use globalThis.process?.env?. with full optional chaining to safely
handle this, matching the pattern used by the SDK itself in
console_logger_transport.ts.
Copy link
Contributor

@nikrooz nikrooz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Till, lgtm. The CI failure, seems to be deno loading old sdk from cache issue. I am looking into it.

Update from 2024-05-13 to current date. This implicitly enables
nodejs_compat_populate_process_env (default since 2025-04-01),
so the explicit flag can be removed from compatibility_flags.
@tillrohrmann tillrohrmann force-pushed the bump-wrangler-compatibility branch from 1eef235 to 43cdfac Compare February 19, 2026 09:32
@tillrohrmann tillrohrmann merged commit 43cdfac into restatedev:main Feb 19, 2026
8 checks passed
@tillrohrmann tillrohrmann deleted the bump-wrangler-compatibility branch February 19, 2026 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants