Skip to content

v0.17.1

Choose a tag to compare

@rustyconover rustyconover released this 18 May 14:35
· 41 commits to main since this release

Sticky streaming conformance coverage

Patch release on top of v0.17.0. The canonical TestSticky conformance group previously only exercised sticky sessions on unary calls — this release extends it with four tests that drive the same _StickyCounter through producer and exchange streams, so cross-language ports implementing sticky must now prove the contract holds across the multi-request shape of streaming RPCs (not just one-shot unary calls).

What's covered

  • TestSticky::test_producer_stream_resumes_session — a producer stream that increments and emits ctx.session.value on every iteration; verifies the session is rebound across the multi-turn producer shape.
  • TestSticky::test_exchange_stream_resumes_session — an exchange stream that mutates the session counter from the input by column on each round-trip; verifies state accumulates across independent HTTP exchange requests.
  • TestSticky::test_stream_without_session_raises — streaming method invoked outside with_session_token() surfaces RpcError with no session bound.
  • TestSticky::test_session_shared_between_unary_and_stream — open via unary, mutate via unary + producer stream + unary, close — all observe the same backing _StickyCounter.

ConformanceService surface additions

Cross-language ports implementing sticky must add these two methods to pass the streaming TestSticky tests:

  • stream_session_counter(count: int) -> Stream[StreamState] — producer stream emitting count increments of the sticky session counter.
  • exchange_session_counter() -> Stream[StreamState] — exchange stream that adds each input by column to the sticky session counter.

Describe method count bumps 79 → 81; runner _EXPECTED_METHODS and _STREAM_METHODS gain the two new names so the describe-conformance suite stays in sync.

Compatibility

  • No behaviour change for existing callers. Non-conformance code paths are byte-identical to 0.17.0.
  • Ports without sticky support skip the entire TestSticky group, including the new streaming tests — no port-side action required if sticky isn't implemented.
  • _StickyCounter moved from vgi_rpc.conformance._impl to vgi_rpc.conformance._types (a private helper; the relocation is mentioned only because in-tree tests imported it directly).