Skip to content

Plugin framework cannot parse semver versioned plugins #33

Description

@mefellows

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementIndicates new feature requests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions