Akash Kumar Singh
02/08/2025, 2:11 PMcan-i-deploy
Failing Despite Successful Verification
Context:
I am trying to deploy fastag-api
version bb7321f7d645718139ea990fd6f9298a1f6272ba
to the dev-tpi
environment. The contract tests between fastag-api
and customer-api
have been successfully verified.
What I Observed:
1. Explicit version check works fine:
2. When I run:
1. pact-broker can-i-deploy \
2. --pacticipant fastag-api --version bb7321f7d645718139ea990fd6f9298a1f6272ba \
3. --pacticipant customer-api --version 35cfe47bdfaf1030a5e772324a042a439f018928 \
4. --broker-base-url
5. https://pact-broker.devtools-opt.****.com
6. ✅ I get "Computer says yes \o/", confirming that this specific pair is verified.
7. Reverse check also works fine:
1. pact-broker can-i-deploy \
2. --pacticipant customer-api --version bb7321f7d645718139ea990fd6f9298a1f6272ba \
3. --pacticipant fastag-api --version 35cfe47bdfaf1030a5e772324a042a439f018928 \
4. --broker-base-url
5. https://pact-broker.devtools-opt.****.com
6. ✅ Again, "Computer says yes \o/", showing the verification is valid both ways.
7. But deployment to dev-tpi
fails:
1. pact-broker can-i-deploy \
2. --pacticipant fastag-api --version bb7321f7d645718139ea990fd6f9298a1f6272ba \
3. --to dev-tpi \
4. --broker-base-url
5. https://pact-broker.devtools-opt.**.com
6. ❌ "Computer says no ¯_(ツ)_/¯", with the message:
FYI: 35cfe47bdfaf1030a5e772324a042a439f018928 this version of customer-api is already deployed in dev-tpi environment and also it is tagged/mapped with this environment name
1. There is no verified pact between the latest version of customer-api with tag dev-tpi (35cfe47bdfaf1030a5e772324a042a439f018928) and version bb7321f7d645718139ea990fd6f9298a1f6272ba of fastag-api.
Q*uestion:*
• Since the verification between fastag-api
and customer-api
is already successful, why does can-i-deploy
fail when using --to dev-tpi
?
• Does the issue relate to tagging?
◦ The error suggests customer-api
is expected to have a dev-tpi
tag, but I can confirm that version 35cfe47bdfaf1030a5e772324a042a439f018928
is the one we verified against.
◦ Should I explicitly tag it as dev-tpi
using create-version-tag
?
• Is there a way to check how dev-tpi
is being used in the Pact Broker for customer-api
?
Would appreciate any insights on what might be causing this discrepancy.
not able to attach the output screen-shot because of company policy :)Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Should I explicitly tag it asOnly if you can’t use the environments and branches capability. I’d recommend against the use of tags though, in generalusingdev-tpi
?create-version-tag
Matt (pactflow.io / pact-js / pact-go)
record-deployment --application customer-api --version 35cfe47bdfaf1030a5e772324a042a439f018928 --environment dev-tpi
2. then once it’s deployed
pact-broker can-i-deploy \
--pacticipant fastag-api --version bb7321f7d645718139ea990fd6f9298a1f6272ba \
--to-environment dev-tpi \
--broker-base-url
<https://pact-broker.devtools-opt>.****.com
Note the use of --to-environment
instead of --to
Akash Kumar Singh
02/09/2025, 10:18 AMpact-broker can-i-deploy --pacticipant fastag-api --version bb7321f7d645718139ea990fd6f9298a1f6272ba --to-environment dev-tpi --broker-base-url <https://pact-broker.devtools-opt.idfcfirstbank.com>
i am getting this output
Computer says no ¯\_(ツ)_/¯
CONSUMER | C.VERSION | PROVIDER | P.VERSION | SUCCESS? | RESULT#
----------------|--------------------------------|--------------|--------------------------------|----------|--------
fastag-api | bb7321f7d645718139ea990fd6f... | customer-api | bb7321f7d645718139ea990fd6f... | true | 1
basically success result is true but computer says no and
There is no verified pact between the latest version of customer-api (bb7321f7d645718139ea990fd6f9298a1f6272ba) and version bb7321f7d645718139ea990fd6f9298a1f6272ba of fastag-api
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Akash Kumar Singh
02/09/2025, 1:23 PMAkash Kumar Singh
02/09/2025, 1:24 PM{
"providerName": "customer-api",
"providerApplicationVersion": "bb7321f7d645718139ea990fd6f9298a1f6272ba",
"success": true,
"verificationDate": "2025-02-08T13:44:50+00:00",
"testResults": [
{
"interactionId": "3d72a99e7f41b1f469d64551ef3ffe917b7570dc",
"success": true
},
{
"interactionId": "9df022da269e7dc51961bb98c6f7a4189850ea63",
"success": true
}
],
"verifiedBy": {
"implementation": "Pact-JVM",
"version": "4.6.10"
},
"_links": {
"self": {
"title": "Verification result",
"name": "Verification result 252315 for Pact between fastag-api (bb7321f7d645718139ea990fd6f9298a1f6272ba) and customer-api",
"href": "<https://pact-broker.devtools-opt>.**.com/pacts/provider/customer-api/consumer/fastag-api/pact-version/b9c560e51cebf1c60d4b452f9097be9f08abbecf/verification-results/252315"
},
"pb:pact-version": {
"title": "Pact",
"name": "Pact between fastag-api (bb7321f7d645718139ea990fd6f9298a1f6272ba) and customer-api",
"href": "<https://pact-broker.devtools-opt>.**.com/pacts/provider/customer-api/consumer/fastag-api/pact-version/b9c560e51cebf1c60d4b452f9097be9f08abbecf/metadata/Y3ZuPWJiNzMyMWY3ZDY0NTcxODEzOWVhOTkwZmQ2ZjkyOThhMWY2MjcyYmE"
},
"pb:triggered-webhooks": {
"title": "Webhooks triggered by the publication of this verification result",
"href": "<https://pact-broker.devtools-opt>.**.com/pacts/provider/customer-api/consumer/fastag-api/pact-version/b9c560e51cebf1c60d4b452f9097be9f08abbecf/verification-results/252315/triggered-webhooks"
}
}
}
Akash Kumar Singh
02/09/2025, 1:24 PMAkash Kumar Singh
02/09/2025, 1:32 PMAkash Kumar Singh
02/09/2025, 1:33 PMMatt (pactflow.io / pact-js / pact-go)
Akash Kumar Singh
02/10/2025, 3:32 AMMatt (pactflow.io / pact-js / pact-go)