New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for publishing verification results with branches #151
Comments
We already support There is a tiny Pact CLI in rust that supports publishing pacts, albeit I'm not sure we want it personally. We have enough things to maintain! |
That's for the consumer version. The change is to set the branch for the provider version. But that reminds me, it also needs to be sent in the 'pacts for verification' call. I'll update the original comment. |
I've started picking this up. Note to myself on testing:
|
@bethesque so I have a consumer where I have published with a branch:
But whenever I query via the pacts for verification endpoint, there are never any results:
API Response:
I assume I'm doing something wrong. I've read https://github.com/pact-foundation/pact_broker/blob/master/lib/pact_broker/doc/views/provider-pacts-for-verification.markdown but can't see what I'm doing wrong. This is also true of the |
OK, so after a sleep I realised that I'd only been testing a bi-directional contract provider. Changing to the standard Pact provider, it works. Moving on for now... |
Looks like it does the trick:
|
Wonderful! |
Ok, giving this some more thought, I can't see why the provider being bi-directional would make a difference. The pacts for verification endpoint doesn't know or care about bi-directional. We'll have to keep an eye on this as we roll out bi-directional. |
That looks like it's publishing with the old API, not the new one. Maybe the other consumer used a newer version of the CLI? |
I think the PR is merged, but not yet released. Once the next FFI lib version is released we can close this off, and it will be available to all clients. |
I'll take a look and try it from scratch. Perhaps one of the examples was out of date or I needed to pull a fresh image. |
I think this can be closed - this was implemented in PactNet using an updated FFI so that support is now there. |
This change allows the provider version associated with verification results to be created with a branch.
providerVersionBranch
in the request.PUT
using thepb:branch-version
relation from the provider resource (with paramsbranch
andversion
), or thepb:pacticipant-branch-version
relation from the index (with paramspacticipant
,branch
andversion
).Sorry to add yet another call to the results publishing! I imagine the rust code for publishing verification results looks about as bad as the ruby code does now 😆 There will be an "all in one" verification results publishing endpoint coming at some stage, but I don't want to wait for that to be done before we can get people using branches.
The text was updated successfully, but these errors were encountered: