Stanislav Vodetskyi
02/07/2024, 11:39 PM"response": [
{
"contents": {
"content": ""
},
"metadata": {
"contentType": "application/protobuf;message=Feature",
"grpc-message": "no feature was found at latitude:-1 longitude:-1",
"grpc-status": "NOT_FOUND"
}
}
],
rholshausen
02/07/2024, 11:47 PMrholshausen
02/07/2024, 11:48 PMrholshausen
02/07/2024, 11:52 PMStanislav Vodetskyi
02/07/2024, 11:52 PMrholshausen
02/07/2024, 11:53 PMStanislav Vodetskyi
02/07/2024, 11:55 PMrholshausen
02/08/2024, 12:01 AM{
"consumer": {
"name": "grpc-consumer-jvm"
},
"interactions": [
{
"comments": {
"testname": "io.pact.example.grpc.consumer.PactConsumerTest.testMetadata(MockServer)"
},
"description": "validate token request",
"interactionMarkup": {
"markup": "```protobuf\nmessage ValidateTokenRequest {\n}\n```\n\n```protobuf\nmessage ValidateTokenResult {\n bool ok = 1;\n}\n```\n",
"markupType": "COMMON_MARK"
},
"key": "124feec5",
"pending": false,
"pluginConfiguration": {
"protobuf": {
"descriptorKey": "21e4eba65e4d1100ce2fb63b5e6b2c3e",
"service": "Test/ValidateToken"
}
},
"request": {
"contents": {
"content": ""
},
"matchingRules": {
"metadata": {
"Auth": {
"combine": "AND",
"matchers": [
{
"match": "regex",
"regex": "[A-Z]{3}\\d+"
}
]
}
}
},
"metadata": {
"Auth": "AST00004",
"contentType": "application/protobuf;message=ValidateTokenRequest"
}
},
"response": [
{
"contents": {
"content": "CAE=",
"contentType": "application/protobuf; message=ValidateTokenResult",
"contentTypeHint": "BINARY",
"encoded": "base64"
},
"matchingRules": {
"body": {
"$.ok": {
"combine": "AND",
"matchers": [
{
"match": "boolean"
}
]
}
},
"metadata": {
"code": {
"combine": "AND",
"matchers": [
{
"match": "integer"
}
]
}
}
},
"metadata": {
"code": "100",
"contentType": "application/protobuf;message=ValidateTokenResult"
}
}
],
"transport": "grpc",
"type": "Synchronous/Messages"
}
],
"metadata": {
"pact-jvm": {
"version": "4.4.6"
},
"pactSpecification": {
"version": "4.0"
},
"plugins": [
{
"configuration": {
"21e4eba65e4d1100ce2fb63b5e6b2c3e": {
"protoDescriptors": "Ct8BCg5tZXRhZGF0YS5wcm90bxIMbWV0YWRhdGF0ZXN0IhYKFFZhbGlkYXRlVG9rZW5SZXF1ZXN0IiUKE1ZhbGlkYXRlVG9rZW5SZXN1bHQSDgoCb2sYASABKAhSAm9rMmAKBFRlc3QSWAoNVmFsaWRhdGVUb2tlbhIiLm1ldGFkYXRhdGVzdC5WYWxpZGF0ZVRva2VuUmVxdWVzdBohLm1ldGFkYXRhdGVzdC5WYWxpZGF0ZVRva2VuUmVzdWx0IgBCFloUaW8ucGFjdC9tZXRhZGF0YXRlc3RiBnByb3RvMw==",
"protoFile": "syntax = \"proto3\";\n\npackage metadatatest;\noption go_package = \"io.pact/metadatatest\";\n\nmessage ValidateTokenRequest {\n}\n\nmessage ValidateTokenResult {\n bool ok = 1;\n}\n\nservice Test {\n // This call requires the Auth header to be correctly set\n rpc ValidateToken(ValidateTokenRequest) returns (ValidateTokenResult) {}\n}\n"
}
},
"name": "protobuf",
"version": "0.3.12"
}
]
},
"provider": {
"name": "validate-token-provider"
}
}
Stanislav Vodetskyi
02/08/2024, 12:33 AMStanislav Vodetskyi
02/09/2024, 12:52 AMStanislav Vodetskyi
02/09/2024, 1:14 AMStanislav Vodetskyi
02/09/2024, 1:50 AMrholshausen
02/09/2024, 1:53 AMdbg!
macro for debugging. If you use the JetBrains IDEs (CLion or Rust Rover), then the debugger in the IDE will work. I've tested Rust Rover, it works ok.rholshausen
02/09/2024, 3:42 AMmetadata_rules: {"key": MatchingRules { rule: [MatchingRule { r#type: "type", values: None }] }}, metadata_generators: {} })
metadata_rules: {"grpc-message": MatchingRules { rule: [MatchingRule { r#type: "type", values: None }] }}, metadata_generators: {} }]
rholshausen
02/09/2024, 3:57 AMStanislav Vodetskyi
02/09/2024, 4:07 AMLooks like it might be a pact_consumer issue. I can see the values passed back from the plugin in the logs:yep, can confirm the same, plugin seems to respond with the correct interaction response with go tests too. Go is just passing values to/from ffi lib and is doing very minimal processing on its own it seems
Stanislav Vodetskyi
02/09/2024, 4:09 AMrholshausen
02/09/2024, 4:11 AMrholshausen
02/09/2024, 4:11 AMrholshausen
02/09/2024, 4:26 AMrholshausen
02/09/2024, 4:26 AMStanislav Vodetskyi
02/09/2024, 4:36 AMrholshausen
02/09/2024, 4:37 AMrholshausen
02/09/2024, 4:37 AMStanislav Vodetskyi
02/09/2024, 4:56 AMrholshausen
02/09/2024, 4:59 AMStanislav Vodetskyi
02/09/2024, 8:21 AMStanislav Vodetskyi
02/09/2024, 8:22 AMStanislav Vodetskyi
02/09/2024, 8:26 AMYousaf Nabi (pactflow.io)
Stanislav Vodetskyi
02/09/2024, 7:20 PMI think it might be better squashing prior as I think you lose some attribution to the change if the merger squashes. I might not be quite correct but I taught to try and tell others providing contributions to squash first.ok, I'll squash them on my side ๐
BTW - How are you finding the plugin stuff in general? Are you still at a POC stage, or have you got it reasonably well embedded at the moment?we've started onboarding more projects, but it's still an early phase. It's been mostly a smooth journey so far, couple of bugs here and there but overall easy to onboard! ๐ I can share some findings and places we had to work around in a different thread after we finish onboarding more projects
Stanislav Vodetskyi
02/09/2024, 9:21 PMStanislav Vodetskyi
02/09/2024, 11:10 PM