Moises Siles
06/13/2023, 9:04 PM2023-06-13T20:59:16.333720Z DEBUG tokio-runtime-worker hyper::proto::h1::conn: incoming body is content-length (165 bytes)
2023-06-13T20:59:16.333735Z DEBUG tokio-runtime-worker hyper::proto::h1::conn: incoming body completed
2023-06-13T20:59:16.333768Z DEBUG ThreadId(02) hyper::client::pool: pooling idle connection for ("http", localhost:9292)
2023-06-13T20:59:16.334098Z ERROR ThreadId(02) pact_verifier: Failed to load pact - Could not load pacts from the pact broker '<http://localhost:9292>'
2023-06-13T20:59:16.334130Z WARN ThreadId(02) pact_matching::metrics:
Please note:
We are tracking events anonymously to gather important usage statistics like Pact version and operating system. To disable tracking, set the 'PACT_DO_NOT_TRACK' environment variable to 'true'.
basically
1. I downloaded a branch from my coworker,
2. I ran the consumer tests,
3. I published the contract into the broker (local docker, no previous version of the contract),
4. run the provider test and it was throwing the error about couldn’t not load pactsMatt (pactflow.io / pact-js / pact-go)
Moises Siles
06/13/2023, 9:58 PM> e2e@1.0.0 test:provider
> mocha test/provider.spec.js
People App Service listening on <http://localhost:8081>
Pact Verification
2023-06-13T20:59:15.734805Z DEBUG ThreadId(01) pact_ffi::verifier: pact_ffi::verifier::pactffi_verifier_new_for_application FFI function invoked
2023-06-13T20:59:15.735309Z DEBUG ThreadId(01) pact_ffi::verifier: pact_ffi::verifier::pactffi_verifier_set_provider_info FFI function invoked
2023-06-13T20:59:15.735513Z DEBUG ThreadId(01) pact_ffi::verifier: pact_ffi::verifier::pactffi_verifier_set_provider_state FFI function invoked
2023-06-13T20:59:15.735639Z DEBUG ThreadId(01) pact_ffi::verifier: pact_ffi::verifier::pactffi_verifier_set_verification_options FFI function invoked
2023-06-13T20:59:15.735716Z DEBUG ThreadId(01) pact_ffi::verifier: pact_ffi::verifier::pactffi_verifier_set_publish_options FFI function invoked
2023-06-13T20:59:15.736158Z DEBUG ThreadId(01) pact_ffi::verifier: pact_ffi::verifier::pactffi_verifier_broker_source_with_selectors FFI function invoked
2023-06-13T20:59:15.739750Z DEBUG ThreadId(02) pact_ffi::verifier: pact_ffi::verifier::pactffi_verifier_execute FFI function invoked
2023-06-13T20:59:15.739824Z DEBUG ThreadId(02) pact_ffi::verifier::handle: Pact source to verify = PactBrokerWithDynamicConfiguration(<http://localhost:9292>, provider_name='e2e Provider Example', enable_pending=true, include_wip_since=None, provider_tags=["master"], provider_branch=Some("master"), consumer_version_selectors='[ConsumerVersionSelector { consumer: None, tag: None, fallback_tag: None, latest: None, deployed_or_released: None, deployed: None, released: None, environment: None, main_branch: None, branch: None, matching_branch: Some(true) }], auth=None')
2023-06-13T20:59:15.743652Z DEBUG ThreadId(02) pact_plugin_driver::catalogue_manager: Updated catalogue entries:
core/content-generator/binary
core/content-generator/json
core/content-matcher/json
core/content-matcher/multipart-form-data
core/content-matcher/text
core/content-matcher/xml
2023-06-13T20:59:15.743713Z DEBUG ThreadId(02) pact_plugin_driver::catalogue_manager: Updated catalogue entries:
core/matcher/v1-equality
core/matcher/v2-max-type
core/matcher/v2-min-type
core/matcher/v2-minmax-type
core/matcher/v2-regex
core/matcher/v2-type
core/matcher/v3-content-type
core/matcher/v3-date
core/matcher/v3-datetime
core/matcher/v3-decimal-type
core/matcher/v3-includes
core/matcher/v3-integer-type
core/matcher/v3-null
core/matcher/v3-number-type
core/matcher/v3-time
core/matcher/v4-array-contains
core/matcher/v4-equals-ignore-order
core/matcher/v4-max-equals-ignore-order
core/matcher/v4-min-equals-ignore-order
core/matcher/v4-minmax-equals-ignore-order
core/matcher/v4-not-empty
core/matcher/v4-semver
[14:59:15.735] DEBUG (90906): pact-core@13.13.5: the optional ffi function 'pactffiVerifierSetFilterInfo' was not executed as it had non-fatal validation errors: None of PACT_DESCRIPTION, PACT_PROVIDER_STATE or PACT_PROVIDER_NO_STATE were set in the environment
[14:59:15.725] INFO (90906): pact@11.0.2: Verifying provider
[14:59:15.735] DEBUG (90906): pact-core@13.13.5: the optional ffi function 'pactffiVerifierSetConsumerFilters' was not executed as it had non-fatal validation errors: Either no consumerFilters option provided, or the array was empty
[14:59:15.735] DEBUG (90906): pact-core@13.13.5: the optional ffi function 'pactffiVerifierSetFailIfNoPactsFound' was not executed as it had non-fatal validation errors: No failIfNoPactsFound option provided
[14:59:15.735] DEBUG (90906): pact-core@13.13.5: the optional ffi function 'pactffiVerifierAddCustomHeader' was not executed as it had non-fatal validation errors: No customProviderHeaders option provided
[14:59:15.736] DEBUG (90906): pact-core@13.13.5: the optional ffi function 'pactffiVerifierAddDirectorySource' was not executed as it had non-fatal validation errors: No pactUrls option provided
[14:59:15.736] DEBUG (90906): pact-core@13.13.5: the optional ffi function 'pactffiVerifierAddProviderTransport' was not executed as it had non-fatal validation errors: No additional provider transports provided
[14:59:15.732] INFO (90906): pact-core@13.13.5: Verifying Pacts.
[14:59:15.733] INFO (90906): pact-core@13.13.5: Verifying Pact Files
[14:59:15.733] DEBUG (90906): pact-core@13.13.5: Initalising native core at log level 'DEBUG'
2023-06-13T20:59:16.281088Z INFO ThreadId(02) pact_verifier::pact_broker: Fetching path '/' from pact broker
2023-06-13T20:59:16.281462Z DEBUG tokio-runtime-worker hyper::client::connect::dns: resolving host="localhost"
2023-06-13T20:59:16.282985Z DEBUG ThreadId(02) hyper::client::connect::http: connecting to [::1]:9292
2023-06-13T20:59:16.283349Z DEBUG ThreadId(02) hyper::client::connect::http: connected to [::1]:9292
2023-06-13T20:59:16.283928Z DEBUG tokio-runtime-worker hyper::proto::h1::io: flushed 155 bytes
2023-06-13T20:59:16.293714Z DEBUG tokio-runtime-worker hyper::proto::h1::io: parsed 7 headers
2023-06-13T20:59:16.293743Z DEBUG tokio-runtime-worker hyper::proto::h1::conn: incoming body is content-length (4300 bytes)
2023-06-13T20:59:16.293784Z DEBUG tokio-runtime-worker hyper::proto::h1::conn: incoming body completed
2023-06-13T20:59:16.293815Z DEBUG ThreadId(02) hyper::client::pool: pooling idle connection for ("http", localhost:9292)
2023-06-13T20:59:16.294215Z DEBUG ThreadId(02) pact_verifier::pact_broker: Link URL is templated
2023-06-13T20:59:16.294306Z DEBUG ThreadId(02) pact_verifier::pact_broker: templated URL = <http://localhost:9292/pacts/provider/{provider}/for-verification>
2023-06-13T20:59:16.295418Z DEBUG ThreadId(02) pact_verifier::pact_broker: final URL = <http://localhost:9292/pacts/provider/e2e%20Provider%20Example/for-verification>
2023-06-13T20:59:16.295499Z INFO ThreadId(02) pact_verifier::pact_broker: Fetching path '/pacts/provider/e2e%20Provider%20Example/for-verification' from pact broker
2023-06-13T20:59:16.295528Z DEBUG ThreadId(02) hyper::client::pool: reuse idle connection for ("http", localhost:9292)
2023-06-13T20:59:16.295610Z DEBUG tokio-runtime-worker hyper::proto::h1::io: flushed 211 bytes
2023-06-13T20:59:16.318444Z DEBUG tokio-runtime-worker hyper::proto::h1::io: parsed 7 headers
2023-06-13T20:59:16.318464Z DEBUG tokio-runtime-worker hyper::proto::h1::conn: incoming body is content-length (2554 bytes)
2023-06-13T20:59:16.318482Z DEBUG tokio-runtime-worker hyper::proto::h1::conn: incoming body completed
2023-06-13T20:59:16.318508Z DEBUG ThreadId(02) hyper::client::pool: pooling idle connection for ("http", localhost:9292)
2023-06-13T20:59:16.318690Z DEBUG ThreadId(02) pact_verifier::pact_broker: templated URL = <http://localhost:9292/pacts/provider/e2e%20Provider%20Example/for-verification>
2023-06-13T20:59:16.319412Z DEBUG ThreadId(02) pact_verifier::pact_broker: final URL = <http://localhost:9292/pacts/provider/e2e%20Provider%20Example/for-verification>
2023-06-13T20:59:16.319474Z DEBUG ThreadId(02) pact_verifier::pact_broker: Sending JSON to <http://localhost:9292/pacts/provider/e2e%20Provider%20Example/for-verification> using POST: {"providerVersionTags":["master"],"includePendingStatus":true,"consumerVersionSelectors":[{"matchingBranch":true}],"providerVersionBranch":"master"}
2023-06-13T20:59:16.319515Z DEBUG ThreadId(02) hyper::client::pool: reuse idle connection for ("http", localhost:9292)
2023-06-13T20:59:16.319607Z DEBUG tokio-runtime-worker hyper::proto::h1::io: flushed 421 bytes
2023-06-13T20:59:16.333702Z DEBUG tokio-runtime-worker hyper::proto::h1::io: parsed 7 headers
2023-06-13T20:59:16.333720Z DEBUG tokio-runtime-worker hyper::proto::h1::conn: incoming body is content-length (165 bytes)
2023-06-13T20:59:16.333735Z DEBUG tokio-runtime-worker hyper::proto::h1::conn: incoming body completed
2023-06-13T20:59:16.333768Z DEBUG ThreadId(02) hyper::client::pool: pooling idle connection for ("http", localhost:9292)
2023-06-13T20:59:16.334098Z ERROR ThreadId(02) pact_verifier: Failed to load pact - Could not load pacts from the pact broker '<http://localhost:9292>'
2023-06-13T20:59:16.334130Z WARN ThreadId(02) pact_matching::metrics:Moises Siles
06/13/2023, 9:58 PMPlease note:
We are tracking events anonymously to gather important usage statistics like Pact version and operating system. To disable tracking, set the 'PACT_DO_NOT_TRACK' environment variable to 'true'.
2023-06-13T20:59:16.337991Z DEBUG ThreadId(02) pact_matching::metrics: Sending event to GA - {"tid": "UA-117778936-1", "cid": "21f374b6ee8766d5fa78d27c9b22ecfb", "av": "13.13.5", "an": "pact-core", "aip": "true", "t": "event", "cd6": "pact_ffi", "cd7": "1.0.4", "aid": "pact-core", "v": "1", "ds": "client", "cd2": "unknown", "ec": "ProviderTest", "cd3": "macos-x86_64", "el": "Pacts verified", "ea": "Completed", "ev": "0"}
2023-06-13T20:59:16.714840Z DEBUG tokio-runtime-worker hyper::client::connect::dns: resolving host="<http://www.google-analytics.com|www.google-analytics.com>"
2023-06-13T20:59:16.806869Z DEBUG ThreadId(02) hyper::client::connect::http: connecting to 216.239.36.178:443
2023-06-13T20:59:16.874056Z DEBUG ThreadId(02) hyper::client::connect::http: connected to 216.239.36.178:443
2023-06-13T20:59:16.957343Z DEBUG ThreadId(02) h2::client: binding client connection
2023-06-13T20:59:16.957394Z DEBUG ThreadId(02) h2::client: client connection bound
2023-06-13T20:59:16.957428Z DEBUG ThreadId(02) h2::codec::framed_write: send frame=Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384 }
2023-06-13T20:59:16.957677Z DEBUG ThreadId(02) hyper::client::pool: pooling idle connection for ("https", <http://www.google-analytics.com|www.google-analytics.com>)
2023-06-13T20:59:16.957687Z DEBUG tokio-runtime-worker Connection{peer=Client}: h2::codec::framed_write: send frame=WindowUpdate { stream_id: StreamId(0), size_increment: 5177345 }
2023-06-13T20:59:16.958342Z DEBUG tokio-runtime-worker Connection{peer=Client}: h2::codec::framed_write: send frame=Headers { stream_id: StreamId(1), flags: (0x4: END_HEADERS) }
2023-06-13T20:59:16.958401Z DEBUG tokio-runtime-worker Connection{peer=Client}: h2::codec::framed_write: send frame=Data { stream_id: StreamId(1), flags: (0x1: END_STREAM) }
2023-06-13T20:59:17.034767Z DEBUG tokio-runtime-worker Connection{peer=Client}: h2::codec::framed_read: received frame=Settings { flags: (0x0), max_concurrent_streams: 100, initial_window_size: 1048576, max_header_list_size: 65536 }
2023-06-13T20:59:17.034815Z DEBUG tokio-runtime-worker Connection{peer=Client}: h2::codec::framed_write: send frame=Settings { flags: (0x1: ACK) }
2023-06-13T20:59:17.034832Z DEBUG tokio-runtime-worker Connection{peer=Client}: h2::codec::framed_read: received frame=WindowUpdate { stream_id: StreamId(0), size_increment: 983041 }
2023-06-13T20:59:17.095060Z DEBUG tokio-runtime-worker Connection{peer=Client}: h2::codec::framed_read: received frame=Settings { flags: (0x1: ACK) }
2023-06-13T20:59:17.095096Z DEBUG tokio-runtime-worker Connection{peer=Client}: h2::proto::settings: received settings ACK; applying Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384 }
2023-06-13T20:59:17.118661Z DEBUG tokio-runtime-worker Connection{peer=Client}: h2::codec::framed_read: received frame=Headers { stream_id: StreamId(1), flags: (0x4: END_HEADERS) }
2023-06-13T20:59:17.118723Z DEBUG tokio-runtime-worker Connection{peer=Client}: h2::codec::framed_read: received frame=Data { stream_id: StreamId(1) }
2023-06-13T20:59:17.118746Z DEBUG tokio-runtime-worker Connection{peer=Client}: h2::codec::framed_read: received frame=Data { stream_id: StreamId(1), flags: (0x1: END_STREAM) }
2023-06-13T20:59:17.118759Z DEBUG tokio-runtime-worker Connection{peer=Client}: h2::codec::framed_read: received frame=Ping { ack: false, payload: [0, 0, 0, 0, 0, 0, 0, 0] }
2023-06-13T20:59:17.118768Z DEBUG tokio-runtime-worker Connection{peer=Client}: h2::codec::framed_write: send frame=Ping { ack: true, payload: [0, 0, 0, 0, 0, 0, 0, 0] }
Failures:
1) Failed to load pact - Could not load pacts from the pact broker '<http://localhost:9292>'
There were 1 pact failures
2023-06-13T20:59:17.119083Z DEBUG ThreadId(02) pact_plugin_driver::plugin_manager: Shutting down all plugins
2023-06-13T20:59:17.119132Z DEBUG tokio-runtime-worker Connection{peer=Client}: h2::codec::framed_write: send frame=GoAway { error_code: NO_ERROR, last_stream_id: StreamId(0) }
2023-06-13T20:59:17.119161Z DEBUG tokio-runtime-worker Connection{peer=Client}: h2::proto::connection: Connection::poll; connection error error=GoAway(b"", NO_ERROR, Library)
2023-06-13T20:59:17.120102Z DEBUG ThreadId(01) pact_ffi::verifier: pact_ffi::verifier::pactffi_verifier_shutdown FFI function invoked
1) validates the expectations of Matching Service
0 passing (1s)
1 failing
1) Pact Verification
validates the expectations of Matching Service:
Error: Verfication failedMoises Siles
06/13/2023, 9:58 PMTimothy Jones
06/13/2023, 10:02 PMTimothy Jones
06/13/2023, 10:02 PMMoises Siles
06/13/2023, 10:04 PMMoises Siles
06/13/2023, 10:04 PMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
<http://localhost:9292/pacts/provider/e2e%20Provider%20Example/for-verification> using POST: {"providerVersionTags":["master"],"includePendingStatus":true,"consumerVersionSelectors":[{"matchingBranch":true}],"providerVersionBranch":"master"}
That says “find pacts in the broker that have a matching branch (master)”Matt (pactflow.io / pact-js / pact-go)
master branch?Moises Siles
06/14/2023, 3:05 AMMoises Siles
06/14/2023, 3:11 AMTimothy Jones
06/14/2023, 3:58 AMMoises Siles
06/14/2023, 4:04 AMprocess.env.GIT_BRANCH || 'master',Timothy Jones
06/14/2023, 4:08 AMTimothy Jones
06/14/2023, 4:09 AMMoises Siles
06/14/2023, 4:10 AMTimothy Jones
06/14/2023, 4:10 AMGIT_BRANCH is not set by your CI, so you're getting the default of 'master'Timothy Jones
06/14/2023, 4:10 AMMoises Siles
06/14/2023, 4:12 AMTimothy Jones
06/14/2023, 4:12 AMMoises Siles
06/14/2023, 2:25 PMimport { exec } from 'child_process';
const getBranch = () => new Promise((resolve, reject) => {
return exec('git rev-parse --abbrev-ref HEAD', (err, stdout, stderr) => {
if (err)
reject(`getBranch Error: ${err}`);
else if (typeof stdout === 'string')
resolve(stdout.trim());
});
});
export { getBranch }
// --- --- Another File / Module --- ---
import { getBranch } from './moduleLocation.mjs'
const someAsyncFunction = async () => {
console.log(await getBranch());
}
someAsyncFunction();Timothy Jones
06/14/2023, 2:28 PMMoises Siles
06/14/2023, 2:30 PMMoises Siles
06/14/2023, 2:31 PMTimothy Jones
06/14/2023, 2:35 PMTimothy Jones
06/14/2023, 2:36 PMMoises Siles
06/14/2023, 2:36 PMMoises Siles
06/14/2023, 3:29 PMpactUrls: [...]
that solves my issueMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Slackbot
06/15/2023, 9:54 PMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Moises Siles
06/15/2023, 10:01 PMMoises Siles
06/15/2023, 10:02 PMMoises Siles
06/16/2023, 3:28 AM