Jeroen van Dijk
04/04/2022, 1:24 PMJeroen van Dijk
04/04/2022, 1:25 PMread 5745 bytes
Conn keep-alive
INFO: Fetching pacts for pactflow-example-provider from <https://dojojeroen.pactflow.io> with the selection criteria: latest for tag master, currently deployed
opening connection to <http://dojojeroen.pactflow.io:443|dojojeroen.pactflow.io:443>...
opened
starting SSL for <http://dojojeroen.pactflow.io:443|dojojeroen.pactflow.io:443>...
SSL established
<- "POST /pacts/provider/pactflow-example-provider/for-verification HTTP/1.1\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nAccept: application/hal+json\r\nUser-Agent: Ruby\r\nContent-Type: application/json\r\nAuthorization: [redacted]\r\n"
<- "{\"includePendingStatus\":false,\"consumerVersionSelectors\":[{\"tag\":\"master\",\"latest\":true},{\"deployed\":true}],\"providerVersionTags\":[\"master\"]}"
-> "HTTP/1.1 404 Not Found\r\n"
-> "Date: Mon, 04 Apr 2022 13:10:55 GMT\r\n"
-> "Content-Type: application/hal+json;charset=utf-8\r\n"
-> "Transfer-Encoding: chunked\r\n"
-> "Connection: keep-alive\r\n"
-> "Vary: Accept\r\n"
-> "X-Pact-Broker-Version: 2.96.0\r\n"
-> "X-Pact-Broker-Git-Sha: aecd69c6\r\n"
-> "X-Pactflow-Git-Sha: 07abda37c\r\n"
-> "X-Content-Type-Options: nosniff\r\n"
/home/runner/work/example-provider/example-provider/node_modules/@pact-foundation/pact-node/standalone/linux-x64-1.88.83/pact/lib/vendor/ruby/2.2.0/gems/pact-1.62.0/lib/pact/hal/entity.rb:102:in `assert_success!': Error retrieving <https://dojojeroen.pactflow.io/pacts/provider/pactflow-example-provider/for-verification> status=404 (Pact::Hal::ErrorResponseReturned)Jeroen van Dijk
04/04/2022, 1:37 PMPavlo Sprogis
04/04/2022, 3:16 PMPavlo Sprogis
04/04/2022, 3:21 PMconst fetchPactsDynamicallyOpts = {
provider: "pactflow-example-provider",
//consumerVersionTag: ['master', 'prod'], //the old way of specifying which pacts to verify
consumerVersionSelectors: [{ tag: 'master', latest: true }, { deployed: true } ], // the new way of specifying which pacts to verify
pactBrokerUrl: process.env.PACT_BROKER_BASE_URL,
enablePending: true,
includeWipPactsSince: "2020-01-01"
}Pavlo Sprogis
04/04/2022, 3:27 PMYousaf Nabi (pactflow.io)
When theis not set (ie. the build is running because the provider changed), the provider is configured to fetch all the pacts for the 'example-provider' provider which belong to the latest consumer versions tagged with$PACT_URLand those currently deployed to an environment. This ensures the provider is compatible with the latest changes that the consumer has made, and is also backwards compatible with the production/test versions of the consumermaster
When theTaken from the provider readme https://github.com/pactflow/example-provideris set (ie. the build is running because it was triggered by the 'contract content changed' webhook), we just verify the pact at the$PACT_URL$PACT_URL
Yousaf Nabi (pactflow.io)
Jeroen van Dijk
04/04/2022, 3:39 PMIs your consumer pipeline running in master, but failing on the can-i-deploy step?
Jeroen van Dijk
04/04/2022, 3:39 PMJeroen van Dijk
04/04/2022, 3:40 PMJeroen van Dijk
04/04/2022, 3:41 PMJeroen van Dijk
04/04/2022, 3:42 PMYousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
pactflow-example-provider commented out, so you wouldn't have been creating a contract for that, so there was contract to validate on the example-provider repo.
The failures you are seeing in can-i-deploy are correct, as there is no verified contracts between these three providers, note pactflow-example-consumer
Just testing now with this commit
https://github.com/YOU54F/example-consumer/commit/6b5b3989ab0973a8c405bd5acd1a25661222e4f4
Will find a way to support our multiple provider examples, in a way that doesn't cause issue for our ci/cd workshop.
Apologies!Yousaf Nabi (pactflow.io)
Jeroen van Dijk
04/04/2022, 7:20 PM