I just came across a workflow issue with a new pac...
# pactflow
h
I just came across a workflow issue with a new pact for a provider that has yet to be merged by the consumer. Details in thread...
From the tutorials and examples I've done the following: • As a Consumer, created a pact on a feature branch. • Provider implemented the pact on a feature branch and merged to main. At this point it seems like this is a WIP Pending pact as it still remains on the consumer feature branch. In addition, the provider has no other verified pacts, eg first pact scenario. • Now from a new branch on the provider I get the following error:
Copy code
Failures:

1) Failed to load pact - Could not load pacts from the pact broker '<https://REDACTED.pactflow.io>' - NotFound("No pacts were found for this provider")
Example Verify Request:
Copy code
_, err := pact.VerifyProvider(t, types.VerifyRequest{
		ProviderBaseURL: fmt.Sprintf("<http://127.0.0.1>:%d", port),
		PactLogDir:      brokerConfig.LogsDir(),
		ConsumerVersionSelectors: []types.ConsumerVersionSelector{
			types.ConsumerVersionSelector{
				MainBranch: true,
			},
			types.ConsumerVersionSelector{
				MatchingBranch: true,
			},
			types.ConsumerVersionSelector{
				DeployedOrReleased: true,
			},
		},
		BrokerURL:                  brokerConfig.BrokerURL,
		BrokerToken:                brokerConfig.BrokerAccessToken,
		EnablePending:              true,
		IncludeWIPPactsSince:       &includeWipPactsSince,
		PublishVerificationResults: allowPublishVerificationResults(),
		ProviderBranch:             gitInfo.Branch,
		ProviderTags:               []string{gitInfo.Branch},
		ProviderVersion:            gitInfo.Version,
		StateHandlers:              stateHandlers,
	})
occurs with:
<http://github.com/pact-foundation/pact-go/v2|github.com/pact-foundation/pact-go/v2> v2.0.0-beta.14.0.20220628130155-b610d4b9149d
And executing from the main branch of the provider does not cause this error for the WIP
Also discovered VerifyPluginRequest::FailIfNoPactsFound option does not seem to get used as it does in 1.7.0
m
Ah good spot I don't think that option can be wired into the new core. I'll double check
h
Also curious about the expectations of this workflow for provider branches where the first provider pact is merged to main on provider branch but still a WIP on consumer's. Shouldnt the provider branches detect these wip/pending pacts still, rather than failing with no pact error?