fix(grpc-web): review fixes + in-Pyodide e2e CI for the WASM transport - #2136
Merged
g-despot merged 6 commits intoAug 17, 2026
Merged
Conversation
…uccess Per the grpc-web contract every unary response must carry a grpc-status (trailer frame or header). A proxy that dropped the trailer frame previously read as OK and returned the first message frame.
Fails on drift in either direction: the Emscripten fallback must pass every vendored *_pb2_grpc.py version gate, and the grpc-web shim's FAKE_GRPC_VERSION must equal weaviate.proto.v1._GRPCIO_FALLBACK_VERSION.
…async-only error With PyPI httpx the sync REST path previously failed first with an opaque WeaviateStartUpError ConnectError; the shim's clear async-only guidance was only reachable at open_connection_grpc. Raise it at ConnectionSync construction instead.
run.mjs loads a pinned Pyodide (314.0.4, CPython 3.14) under Node, micropip-installs the two locally built pure wheels (grpcio skipped via its emscripten marker; pydantic_core/cryptography come from the Pyodide distribution — pydantic_core has no wasm wheel on PyPI, which also rules out the 0.28.x line whose bundled pydantic 2.10.6 predates our >=2.12 pin), then awaits e2e.py against Weaviate's core-native /v1/grpc-web endpoint via grpc_path_prefix: connect with live init checks, insert_many, queries/filters/aggregations, multi-tenancy with per-tenant batch insert/delete, error mapping, and the batch.stream()/ experimental() fail-fast. anyio is installed explicitly: Pyodide's httpx recipe drops it but authlib imports it directly.
New pyodide-e2e job beside grpc-web-tests: build both pure wheels, start the async-tests Weaviate (WEAVIATE_139) from the existing ci/docker-compose-async.yml, and run ci/pyodide-e2e/run.mjs under Node 22. No Python matrix — the pinned Pyodide bundle fixes the interpreter. No Envoy/browser: core serves grpc-web natively on the REST port under /v1/grpc-web (default-on since 1.38.3).
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Secrets | View in Orca |
g-despot
merged commit Aug 17, 2026
38f359b
into
feat/grpc-web-wasm-transport
128 of 130 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #2056 — merges into
feat/grpc-web-wasm-transport. Review fixes + the live-Pyodide validation that PR deferred.What's here
main(573768e8) — one conflict inconnect/v4.py(comment-only); main'sWeaviateDeleteManyError[{code}] {details}format kept.packages/grpc-web(6797d747) — newgrpc-web-testsjob (3.10–3.14) and the package added to the ruff targets; the suite was previously invisible to CI.grpc-statustrailer → INTERNAL (6367217e) — a 200 with message frames but no grpc-status anywhere (trailer or header) was read as success; per the grpc-web contract it's an error. Both directions tested.838387b8) — proto_test asserts the1.72.1grpcio fallback passes every vendored stub's version gate, and the shim'sFAKE_GRPC_VERSIONmust equal it; a stub regen that outruns the fallback now turns CI red instead of breaking Pyodide at import.412f8793) — previously an opaque httpxConnectErrorwon the race; now a clear async-onlyWeaviateStartUpErrorbefore any I/O.pyodide-e2eCI job (275680f0,114b5b92) — builds both pure wheels, micropip-installs them in a pinned Pyodide (314.0.4, CPython 3.14.2) under Node 22, and runs a real e2e against Weaviate 1.39's core-native/v1/grpc-web(no transcoder container): health-checked connect, insert_many, queries/filters/aggregations, multi-tenant batch insert/delete, error mapping, and thebatch.stream()fail-fast.Found along the way
pydantic>=2.12pin dictates Pyodide ≥ 314.x (0.28.x bundles 2.10.6 and is unresolvable).anyioinstall under Pyodide (its httpx recipe strips the dep); encoded inci/pyodide-e2e/run.mjs.Verification
Full suites green (69 package / 5 proto / 444 unit / 58 mock, ruff clean); the trailer fix is mutation-tested (old code fails the new test); CPython e2e re-proven over native
/v1/grpc-web; the Pyodide job's exact flow reproduced locally twice, including a dead-port negative run (the job fails when it should).🤖 Generated with Claude Code
https://claude.ai/code/session_012ZjrN4ZanU89RrEmisK98s