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

Clarify message-related FFI #440

Open
3 tasks
JP-Ellis opened this issue Jun 13, 2024 · 2 comments
Open
3 tasks

Clarify message-related FFI #440

JP-Ellis opened this issue Jun 13, 2024 · 2 comments
Assignees

Comments

@JP-Ellis
Copy link
Contributor

Summary

We need to clarify how the Foreign Function Interface (FFI) should be used in relation to message interactions. Currently, there is confusion regarding the purpose and distinction between the following elements:

  • PactHandle vs MessagePactHandle
  • InteractionHandle vs MessageHandle

Motivation

Recent contributions to Pact Python have added support for message pacts using the FFI library, which has been greatly appreciated. However, this has also highlighted some ambiguities in how best to use the FFI for message interactions. Clarifying these distinctions will improve usability and reduce confusion for developers.

Proposed Solution

The goal is to deprecate MessagePactHandle in favor of PactHandle, and MessageHandle in favor of InteractionHandle. Where overlapping functionality exists, a simple deprecation notice will be sufficient initially.

In cases where functionality exclusive to MessagePactHandle or MessageHandle needs to be incorporated into their respective replacements (PactHandle or InteractionHandle), those features should be added before deprecation.

Tasks

  • feat(ffi): add with_metadata #439

  • to identify

  • Document how FFI should be used when verifying message pacts

    Once the FFI is disambiguated, there is still a need for a clear description as to how messages should be verified by the upstream languages. This is needed because the transport mechanism (e.g., queuing system) is abstracted away and the upstream language needs to handle that.

@JP-Ellis JP-Ellis self-assigned this Jun 13, 2024
@YOU54F
Copy link
Member

YOU54F commented Jun 14, 2024

this confused me when trying to create a repro with a v4 pact so clarification is certainly welcome

https://github.com/pact-foundation/pact-reference/pull/437/files#diff-d6fdf640e7952e605d5a425978e18d3aa2606501c1b9743426f76dc5989178daR1458

@YOU54F
Copy link
Member

YOU54F commented Jun 14, 2024

if that deeplink doesnt work
this is the test

// Issue - Should we be able to set version of message pact, and write to file containing v4 interactions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants