jina-ai/jina

Release Notes 3.21.0

JoanFM opened this issue ยท 0 comments

Release Note

This release contains 1 new feature, 4 bug fixes, and 1 documentation improvement.

๐Ÿ†• Features

Add return_type parameter to gateway streamer methods (#6027)

By default, GatewayStreamer will fetch executor input and output schemas and reconstruct docarray models dynamically. The output schemas will be used to cast the responses at the gateway level.

Although the cast responses are nearly identical to the original schemas defined at the executor level, they might fail some checks. For example, if the gateway receives a document doc from an executor with output MyDoc, the following check will fail:

assert isinstance(doc, MyDoc)

Similarly, adding doc to a DocList[MyDoc] will fail the type checks.

To prevent this, the user of a GatewayStreamer can now use the return_type parameter to explicitly specify the type that will be used to cast the response. Output responses received from gateway streamer methods will always match the specified return type.

๐Ÿž Bug Fixes

Fix topology schema validation (#6057)

Previously, if the endpoint model schemas of different Executors in a Flow did not match exactly, the Flow would fail to start, Even if the difference was as small as a different default value, it would still give rise to this error.

We have fixed this bug by relaxing the model schema checking to only verify that the types of properties match.

Fix consensus module memory leak (#6054)

In the consensus golang module, some allocated strings were not being properly released. We have repaired this.

Document casting in Flow gateway (#6032)

This bug is related to #6027. We now use the return_type parameter in GatewayStreamer to ensure that Documents received at the gateway level are properly cast to the correct schema. This prevents validation and serialization errors that previously occurred.

Remove sandbox (#6047)

Remove support for deploying Executors in the Jina Cloud sandbox, since the sandbox has been deprecated.

๐Ÿ“— Documentation Improvements

  • Make example copy-pastable (#6052)

๐ŸคŸ Contributors

We would like to thank all contributors to this release: