Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid opaque byte fields/containers (#35)
This PR deprecates the `bytes coroutine_state` field on `Poll{,Result}` in favor of a `google.protobuf.Any` field. The additional type URL will help systems introspecting the state; they would otherwise have to guess what the opaque bytes represent. This PR also adds a wrapper message for [pickled](https://docs.python.org/3/library/pickle.html) Python values, so that the Python SDK can attach a type URL to Python [inputs](https://github.com/dispatchrun/dispatch-proto/blob/e74123286e7a74baa9f9e64321fceca89242ad04/dispatch/sdk/v1/call.proto#L34), [outputs](https://github.com/dispatchrun/dispatch-proto/blob/e74123286e7a74baa9f9e64321fceca89242ad04/dispatch/sdk/v1/call.proto#L56) and now `state`. Previously we were using the built-in [`BytesValue`](https://github.com/protocolbuffers/protobuf/blob/4a5660c889ef9eb4161dded5c2e91c46f0c30924/src/google/protobuf/wrappers.proto#L120) message, and so elsewhere had to guess what the opaque bytes represent.
- Loading branch information