Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin framework cannot parse semver versioned plugins #33

Open
mefellows opened this issue Jun 5, 2023 · 1 comment
Open

Plugin framework cannot parse semver versioned plugins #33

mefellows opened this issue Jun 5, 2023 · 1 comment
Labels
enhancement Indicates new feature requests

Comments

@mefellows
Copy link
Member

In putting a minor temporary fix in place for pact-foundation/pact-reference#278 in the Pact Go project (for the Matt plugin to temporarily just use the first interaction in the pact as the contents), I released a version with a pre-release and build metadata (specifically 0.0.8-fix+pact.reference.278, however even 0.0.8-fix is sufficient to reproduce it).

The behaviour I noticed:

Given the plugin is installed into ~/.pact/plugins/matt-0.0.8-fix+pact.reference.278 and the pact-plugins.json had the same version:

  1. The consumer test passed
  2. The provider test would fail with the following error:
2023-06-05T13:04:03.957598Z  INFO ThreadId(02) verify_provider_async: pact_verifier: Pact file requires plugins, will load those now
2023-06-05T13:04:03.957688Z DEBUG ThreadId(02) verify_provider_async: pact_plugin_driver::plugin_manager: Loading plugin PluginDependency { name: "matt", version: Some("0.0"), dependency_type: Plugin }
...
2023-06-05T13:15:12.770707Z ERROR ThreadId(01) pact_ffi::verifier::handle: Verification execution failed: Plugin matt:0.0 was not found (in $HOME/.pact/plugins or $PACT_PLUGIN_DIR)

Given the plugin is installed into ~/.pact/plugins/matt-0.0.8 and the pact-plugins.json had the same version:

  1. The consumer test passed
  2. The provider test passed

So it seems to be related to loading in the plugins for discovery and use with the verification.

Given semver is so prevalent, I think it's reasonable to adopt it as a versioning mechanism for plugins.

Related but different to: #21

@rholshausen
Copy link
Contributor

Using versions that like, you get exactly what you deserve.

@rholshausen rholshausen added the enhancement Indicates new feature requests label Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Indicates new feature requests
Projects
None yet
Development

No branches or pull requests

2 participants