Hi friends! I'm experiencing a weird issue that I ...
# pact-plugins
b
Hi friends! I'm experiencing a weird issue that I was hoping someone could help provide some insight into. I'm able to run my pact provider test just fine with
consumerVersionSelectors: [{ branch: 'main' }]
, but when I use
consumerVersionSelectors: [{ branch: 'feature-branch' }]
I get an error about not being able to find the protobuf plugin thinking2
blobwave 1
with branch main (everything works fine):
Copy code
console.log
using Verifier options {
    logLevel: 'trace',
    provider: 'email-templating',
    pactBrokerUrl: '<url>',
    consumerVersionSelectors: [ { branch: 'main' } ]
}
and the relevant plugin output:
Copy code
... does stuff...

2024-02-28T15:15:53.950960Z  INFO ThreadId(02) verify_provider_async: pact_verifier: Pact file requires plugins, will load those now
2024-02-28T15:15:53.950991Z DEBUG ThreadId(02) verify_provider_async: pact_plugin_driver::plugin_manager: Loading plugin PluginDependency { name: "protobuf", version: Some("0.3.8"), dependency_type: Plugin }
2024-02-28T15:15:53.951037Z TRACE ThreadId(02) verify_provider_async: pact_plugin_driver::plugin_manager: Rust plugin driver version 0.5.1
2024-02-28T15:15:53.951046Z TRACE ThreadId(02) verify_provider_async: pact_plugin_driver::plugin_manager: load_plugin ThreadId(2): Waiting on PLUGIN_REGISTER lock
2024-02-28T15:15:53.951090Z TRACE ThreadId(02) verify_provider_async: pact_plugin_driver::plugin_manager: load_plugin ThreadId(2): Got PLUGIN_REGISTER lock
2024-02-28T15:15:53.951214Z DEBUG ThreadId(02) verify_provider_async: pact_plugin_driver::plugin_manager: Did not find plugin, will attempt to start it
2024-02-28T15:15:53.951232Z DEBUG ThreadId(02) verify_provider_async: pact_plugin_driver::plugin_manager: Loading plugin manifest for plugin PluginDependency { name: "protobuf", version: Some("0.3.8"), dependency_type: Plugin }
2024-02-28T15:15:53.951333Z DEBUG ThreadId(02) verify_provider_async: pact_plugin_driver::plugin_manager: Looking for plugin in "/Users/becca.liss/.pact/plugins"

... fetches a bunch of pacts from the broker ...

2024-02-28T15:15:53.952307Z TRACE ThreadId(02) verify_provider_async: pact_plugin_driver::plugin_manager: Found: "/Users/becca.liss/.pact/plugins/repository.index.sha256"
2024-02-28T15:15:53.952340Z TRACE ThreadId(02) verify_provider_async: pact_plugin_driver::plugin_manager: Found: "/Users/becca.liss/.pact/plugins/repository.index"
2024-02-28T15:15:53.952363Z TRACE ThreadId(02) verify_provider_async: pact_plugin_driver::plugin_manager: Found: "/Users/becca.liss/.pact/plugins/protobuf-0.3.8"
2024-02-28T15:15:53.952389Z DEBUG ThreadId(02) verify_provider_async: pact_plugin_driver::plugin_manager: Found plugin manifest: "/Users/becca.liss/.pact/plugins/protobuf-0.3.8/pact-plugin.json"
2024-02-28T15:15:53.952612Z TRACE ThreadId(02) verify_provider_async: pact_plugin_driver::plugin_manager: Parsed plugin manifest: PactPluginManifest { plugin_dir: "", plugin_interface_version: 1, name: "protobuf", version: "0.3.8", executable_type: "exec", minimum_required_version: None, entry_point: "pact-protobuf-plugin", entry_points: {}, args: None, dependencies: None, plugin_config: {"hostToBindTo": String("127.0.0.1"), "downloadUrl": String("<https://github.com/protocolbuffers/protobuf/releases/download>"), "protocVersion": String("3.19.1")} }
2024-02-28T15:15:53.952683Z DEBUG ThreadId(02) verify_provider_async: pact_plugin_driver::metrics: 'PACT_DO_NOT_TRACK' environment variable is set, will not send metrics
2024-02-28T15:15:53.952690Z DEBUG ThreadId(02) verify_provider_async: pact_plugin_driver::plugin_manager: Starting plugin with manifest PactPluginManifest { plugin_dir: "/Users/becca.liss/.pact/plugins/protobuf-0.3.8", plugin_interface_version: 1, name: "protobuf", version: "0.3.8", executable_type: "exec", minimum_required_version: None, entry_point: "pact-protobuf-plugin", entry_points: {}, args: None, dependencies: None, plugin_config: {"hostToBindTo": String("127.0.0.1"), "downloadUrl": String("<https://github.com/protocolbuffers/protobuf/releases/download>"), "protocVersion": String("3.19.1")} }
2024-02-28T15:15:53.982551Z DEBUG ThreadId(02) verify_provider_async: pact_plugin_driver::plugin_manager: Detected OS: Mac OS 14.2.1 [64-bit]
2024-02-28T15:15:53.982577Z DEBUG ThreadId(02) verify_provider_async: pact_plugin_driver::plugin_manager: Starting plugin using "/Users/becca.liss/.pact/plugins/protobuf-0.3.8/pact-protobuf-plugin"
2024-02-28T15:15:53.983659Z DEBUG ThreadId(02) verify_provider_async: pact_plugin_driver::plugin_manager: Plugin protobuf started with PID 57329
with branch feature-branch (plugin errors):
Copy code
console.log
using Verifier options {
    logLevel: 'trace',
    provider: 'email-templating',
    pactBrokerUrl: '<url>',
    consumerVersionSelectors: [ { branch: 'feature-branch' } ]
}
and then relevant plugin output:
Copy code
... does stuff...

