Highlights 🌟
Monitoring 💻
Now Jina enables you to monitor the performance of your Executors and the complete Flow with the help of Prometheus and allows you to build a Grafana dashboard to gain better insights on how your system works.
from jina import Flow
f = Flow(monitoring=True).add().add()
with f:
f.block()
#4636 #4635 #4638 #4672 #4689 #4687 #4735 #4738 #4737 #4758 #4752 #4768
Robustness 💪
We have improved the robustness of the system and the network communication between microservices in a Flow and have put a lot of work on getting better information of potential failures in the system.
Changes include:
- Adding a timeout parameter for the Gateway for its grpc communication with Executors #4660
- Ensuring a graceful shutdown of Runtimes in Kubernetes to avoid requests loss #4682
- Adding an extensive test for handling Pod failues in Kubernetes #4743
- Better error reporting of errors happening in the Head of a sharded Executor #4640
- Better error reporting when Flow fails to start #4652
UI improvements 💇
Jina comes with a better UI and a better logging system to help the user get better information from the logs in the best format based on rich.
Other changes
- Remove unnecessary argument from Executors
runtime_backend
(#4644) - Pass environment variables to Gateway and Head Runtimes (#4646)
- Add resource layer with gpu in docker-compose files when
to_docker_compose
is called for Services requiring it (#4718) - You can have inmutable tags when pushing Executors into the Hub (#4676)
target_executor
parameter is considered a regex pattern and not a exact string. All Executors matching this regex will receive the request. (#4756)- Gateway only sends request to Executor if the endpoint is exposed by it (#4756)
Bug fixes 🐛
- Avoid leaking file descriptors when client sends requests (#4734)
- Fix flow plotting when private Executor is used (#4643)
- Executor could not start processes internally (#4692)
- Deadlock on Executor start due to ModuleLock error (#4693)
- Flow early stop when startup failure (#4726)
Breaking changes ⚠️
target_executor
is treated as a regex pattern and not as a string.
Before:
from docarray import DocumentArray
from jina import Flow, Executor, requests
class Exec(Executor):
@requests
def foo(self, docs, **kwargs):
for doc in docs:
doc.text += 'calling foo '
f = Flow().add(name='exec', uses=Exec).add(name='exec_after', uses=Exec)
with f:
res = f.post(on='/', inputs=DocumentArray.empty(1), target_executor='exec')
print(res.texts)
Before, it would give:
['calling foo ']
Now:
['calling foo calling foo ']
❤️ Thanks to the community for all the support and hard work!