Describe the feature
We need to display potential warning messages coming from the API stream.
Your proposal
We have added a new type of warning message that can be sent to the request stream from the internal API (when using jina hub push for example ). These messages need to be displayed within the console in a clear manner. Multiple warnings can be received from a single stream, there it's necessary to display them in a fitting format, such as using bullet points.
The structure of the warning message follows that of the other messages.
These functions should instead check for message["type"] == "warning" and display all warnings received throughout the lifetime of the request at the end.
elif t == 'warning':
warning = stream_msg.get('text')
...
This is how the CLI behaves currently - it can only display one warning messages that will get sliced if too long.
Instead, the CLI should be able to display multiple warning messages.
Describe the feature We need to display potential warning messages coming from the API stream.
Your proposal We have added a new type of
warning
message that can be sent to the request stream from the internal API (when usingjina hub push
for example ). These messages need to be displayed within the console in a clear manner. Multiple warnings can be received from a single stream, there it's necessary to display them in a fitting format, such as using bullet points.The structure of the warning message follows that of the other messages.
Currently, CLI commands like
jina hub push
check formessage["warning"]
when themessage["type"] == "complete"
.These functions should instead check for
message["type"] == "warning"
and display all warnings received throughout the lifetime of the request at the end.This is how the CLI behaves currently - it can only display one warning messages that will get sliced if too long. Instead, the CLI should be able to display multiple warning messages.