Zied Bejaoui
04/07/2024, 11:58 PMpublishVerificationResult: true,
Shouldn't PACT publish the results even if it's failing and set the verification as failed? For now as I said earlier my pact flow displays Unverified status with Verified at never.
2-I am running PACT test with vi test which is already used in my project. I am a bit confused on how to read, analyse and debug PACT logs and reports? for now I am getting a long command output with some error but it's really hard to read and to follow here is part of my output :
024-04-07T23:44:36.822159Z ERROR ThreadId(02) verify_provider_async: pact_verifier: Failed to load pact - No pacts found for provider 'MyTransferProvider' matching the given consumer version selectors in pact broker '<https://notabene.pactflow.io/>'
Failures:
2024-04-07T23:44:36.991267Z TRACE tokio-runtime-worker hyper::proto::h2::client: client::dispatch::Sender dropped
2024-04-07T23:44:36.991269Z TRACE tokio-runtime-worker verify_provider_async:Connection{peer=Client}:poll: h2::proto::connection: connection.state=Open
1) Failed to load pact - No pacts found for provider 'MyTransferProvider' matching the given consumer version selectors in pact broker '**********.io'
There were 1 pact failures
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
FAIL *****/******/******action-provider.test.ts > Transfers provider tests > a request for a new transfer > sends a valid transfer
Error: Verfication failed
❯ .yarn/unplugged/@pact-foundation-pact-core-npm-14.3.3-0e1950cbed/node_modules/@pact-foundation/pact-core/src/verifier/nativeVerifier.ts:52:20
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯
Test Files 1 failed (1)
Tests 1 failed (1)
Start at 01:44:33
Duration 3.04s (transform 22ms, setup 0ms, collect 291ms, tests 2.47s, environment 0ms, prepare 50ms)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
INFO
or perhaps even justn ERROR
. Trace level logs will be too verbose for everyday useZied Bejaoui
04/08/2024, 12:41 AMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Hey Matt, I think that the issue is rather it can’t match between consumer and producer based on the version of each in order to match it in broker.perhaps, but you wouldn’t normally select on versions
Matt (pactflow.io / pact-js / pact-go)
Zied Bejaoui
04/08/2024, 12:42 AMZied Bejaoui
04/08/2024, 12:42 AMZied Bejaoui
04/08/2024, 12:43 AMproviderVersion: versionFromGitTag(),
Zied Bejaoui
04/08/2024, 12:43 AMZied Bejaoui
04/08/2024, 12:43 AMZied Bejaoui
04/08/2024, 12:44 AMZied Bejaoui
04/08/2024, 12:44 AMconsumerVersionSelectors: [
{
matchingBranch: true,
},
],
});
Matt (pactflow.io / pact-js / pact-go)
Zied Bejaoui
04/08/2024, 12:45 AMZied Bejaoui
04/08/2024, 12:45 AMMatt (pactflow.io / pact-js / pact-go)
I have debugged locally and the version is assigned correctlywhat are you trying to do with versions? Versions are not related to matching behaviour - they describe the version of the application you are publishing (consumer side) or verifying (provider side).
Zied Bejaoui
04/08/2024, 12:46 AMMatt (pactflow.io / pact-js / pact-go)
as my goal for now is 1-Get the provider results uploaded to pact flow 2-Pass the pactthe problem is it’s not finding any pacts to verify, so problem #1 is getting you consumer selectors right.
Matt (pactflow.io / pact-js / pact-go)
Zied Bejaoui
04/08/2024, 12:47 AMZied Bejaoui
04/08/2024, 12:48 AMZied Bejaoui
04/08/2024, 12:48 AMZied Bejaoui
04/08/2024, 12:49 AMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Zied Bejaoui
04/08/2024, 12:51 AMZied Bejaoui
04/08/2024, 12:57 AMMatt (pactflow.io / pact-js / pact-go)
Zied Bejaoui
04/08/2024, 1:20 AMZied Bejaoui
04/08/2024, 1:20 AMMatt (pactflow.io / pact-js / pact-go)
master
. The consumer published to a different branch pact-integration
, so the matchingBranch
selector has not found any pactsZied Bejaoui
04/08/2024, 1:23 AMZied Bejaoui
04/08/2024, 1:24 AMZied Bejaoui
04/08/2024, 1:25 AMZied Bejaoui
04/08/2024, 1:25 AMMatt (pactflow.io / pact-js / pact-go)
GIT_BRANCH
set as an environment variable?Matt (pactflow.io / pact-js / pact-go)
Zied Bejaoui
04/08/2024, 1:29 AMZied Bejaoui
04/08/2024, 1:29 AMZied Bejaoui
04/08/2024, 1:29 AMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Slackbot
04/08/2024, 1:40 AMZied Bejaoui
04/08/2024, 1:43 AM