damondouglas opened a new issue, #24203: URL: https://github.com/apache/beam/issues/24203
### What needs to happen? ## What work does this Task describe? This task adds two new methods to the existing [pubsubx](https://pkg.go.dev/github.com/apache/beam/sdks/[email protected]/go/pkg/beam/util/pubsubx) package. ```go func GetSchema(ctx context.Context, client *pubsub.SchemaClient, schemaId string) (*pubsub.SchemaConfig, error) { ... } func EncodeSchema(dst reflect.Type, src *pubsub.SchemaConfig) ([]byte, error) { ... } ``` ## What value may result from this Task's output? As with the rest of the existing [pubsubx](https://pkg.go.dev/github.com/apache/beam/sdks/[email protected]/go/pkg/beam/util/pubsubx) package, this work is not intended for usage by Beam developers directly. Querying from and converting the Pub/Sub Schema [1] to a Beam Schema[2] would allow us to validate that both schemas match to prevent potential errors. This supports the design goals of Pub/Sub schemas to facilitate a contract between publisher and subscriber and facilitate a single source of truth for inter-team production and consumption. ## Ready and Done Measures ### Ready No blockers ### Done - [ ] Tests detect whether code errors exist in `GetSchema` - [ ] Tests detect whether code errors exist in `EncodeSchema` - [ ] Integration tests assert expected `EncodedSchema` output as a result of `GetSchema` for provisioned Pub/Sub resources ## References [1] https://cloud.google.com/pubsub/docs/schemas [2] https://beam.apache.org/documentation/programming-guide/#schemas ### Issue Priority Priority: 3 ### Issue Component Component: io-go-gcp -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