2024-02-28T15:16:57.774008Z  INFO ThreadId(02) verify_provider_async: pact_verifier: Pact file requires plugins, will load those now
2024-02-28T15:16:57.774039Z DEBUG ThreadId(02) verify_provider_async: pact_plugin_driver::plugin_manager: Loading plugin PluginDependency { name: "protobuf", version: Some("0.3.13"), dependency_type: Plugin }
2024-02-28T15:16:57.774085Z TRACE ThreadId(02) verify_provider_async: pact_plugin_driver::plugin_manager: Rust plugin driver version 0.5.1
2024-02-28T15:16:57.774096Z TRACE ThreadId(02) verify_provider_async: pact_plugin_driver::plugin_manager: load_plugin ThreadId(2): Waiting on PLUGIN_REGISTER lock
2024-02-28T15:16:57.774143Z TRACE ThreadId(02) verify_provider_async: pact_plugin_driver::plugin_manager: load_plugin ThreadId(2): Got PLUGIN_REGISTER lock
2024-02-28T15:16:57.774294Z DEBUG ThreadId(02) verify_provider_async: pact_plugin_driver::plugin_manager: Did not find plugin, will attempt to start it
2024-02-28T15:16:57.774308Z DEBUG ThreadId(02) verify_provider_async: pact_plugin_driver::plugin_manager: Loading plugin manifest for plugin PluginDependency { name: "protobuf", version: Some("0.3.13"), dependency_type: Plugin }
2024-02-28T15:16:57.774394Z DEBUG ThreadId(02) verify_provider_async: pact_plugin_driver::plugin_manager: Looking for plugin in "/Users/becca.liss/.pact/plugins"
2024-02-28T15:16:57.774851Z TRACE ThreadId(02) verify_provider_async: pact_plugin_driver::plugin_manager: Found: "/Users/becca.liss/.pact/plugins/repository.index.sha256"
2024-02-28T15:16:57.774924Z TRACE ThreadId(02) verify_provider_async: pact_plugin_driver::plugin_manager: Found: "/Users/becca.liss/.pact/plugins/repository.index"
2024-02-28T15:16:57.774977Z TRACE ThreadId(02) verify_provider_async: pact_plugin_driver::plugin_manager: Found: "/Users/becca.liss/.pact/plugins/protobuf-0.3.8"
2024-02-28T15:16:57.775168Z DEBUG ThreadId(02) verify_provider_async: pact_plugin_driver::plugin_manager: Found plugin manifest: "/Users/becca.liss/.pact/plugins/protobuf-0.3.8/pact-plugin.json"
2024-02-28T15:16:57.775593Z TRACE ThreadId(02) verify_provider_async: pact_plugin_driver::plugin_manager: Parsed plugin manifest: PactPluginManifest { plugin_dir: "", plugin_interface_version: 1, name: "protobuf", version: "0.3.8", executable_type: "exec", minimum_required_version: None, entry_point: "pact-protobuf-plugin", entry_points: {}, args: None, dependencies: None, plugin_config: {"hostToBindTo": String("127.0.0.1"), "downloadUrl": String("<https://github.com/protocolbuffers/protobuf/releases/download>"), "protocVersion": String("3.19.1")} }
2024-02-28T15:16:57.775722Z  WARN ThreadId(02) verify_provider_async: pact_plugin_driver::plugin_manager: Could not load plugin manifest from disk, will try auto install it: Plugin protobuf:0.3.13 was not found (in $HOME/.pact/plugins or $PACT_PLUGIN_DIR)
2024-02-28T15:16:57.775907Z  INFO ThreadId(02) verify_provider_async: pact_plugin_driver::repository: Fetching index from github
2024-02-28T15:16:57.775972Z TRACE ThreadId(02) verify_provider_async: hyper::client::pool: checkout waiting for idle connection: ("https", <http://raw.githubusercontent.com|raw.githubusercontent.com>)
2024-02-28T15:16:57.776004Z TRACE ThreadId(02) verify_provider_async: hyper::client::connect::http: Http::connect; scheme=Some("https"), host=Some("<http://raw.githubusercontent.com|raw.githubusercontent.com>"), port=None
2024-02-28T15:16:57.776045Z DEBUG tokio-runtime-worker hyper::client::connect::dns: resolving host="<http://raw.githubusercontent.com|raw.githubusercontent.com>"
2024-02-28T15:16:57.810817Z DEBUG ThreadId(02) verify_provider_async: hyper::client::connect::http: connecting to 185.199.108.133:443
2024-02-28T15:16:57.829625Z DEBUG ThreadId(02) verify_provider_async: hyper::client::connect::http: connected to 185.199.108.133:443
2024-02-28T15:16:57.849777Z TRACE ThreadId(02) verify_provider_async: hyper::client::pool: checkout dropped for ("https", <http://raw.githubusercontent.com|raw.githubusercontent.com>)
2024-02-28T15:16:57.849852Z  WARN ThreadId(02) verify_provider_async: pact_plugin_driver::repository: Was not able to load index from GitHub - error sending request for url (<https://raw.githubusercontent.com/pact-foundation/pact-plugins/main/repository/repository.index>): error trying to connect: invalid peer certificate: UnknownIssuer
2024-02-28T15:16:57.851138Z DEBUG ThreadId(02) verify_provider_async: pact_plugin_driver::repository: Loading index file path="/Users/becca.liss/.pact/plugins/repository.index"
2024-02-28T15:16:57.852992Z DEBUG ThreadId(02) verify_provider_async: pact_plugin_driver::repository: Installing plugin protobuf/0.3.13 from index
2024-02-28T15:16:57.853132Z ERROR ThreadId(02) pact_ffi::verifier::handle: Verification execution failed: Plugin protobuf:0.3.13 was not found (in $HOME/.pact/plugins or $PACT_PLUGIN_DIR)
2024-02-28T15:16:57.853150Z TRACE ThreadId(02) pact_ffi::verifier: pactffi_verifier_execute FFI function completed output=2
i was looking through the
plugin_manager
code to see if anything jumped out at me, but i'm still pretty stumped as to how changing the branch selector could affect loading the plugin
y
was the pact created on the feature branch created ny a diff version of the plugin? its held in the plugin section of the pact file
looks like there is an error re the peer cert when downloading
b
hmm i think you're onto something - i didn't notice that the plugin versions were different. the feature-branch pact was published in CI, which has a different install flow than local development
and that would explain why it was trying to download a different version of the plugin
good catch! lemme try and get the plugin versions consistent and see if that fixes things
and thanks for such a quick response 😀
y
pleasure. you can also try and download that version of the plugin manually on your machine with the plugin cli
also love the hand drawn avatar chefkiss
🥰 1
b
it's a wonderful thing to have artistic friends 😂
1000 1
woo yup, downloading
0.3.13
causes the pact verification to run successfully. thanks yousaf!! you're a lifesaver 🤩
y
woohoo glad you are sorted! and totally agree about the arty friends. i owe gratitude to my designer friend Jim for my little pixel art guy
b
i mean, fashion keeps claiming the 90s are back, so why not pixel art??
😆 1
m
Pixel art Baggy pants
😂 1
1000000 1