Tim Vahlbrock
01/30/2025, 1:07 PMLachlan Newman
01/31/2025, 7:10 AMYousaf Nabi (pactflow.io)
Stanislav Vodetskyi
02/07/2025, 11:48 PMAkash 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 :)Siim Mardus
02/11/2025, 1:12 PMPaul Beigang
02/11/2025, 4:43 PMRohit Krishnan
02/12/2025, 3:46 AMAkash Kumar Singh
02/13/2025, 4:29 AMGobi zen
02/13/2025, 5:51 PMnpx openapi-generator-cli author template -g go -o templates-go
npx openapi-generator-cli generate \
-i /path/to/openapi-spec.yaml \
-g go \
-t /path/to/templates-go \
-o /path/to/generated-go-client
Gabriel Vasconcelos
02/14/2025, 10:23 AMvicky
02/19/2025, 1:34 PMFabian Noll
02/20/2025, 1:44 PMPaul Beigang
02/24/2025, 12:02 PMvicky
02/25/2025, 10:19 AMLewis Cowles
02/25/2025, 11:49 PMAkash Kumar Singh
02/26/2025, 12:21 PMDilip Punna
02/27/2025, 3:59 PMcan-i-deploy
to environment staging
from the provider, so far i have done the following
• Publish consumer contracts
• Added provider verification for the above consumer
• Added the webhook verification when consumer changed something
Here is the error from provider
pact-broker can-i-deploy \
--pacticipant=participant-video-service \
--version=33719d37665b7f096c6e88036cd5194faab6e4f8 \
--to-environment=staging \
--broker-base-url="<https://usertesting.pactflow.io>" \
--broker-token="<>" \
--output=json
{
"summary": {
"deployable": null,
"reason": "There is no verified pact between version 33719d37665b7f096c6e88036cd5194faab6e4f8 of participant-video-service and the version of analytics-video-data-service currently in staging (4474f9fd7db43b47b1d9bb390e32a4f29faf7b55)\nThere is no verified pact between version 33719d37665b7f096c6e88036cd5194faab6e4f8 of participant-video-service and a version of data-platform currently in staging (no version is currently recorded as deployed/released in this environment)\nThere is no verified pact between version 33719d37665b7f096c6e88036cd5194faab6e4f8 of participant-video-service and a version of participant-test-plan-service currently in staging (no version is currently recorded as deployed/released in this environment)\nThere is no verified pact between version 33719d37665b7f096c6e88036cd5194faab6e4f8 of participant-video-service and a version of participant-video-manager-MESSAGE currently in staging (no version is currently recorded as deployed/released in this environment)\nThere is no verified pact between version 33719d37665b7f096c6e88036cd5194faab6e4f8 of participant-video-service and a version of participant-video-manager-REST currently in staging (no version is currently recorded as deployed/released in this environment)",
"success": 1,
"failed": 0,
"unknown": 5
},
"notices": [
{
"type": "error",
"text": "There is no verified pact between version 33719d37665b7f096c6e88036cd5194faab6e4f8 of participant-video-service and the version of analytics-video-data-service currently in staging (4474f9fd7db43b47b1d9bb390e32a4f29faf7b55)"
},
Kevin de Boer
03/13/2025, 12:25 PMJustin Gilroy
03/14/2025, 9:03 PMFeisal Ahmad
03/20/2025, 5:06 PMrunTest
method is called which calls pactffi_create_mock_server_for_transport
I see the StartMockServer
method being called on the plugin with the JSON pact only containing the interactions defined up to that point.
Now the part I don’t understand is what the mock server is supposed to do here, is it supposed to listen for all of the defined requests? If so, how are you supposed to distinguish between interactions with the same request but with different provider states? Or is the idea that the mock server only responds to the last defined interaction?Feisal Ahmad
03/31/2025, 3:22 PMpactffi_matches_json_value
function, and are seeing some unexpected behavior for some more advanced rules where the check passes even though it shouldn’t… For example, with an arrayContains
matching rule, no error is returned even though an array with one element that doesn’t satisfy the matching rules is passed to it.
Here’s the line in the pactffi log for the check:
2025-03-31T15:16:12.632536Z DEBUG ThreadId(01) pact_matching::json: JSON -> JSON: Comparing '[{"baz":42,"foo":"bar"}]' to '["bla"]' using ArrayContains([(0, MatchingRuleCategory { name: BODY, rules: {DocPath { path_tokens: [Root, Field("baz")], expr: "$.baz" }: RuleList { rules: [Type], rule_logic: And, cascaded: false }} }, {})]) -> Ok(())
We’re using pactffi release 0.4.26 btw, am I missing something here?Gustavo Souza
04/03/2025, 7:30 PMError.
412: We only support one authentication type at this time. Please try the type you used to sign up with.
Otoniel Rodriguez Delgado
04/04/2025, 5:19 PMJun Yi
04/10/2025, 3:14 AMstaging
and production
, which may contain different code as features are tested in staging before being rolled out to production.
1. Would it make sense to maintain separate sets of Pact stages for each branch?
2. I've observed that when a webhook is triggered, the verification always runs against the main branch (staging), regardless of which branch initiated the process. This could potentially cause issues when the branches diverge.
Any suggestions on how we can improve this setup or handle branch-specific verification more effectively?
Thanks!
Slack ConversationAlan Wong
04/25/2025, 1:14 PM{
"data": [
{
"id": "123456789"
},
{
"id": "111111111",
"optional_stuff": {
"data_map": {
"blah_1": true,
"blah_2": 123456
}
}
}
]
}
So my question is how to write the pact contract such that "id"
is mandatory but "optional_stuff"
is optional? At the moment I have to only specify the "id"
part as it's unclear if pact supports optional data.Tú Phạm
04/26/2025, 3:54 AMJun Yi
04/28/2025, 3:33 AMverifier = Verifier().set_info(name=PROVIDER_NAME, url=PROVIDER_URL)
verifier.broker_source(url=URL(settings.pact_flow_url), token=settings.pact_broker_token)
verifier.set_state(url=PROVIDER_URL / "_pact" / "callback", teardown=True)
verifier.filter_consumers(consumer_name)
verifier.set_publish_options(version=str(version))
verifier.verify()
Thanks for your help!Alessandro
05/07/2025, 11:39 AMPavanraj Ramisetty
05/07/2025, 9:55 PM