💫 Release v3.17.0
Release Note (3.17.0
)
Release time: 2023-06-06 15:25:15
This release contains 1 new feature and 1 bug fix.
🆕 Features
Flows now compatible with DocArray v2 (#5861)
Finally, Flows and Deployments are fully compatible with the new DocArray version (above 0.30.0). This includes all supported protocols and features, namely http
, grpc
and websocket
for Flow
and http
and grpc
for Deployment
.
Now you can enjoy the capacity and expressivity of the new DocArray
together with the performance, scalability and richness of Jina.
from docarray import BaseDoc, DocList
from jina import Flow, Executor, requests
class MyDoc(BaseDoc):
text: str
class MyExec(Executor):
@requests(on='/foo')
def foo(self, docs: DocList[MyDoc], **kwargs):
docs[0].text = 'hello world'
ports=[12345, 12346]
protocols=['http, 'grpc']
with Flow(protocol=protocols, ports=ports).add(uses=MyExec):
for port, protocol in zip(ports, protocols):
c = Client(port=port, protocol=protocol)
docs = c.post(on='/foo', inputs=MyDoc(text='hello'), return_type=DocList[MyDoc])
assert docs[0].text == 'hello world'
While Jina is fully compatible with the new DocArray version, for now it will not install the latest version, since there remain compatibility issues with Hubble and JCloud. As soon as these are resolved, Jina will install the new version by default.
🐞 Bug Fixes
Fix instantiation of Executor with write
decorator (#5897)
Fix instantiation of Executors where the first method is decorated with a @write
decorator.
from jina import Executor, requests
from jina.serve.executors.decorators import write
class WriteExecutor(Executor):
@write
@requests(on='/delete')
def delete(self, **kwargs):
pass
@requests(on='/bar')
@write
def bar(self, **kwargs):
pass
🤟 Contributors
We would like to thank all contributors to this release:
- Joan Fontanals (@JoanFM )