Hey there, I want to address the issue again that ...
# pact-broker
t
Hey there, I want to address the issue again that I addressed here already. The broker currently treats all pacts verified, when they have been verified on any branch, that has been created before the current branch. This may lead to unstable pipelines, because contracts may have been verified on a feature branch, but not yet merged into the default branch. This causes all newly created branches to have failing pipelines and be blocked from merging until the verifying branch is merged. Disabling verification publication on feature branches is not an option, because then can-i-merge fails for the provider. I want to propose again to only consider contracts as verified, if they have been verified on the default branch. This would also fit the usage of 'can-i-merge': > Checks if the specified pacticipant version is compatible with the configured main branch of each of the pacticipants with which it is integrated. In the original thread @Matt (pactflow.io / pact-js / pact-go) wrote that the current behavior might be by design, because the broker can't know wether a branch contains the contract implementations. This proposed would not eradicate the problem but rather make it occur slightly less often, because the base premise is more plausible. Like Matt already wrote, there is no way to calculate wether to include the contracts either way. The only way we can determine if the default branch still supports all contracts is, if we run the provider tests on the default branch, which we do with each commit anyway. I might be able to provide a PR for this, but I haven't had a lot to do with Ruby yet, so I can't guarantee anything.
👋 1
m
Hey Tim! I think it’s worth investigating further. I think the best starting point is to create a discussion on GitHub (so we don’t lose it to slack history) and we can flesh out the design there. Assuming we do decide to support it, we’ll likely need a way to configure the behaviour so that it’s backwards compatible. A good (and related) example is https://github.com/pact-foundation/pact_broker/discussions/640.
t