`pactffi_get_plugin_logs` requires a `plugin_instance_id` that no FFI function exposes
Maintainers usually reply within 3 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- rust
- Domain
- api, backend-api-design
Research direction
Start with the pact.h declarations and documentation for pactffi_get_plugin_logs, pactffi_using_plugin, pactffi_using_plugin_with_delay, and pactffi_register_plugin_log_callback, then review the related Issue 1. Determine how a C consumer can obtain a plugin_instance_id without an unreachable callback path. Done means the FFI exposes a usable, documented route to retrieve plugin logs for a plugin instance.
Written by the indexing model from the issue text.
Description
Affects: pact-ffi 0.5.5 (introduced by #537)
Summary
const char *pactffi_get_plugin_logs(const char *plugin_instance_id);
There is no way for an FFI consumer to obtain a plugin_instance_id. Searching the full 0.5.5
pact.h (280 exported functions), the only occurrences of "instance_id" are in this function's
own signature and doc comment. pactffi_using_plugin / pactffi_using_plugin_with_delay return
only a c_uint status code, not an instance ID.
Internally the buffer is a HashMap keyed by entry.plugin_instance_id (from the plugin
driver), which is never surfaced across the FFI boundary.
Interaction with Issue 1
The only place a plugin_instance_id is ever exposed to a C caller is the first parameter of
the log callback registered via pactffi_register_plugin_log_callback. The intended flow
appears to be:
- register the callback,
- learn instance IDs as entries arrive,
- call
pactffi_get_plugin_logsfor a given instance.
Since Issue 1 makes step 1 impossible, the entire plugin-observability surface added in #537 is
unreachable from a C consumer. Fixing Issue 1 unblocks this one.
Suggested fix
Fix Issue 1 (which makes this reachable), and/or add an accessor that returns the plugin instance
ID — for example an out-parameter on pactffi_using_plugin — so that pactffi_get_plugin_logs
is independently usable without registering a callback.
- Dominant language
- Rust
- Stars
- 106
- Forks
- 59
- Avg merge
- 9d 7h
- Merged PRs (30d)
- 12
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pact-foundation/pact-reference
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
pact-foundation/pact-reference#538 · 1 comment · 1 reaction ·
Maintainers usually reply within 3 days
-
bug triage upstream
Difficulty 4/5 3-5 days Newbie friendliness 45/100
pact-foundation/pact-reference#535 · 1 comment ·
Maintainers usually reply within 3 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 58/100
pact-foundation/pact-reference#516 · 2 comments · 1 reaction ·
Maintainers usually reply within 3 days
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
pact-foundation/pact-reference#498 · 1 comment ·
Maintainers usually reply within 3 days
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
pact-foundation/pact-reference#492 ·
Maintainers usually reply within 3 days
All issues in pact-foundation/pact-reference
Similar issues
-
postgresql-rules / queue-rules: implicit KEY SHARE before a parent key update, and job self-overlapOpen
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
jonathanong/no-mistakes#3879 ·
Maintainers usually reply within 1 day
-
area:index v0.35.0
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
nautechsystems/nautilus_trader#5741 ·
Maintainers usually reply within 1 day
-
RunPlugin derives Hash over all fields while PartialEq compares only location and configurationOpen
Difficulty 1/5 Under an hour Newbie friendliness 86/100
zellij-org/zellij#5969 ·
Maintainers usually reply within 1 day
-
eth_get_proof reports another account's fields for an absent accountPossibly taken @Indian-boult claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day