Hello. I have a couple of questions regarding feat...
# protobufs
m
Hello. I have a couple of questions regarding features, in case anyone knows or has also tried doing this. 1. Is there any way of performing some sort of BDCT with gRPC/protobufs? Personally, I tried to do something with a dummy HelloWorld consumer-provider project. I know that only OAS provider contracts are supported in Pactflow, so I tried with translating a protobuf specification into OAS (I also know some protobuf features might be impossible to port, but I don't mind that for now), but I still could not get it to work right. Seems it just gives "Compatible" every time, regardless of whether the consumer and provider contract are indeed matching (my guess is because Pactflow does not support Plugin pacts, so a protobuf consumer pact is bypassed entirely?). Any help is appreciated. 2. For CDCT, are there any examples regarding sequential/streaming communication, or is it not implemented yet?
y
Hey, re 1: https://docs.pactflow.io/docs/bi-directional-contract-testing/contracts/pact#supported-pact-specification-versions only v4
Synchronous/HTTP
are validated for v4 spec, you are correct message or plugin pacts are not supported for BDCT at this time re 2. I believe streaming is unsupported https://github.com/pactflow/pact-protobuf-plugin?tab=readme-ov-file#unsupported-features You can raise a feature request in the repository if you wish, and we may be able get direction on the best way to approach this from the maintainer which could allow others to implement this functionality
m
Thank you for the answer. Do you know if there are any specific plans regarding Pactflow over protobuf? I see it on the roadmap, but without any details.
y
The ultimate goal would be to provider BDCT type comparisons for multiple API description types (such as AsyncAPI and I would assume for grpc/protobuf it would be the Proto file itself), against a Pact contract contents, however this work hasn’t been prioritised yet, hence the lack of detail. We are not adverse to the community looking to build out solutions if this appeals, however I would always caveat that BDCT offers less guarantees than CDCT, as you are not testing against a real provider with the Pact framework, and therefore I would be more inclined as a maintainer to improve the CDCT gRPC experience, than build out a BDCT comparison tool. If there are features missing (like streaming) feel free to raise on the repository as a feature request, and we may find a contributor or maintainer who wants to pick up that feature. We can also help guide should someone want to pick it up