Skip to content

fix(grpc-web): review fixes + in-Pyodide e2e CI for the WASM transport - #2136

Merged
g-despot merged 6 commits into
feat/grpc-web-wasm-transportfrom
feat/grpc-web-review-fixes-pyodide-e2e
Aug 17, 2026
Merged

fix(grpc-web): review fixes + in-Pyodide e2e CI for the WASM transport#2136
g-despot merged 6 commits into
feat/grpc-web-wasm-transportfrom
feat/grpc-web-review-fixes-pyodide-e2e

Conversation

@g-despot

Copy link
Copy Markdown
Collaborator

Stacked on #2056 — merges into feat/grpc-web-wasm-transport. Review fixes + the live-Pyodide validation that PR deferred.

What's here

  • Merge of main (573768e8) — one conflict in connect/v4.py (comment-only); main's WeaviateDeleteManyError [{code}] {details} format kept.
  • CI runs + lints packages/grpc-web (6797d747) — new grpc-web-tests job (3.10–3.14) and the package added to the ruff targets; the suite was previously invisible to CI.
  • Missing grpc-status trailer → 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.
  • Fallback-version drift pins (838387b8) — proto_test asserts the 1.72.1 grpcio fallback passes every vendored stub's version gate, and the shim's FAKE_GRPC_VERSION must equal it; a stub regen that outruns the fallback now turns CI red instead of breaking Pyodide at import.
  • Sync client rejected at construction under Emscripten (412f8793) — previously an opaque httpx ConnectError won the race; now a clear async-only WeaviateStartUpError before any I/O.
  • pyodide-e2e CI 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 the batch.stream() fail-fast.

Found along the way

  • pydantic_core publishes no wasm wheel on PyPI at any version — only Pyodide-bundled builds exist, so the client's pydantic>=2.12 pin dictates Pyodide ≥ 314.x (0.28.x bundles 2.10.6 and is unresolvable).
  • authlib needs an explicit anyio install under Pyodide (its httpx recipe strips the dep); encoded in ci/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

…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).
@g-despot
g-despot requested a review from a team as a code owner August 17, 2026 06:44

@orca-security-eu orca-security-eu Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca

@g-despot
g-despot changed the base branch from feat/grpc-web-wasm-transport to main August 17, 2026 07:04
@g-despot
g-despot changed the base branch from main to feat/grpc-web-wasm-transport August 17, 2026 07:04
@g-despot
g-despot merged commit 38f359b into feat/grpc-web-wasm-transport Aug 17, 2026
128 of 130 checks passed
@g-despot
g-despot deleted the feat/grpc-web-review-fixes-pyodide-e2e branch August 17, 2026 07:09
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.

1 participant