diff --git a/buf.yaml b/buf.yaml index b2e72dc..bfe823f 100644 --- a/buf.yaml +++ b/buf.yaml @@ -4,7 +4,9 @@ deps: - buf.build/bufbuild/protovalidate breaking: use: - - FILE + - WIRE_JSON + except: + - FIELD_SAME_ONEOF lint: use: - DEFAULT diff --git a/dispatch/sdk/python/v1/pickled.proto b/dispatch/sdk/python/v1/pickled.proto new file mode 100644 index 0000000..f3c23ee --- /dev/null +++ b/dispatch/sdk/python/v1/pickled.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + +package dispatch.sdk.python.v1; + +// Pickled is a wrapper for a value that was serialized with +// the Python pickle package. +message Pickled { + // Pickled representation of a value. + bytes pickled_value = 1; +} diff --git a/dispatch/sdk/v1/poll.proto b/dispatch/sdk/v1/poll.proto index e5ecd4d..d51fc50 100644 --- a/dispatch/sdk/v1/poll.proto +++ b/dispatch/sdk/v1/poll.proto @@ -5,13 +5,17 @@ package dispatch.sdk.v1; import "buf/validate/validate.proto"; import "dispatch/sdk/v1/call.proto"; import "dispatch/sdk/v1/error.proto"; +import "google/protobuf/any.proto"; import "google/protobuf/duration.proto"; // Poll is a directive to make asynchronous calls and join on their results. message Poll { // Snapshot of the coroutine state that will be used in the next run to // resume the function. - bytes coroutine_state = 1; + oneof state { + bytes coroutine_state = 1; + google.protobuf.Any typed_coroutine_state = 6; + } // Calls to make asynchronously. repeated Call calls = 2; @@ -45,7 +49,10 @@ message Poll { message PollResult { // The coroutine state that was recorded by the coroutine when it was last // paused. - bytes coroutine_state = 1; + oneof state { + bytes coroutine_state = 1; + google.protobuf.Any typed_coroutine_state = 4; + } // The list of results from calls that were made by the coroutine and // completed during the poll.