[TOREE-541] Reply message should implement status field
This PR refers to https://jupyter-client.readthedocs.io/en/latest/messaging.html to revise the Jupyter message protocol implementation
All reply messages have a 'status' field ...
A trait ReplyContent is introduced to make sure all reply messages meet this contract.
One exception is "connect_reply", because
Deprecated since version 5.1: connect_request/reply have not proved useful, and are considered deprecated. Kernels are not expected to implement handlers for this message.
https://jupyter-client.readthedocs.io/en/latest/messaging.html#connect
kindly ping @lresende and @kevin-bates, would you mind taking a look when you have time?
I see a lot of updates adding status "ok"... how about error conditions when something fail?
@lresende I think the code won't reach there if something fails before it. Note that, only a few kind simple reply messages did not implement the status, for message like ExecuteReply which already has status field with properly handled.
@lresende FYI, I changed the code to use type XyzReplyOk = XyzReply to keep consistent with the current code, no functionality changes.
@lresende @kevin-bates would you mind taking another look? IMO this does not change the state of error handling, should be safe.
Have you tested this with real job notebooks on latest jupyterlab 3.x and no side effects?
@lresende I tested it with built-in examples/magic-tutorial.ipynb, everything goes well
Kindly ping @lresende @kevin-bates
@lresende I rebased it on the latest master and fixed the conflict, please take a look when you have time.