Repository navigation
[workers-shared] Add a native asset worker entrypoint - #17351
Conversation
|
|
Codeowners approval required for this PR:
Show detailed file reviewers |
082e500 to
cf2e7bc
Compare
There was a problem hiding this comment.
✅ Approved — I found no issues. The default entrypoint behaves as before. In the native entrypoint, missing props or a missing KV namespace returns a 500 through handleError. The tests compare responses from the native and default entrypoints.
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
🔒 Security: ✅ LGTM
No security concerns. The native entrypoint's config, manifest and KV namespace come from ctx.props, which are set by the caller of the service binding, not by the incoming request. If the KV namespace is missing, the request fails instead of being served.
📖 AGENTS.md: ✅ LGTM
No AGENTS.md updates are needed.
📋 Code Quality: ✅ LGTM
AssetWorkerInner.fetchpassesthis.envas both the shared bindings and the deployment inputs, and passesEntrypointType.Inner.runFetchRequestreads the cohort fromctx.version?.cohort, the same context the old code read it from.AssetWorkerNative: ifctx.propsis undefined, the code throws inside thetryandhandleErrorreturns a 500. A missing KV namespace causes an error only when a manifest entry has to be served; a path that is not in the manifest still gets a 404.EntrypointType.Native = 2is added after the existing values, so the numbers already logged forOuterandInnerdo not change.- The
handler.tsandheaders.tschanges only narrowEnvtoSharedBindings.
📝 Documentation: ✅ LGTM
This entrypoint is internal, so no documentation changes are needed.
Reviewed commit: 8f3b1dd4
cf2e7bc to
88e3fee
Compare
|
LGTM |
@cloudflare/autoconfig
@cloudflare/build-output-utils
@cloudflare/cli-shared-helpers
@cloudflare/codemods
@cloudflare/config
@cloudflare/containers-shared
create-cloudflare
@cloudflare/deploy-helpers
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-functions
@cloudflare/pages-shared
@cloudflare/runtime-types
@cloudflare/test-server
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-plugin
@cloudflare/workers-auth
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
AssetWorkerNative reads the asset config, manifest, and optional KV namespace from ctx.props so callers can supply them per invocation. Separate deployment inputs from shared bindings so the native and default entrypoints can use the same serving code. The default entrypoint continues to read its deployment inputs from env.
88e3fee to
8f3b1dd
Compare
workers-devprod
left a comment
There was a problem hiding this comment.
Codeowners reviews satisfied
Add a new entrypoint
AssetWorkerNativeto the asset handler, which reads the asset config, manifest, and optional KV namespace from ctx.props. Separate deployment inputs from shared bindings so the native and default entrypoints can use the same serving code. The default entrypoint continues to read its deployment inputs from env.https://jira.cfdata.org/browse/EW-11212
A picture of a cute animal (not mandatory, but encouraged)