pact-foundation/pact_broker-client

support `can-i-merge` check

Closed this issue · 7 comments

Hi,

How can I reproduce this
image
with the pact client. I have no tag on main branch and the --branch option seems for pacticipant only. Seems I cannot specify the provider branch...

image

I can use this option

Can-i-deploy can also be used to check if arbitrary versions have a successful verification. When asking "Can I deploy this application version with the latest version from the main branch of another application" it functions as a "can I merge" check.

$ pact-broker can-i-deploy --pacticipant Foo 173153ae0 \ --pacticipant Bar --latest main

But I need to do it without knowing the providers.

This relates to https://pact.canny.io/feature-requests/p/add-can-i-merge-functionality.

It's currently not a command we support, but I'll add to triage board for review.

👋 Hi! The 'smartbear-supported' label has just been added to this issue, which will create an internal tracking ticket in PactFlow's Jira (PACT-1209). We will use this to prioritise and assign a team member to this task. All activity will be public on this ticket. For now, sit tight and we'll update this ticket once we have more information on the next steps.

See our documentation for more information.

Also a reminder to update the nirvana diagram on docs.pact.io when this work is completed.

We have a PR for it already, but I just wasn't sure if we should support it or not. #117

I think we still want it.

  1. Not all teams will deploy immediately after merging, so a can-i-deploy to an environment is not as relevant, and what they want to know is that it's compatible with the release or some other branch of other applications
  2. BDCT flows, where consumer version selectors aren't present. e.g. you can't say "make sure I don't break the main branch of consumers and all deployed applications". This increases the chance of race-conditions where a provider is not aware of a change a consumer is about to deploy. Put another way, I think it would help us provide the equivalent of our recommended selectors.

Looks like can-i-merge is now available in the latest release. I think we can close this now?

This is now released in the latest version of the pact cli tools.