question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pending Pacts - pactbroker.providerBranches not working

See original GitHub issue

I tried using pactbroker.providerBranches (replacing pactbroker.providerTags) on my provider with latest release 4.3.8. It is not able to fetch pending and wip pacts using branches. It was able to fetch the pending and wip pacts using tags. Doing bit of investigation, it appears the problem is because this code populates providerVersionBranches but Pact broker expects providerVersionBranch I think (@bethesque ?). This is my suspect but I am not sure.

Pactbroker log:

2022-05-26 17:48:01.586098 I [7:puma srv tp 001] PactBroker::Api::Resources::ProviderPactsForVerification -- Fetching pacts for verification by pactdemo-provider-springboot -- {:provider_name=>"pactdemo-provider-springboot", :params=>{"consumerVersionSelectors"=>[{"mainBranch"=>true}, {"deployedOrReleased"=>true}], "includePendingStatus"=>true, "includeWipPactsSince"=>"2022-05-01", "providerVersionBranches"=>["mybranch"], "providerVersionTags"=>[]}}

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
praveen-emcommented, May 27, 2022

sure, I will give it a shot.

1reaction
YOU54Fcommented, May 26, 2022

Hi,

I think you are correct

https://github.com/pact-foundation/pact-ruby/blob/f0e37a4794e72d0a469298ff592d69f1304c9022/lib/pact/pact_broker/fetch_pact_uris_for_verification.rb#L82-L83

providerVersionBranches refs only exist in pact-jvm

https://github.com/search?q=providerVersionBranches&type=code

providerVersionBranch refs exist in several locataions (docs and source)

https://github.com/search?q=providerVersionBranch&type=code

Also looking at the code, it’s expecting a single value string not an array

Would happily accept a pull request if you have time?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pending pacts | Pact Docs
Enabling the "pending pacts" feature ensures the pact verification task (and therefore, the build) only fails when a breaking change causes ...
Read more >
Wrong pending status resolving while WIP pacts feature ...
A pact's content is pending for all branches of a provider until the first successful verification has been published. From then on, it...
Read more >
Pact Broker - What is the difference between the pact jvm ...
providerBranch is used for setting the current branch of the provider repository were running the verification? To prevent that a verification ...
Read more >
Pending Pacts — What Are They Exactly? - codeburst
In order to make it work you need two compatible ingredients — a pact library and the Pact Broker that support the pending...
Read more >
And what is the value we should pass to those variables | Pact ...
Beth (pactflow.io/Pact Broker/pact-ruby). 10/06/2022, 3:56 PM. PR branch or Master branch. Which ever branch is running the build.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found