Akke Luukkonen
06/14/2022, 2:01 PMpact_verifier_cli
(Rust) using --url
, should it also select additional contracts using the default consumer version selection rules? In the second picture the first contract was the one passed with --url
but I didn't expect the verifications to run with what I'm guessing is the rule latest: true
(or whatever is the default?) in addition to it.Akke Luukkonen
06/14/2022, 2:03 PMcan-i-deploy
started reporting failures for the contract in the first image, even though I was quite sure all of the interactions should succeed.Akke Luukkonen
06/14/2022, 2:04 PMAkke Luukkonen
06/14/2022, 2:13 PMdocker run -e PACT_BROKER_TOKEN pactfoundation/pact-ref-verifier:0.9.11
--provider-name An...-Backend
--provider-version 3746...
--hostname ...
--port 443
--transport https
--state-change-url ...
--enable-pending
--publish
--broker-url <https://xxx.pactflow.io>
--url <https://xxx.pactflow.io/pacts/provider/An...-Backend/consumer/An...-UI/version/ba5d>...
--request-timeout 60000
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Akke Luukkonen
06/15/2022, 6:11 AMThere should be notices, explaining why certain pacts were collected and verifiedAt least to my eyes if you run without specifying any
--consumer-version-selectors
manually, by default it doesn't report why it chose the ones it did. When giving --url
the one specified by it always gets run first, but by default I assume it selects the rest with latest: true
for all related consumers without any other mentions. If you do give the --consumer-version-selectors
argument, then indeed it reports nicely why it chose the specific ones. (I already changed in my pipeline to run it with --consumer-version-selectors "[ { \"mainBranch\": true }, { \"deployed\": true } ]"
to be safe).
I’d expect the verifications for each pact to be separately submittedYeah, I was expecting that there might be some weird condition where this might get violated based on what I saw.
We’ll ideally need a way to repro this to fix it, if it is of courseI attempted to do a quick repro with some pseudo-pacticipants but I was unable to get it to work at least so far. I'll try to continue later if I have time.
Matt (pactflow.io / pact-js / pact-go)
Akke Luukkonen
06/15/2022, 6:15 AMMatt (pactflow.io / pact-js / pact-go)
rholshausen
06/16/2022, 4:27 AM--url
option if you are using the --broker-url
one. You should select all the pacts via the consumer version selectors.