Adam Rodger (pact-net)
02/04/2022, 11:37 AMnative-tls
feature of reqwest instead of the rustls
version
I'm gonna try out the provider tests now and see what happensAdam Rodger (pact-net)
02/04/2022, 1:07 PMAdam Rodger (pact-net)
02/08/2022, 7:29 PM4.0.0-beta.1
and I can't think of much. I'm not sure if any of them are particularly blockers, but still to do off the top of my head:
• GitHub Action for publishing to NuGet when you create a tag (easy, 10mins work)
• A new FFI version with reqwest
updated to fix the panic related to invalid certificates
◦ I'm not sure this is a blocker for a beta, but it totally breaks on my machine and I imagine others will have the same problem. I think it's a blocker for a proper release though because it literally just crashes and there's no real way to work around it.
• I'm not quite sure where messaging pacts are up to, but if they do work then we definitely don't have any documentation for them. I'm not entirely sure they're finished at the moment though
◦ Again, I don't think this is a blocker as there would be no breaking API changes for request/response interactions
So I think what I'm saying is the only thing needed for a beta is writing the GitHub Action.... 😮 I'll do that nowAdam Rodger (pact-net)
02/09/2022, 1:55 PMAdam Rodger (pact-net)
02/09/2022, 8:42 PMCyrus Devnomad
02/10/2022, 6:11 PMKris Akins
02/13/2022, 3:11 AM• Introducing message support into the frameworkDoes "message" support here refer to messaging, e.g. queues, etc? And does "framework" refer to just the .NET implementation or pact as a whole?
David Hvilava
02/15/2022, 3:08 PMFábio Rodrigues
02/15/2022, 3:09 PMFábio Rodrigues
02/16/2022, 1:17 PM<http://s3:9000/tenantdata/tenants/00000000-0000-0000-0000-000000000001/applications/dda8be6e-e132-4892-a441-63b3a30bfaff/s>
but recent architectural changes have made us to change the url format to a new one
<http://s3:9000/plat-t00000000000000000000000000000001/applications/dda8be6e-e132-4892-a441-63b3a30bfaff/sourcecode-d281f084-1666-3fa4-06ce-1a1214d3692c?X-Amz-Expires=600&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=accessKey1/20220216/us-east-1/s3/aws4_request&X-Amz-Date=20220216T123217Z&X-Amz-SignedHeaders=host&X-Amz-Signature=fb7b255661baa9ebeb991a8a2f16a7f8e93f9a978eeca129a534c89255bca838>
Now the consumer side already changed the matcher in code and published the new contract in CI to pact-broker but is still giving up the old matcher and thus our provider test fails. We are already asking for the latest version by the way.
Does the mechanism that pact-broker uses to check if it's a new version of the contract take in account the matchers or it just takes in account changes in keysDavid Hvilava
02/17/2022, 9:39 AMFábio Rodrigues
02/18/2022, 10:52 AM"response": {
"status": 200,
"headers": {
"Content-Type": "application/json; charset=utf-8"
},
"body": {
"revisionBaseline": 1,
"baseProperties": [
{
"dataType": "",
"defaultValue": "",
"value": "",
"valueOrigin": "",
"key": ""
}
]
},
"matchingRules": {
"$.body.baseProperties[0].dataType": {
"match": "regex",
"regex": ".*"
},
"$.body.baseProperties[0].defaultValue": {
"match": "regex",
"regex": ".*"
},
"$.body.baseProperties[0].value": {
"match": "regex",
"regex": ".*"
},
"$.body.baseProperties[0].valueOrigin": {
"match": "regex",
"regex": ".*"
},
"$.body.baseProperties[0].key": {
"match": "regex",
"regex": ".*"
}
}
}
}
],
The problem is that it's just not 1 element but a array of them (at least 10+ of them)
How can we setup an expectation on consumer side that would check this (that it receives an array of objects like this). Is it possible, and if it is, how can we set it up?Michael Fagan
02/19/2022, 5:03 AMRishi
02/19/2022, 2:50 PMAdam Rodger (pact-net)
02/21/2022, 11:39 AMAdam Rodger (pact-net)
02/21/2022, 2:38 PMCyrus Devnomad
03/01/2022, 6:18 PMDmitry Matveev
03/04/2022, 12:35 AMAdam Rodger (pact-net)
03/04/2022, 7:37 AMMichael Fagan
03/10/2022, 10:52 PMCyrus Devnomad
03/16/2022, 11:47 AM.WithRequest(HttpMethod.Delete, "/api/products/13")
But if I change the path to include the parameter name as follows, the request fails:
.WithRequest(HttpMethod.Delete, "/api/products?id=13")
In this case the HttpClient.DelectAsnyc() method returns the following error:
{StatusCode: 500, ReasonPhrase: 'Internal Server Error', Version: 1.1, Content: System.Net.Http.HttpConnectionResponseContent, Headers:
{
Access-Control-Allow-Origin: *
x-pact: Unexpected-Request
Date: Wed, 16 Mar 2022 11:23:47 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 329
}}
Does Pact.NET mock provider not support named parameters in the request query?Matt (pactflow.io / pact-js / pact-go)
WithJsonBody
Maksymilian Chwałek
03/19/2022, 7:08 PMoptions.PublishResults(_providerVersion, publishOptions =>
{
publishOptions.BuildUri(new Uri("<http://example.com>"));
publishOptions.ProviderBranch(_providerBranch);
});
Unless build uri is set, verify throws NullReferenceException. Version is 4.0.0-beta.3
. Should I create an issue on github?Fábio Rodrigues
03/28/2022, 2:32 PM[INFO][pact_verifier] Running provider state change handler 'There exists 1 application revision 1' for 'A GET request to fetch application detail'
[DEBUG][pact_verifier::provider_client] Sending HTTP Request ( method: POST, path: /, query: None, headers: Some({"Content-Type": ["application/json"]}), body: Present(129 bytes, application/json) ) to state change handler
[DEBUG][reqwest::connect] starting new connection: <http://localhost:9001/>
[DEBUG][hyper::client::connect::http] connecting to [::1]:9001
[DEBUG][hyper::client::connect::http] connected to [::1]:9001
[DEBUG][pact_verifier::provider_client] State change request failed with error error sending request for url (<http://localhost:9001/provider-states>): operation timed out
[DEBUG][pact_verifier] State Change: "ProviderState { name: "There exists 1 application revision 1", params: {} }" -> Err(Provider state failed: (interaction_id: a64ddfb75ada4126584b9646620cc01271e1d3c3) Invalid response: error sending request for url (<http://localhost:9001/provider-states>): operation timed out)
[ERROR][pact_verifier] Provider state change for 'There exists 1 application revision 1' has failed - MismatchResult::Error("Invalid response: error sending request for url (<http://localhost:9001/provider-states>): operation timed out", Some("a64ddfb75ada4126584b9646620cc01271e1d3c3"))
[INFO][pact_verifier] Running provider state change handler 'There exists 1 application revision 1 with 2 producers' for 'A GET request to fetch the producers'
[DEBUG][pact_verifier::provider_client] Sending HTTP Request ( method: POST, path: /, query: None, headers: Some({"Content-Type": ["application/json"]}), body: Present(225 bytes, application/json) ) to state change handler
[DEBUG][reqwest::connect] starting new connection: <http://localhost:9001/>
[DEBUG][hyper::client::connect::http] connecting to [::1]:9001
[DEBUG][hyper::client::connect::http] connected to [::1]:9001
[DEBUG][reqwest::async_impl::client] response '200 OK' for <http://localhost:9001/provider-states>
It's just 1 interaction. Other that use the same provider state passes. Before the upgrade, it worked fine.Fábio Rodrigues
03/30/2022, 9:53 AMFábio Rodrigues
04/05/2022, 3:09 PM{
"baseProperties": [
{
"dataType": "Text",
"defaultValue": "",
"value": "",
"valueOrigin": "EnvironmentLevelOverride",
"isSecret": false,
"secretKey": null,
"key": "OutSystems:Application:Key"
},
{
"dataType": "Text",
"defaultValue": "",
"value": "My Test",
"valueOrigin": "EnvironmentLevelOverride",
"isSecret": false,
"secretKey": null,
"key": "OutSystems:Application:Name"
},
{
"dataType": "Text",
"defaultValue": "",
"value": "",
"valueOrigin": "EnvironmentLevelOverride",
"isSecret": false,
"secretKey": null,
"key": "OutSystems:Application:Description"
}
]
}
Brazao
04/05/2022, 5:48 PMMichael Fagan
04/06/2022, 4:41 PMFábio Rodrigues
04/13/2022, 1:59 PMTL Z
04/14/2022, 3:08 PM