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_logs for 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.
Affects: pact-ffi 0.5.5 (introduced by #537)
Summary
There is no way for an FFI consumer to obtain a
plugin_instance_id. Searching the full 0.5.5pact.h(280 exported functions), the only occurrences of "instance_id" are in this function'sown signature and doc comment.
pactffi_using_plugin/pactffi_using_plugin_with_delayreturnonly a
c_uintstatus code, not an instance ID.Internally the buffer is a
HashMapkeyed byentry.plugin_instance_id(from the plugindriver), which is never surfaced across the FFI boundary.
Interaction with Issue 1
The only place a
plugin_instance_idis ever exposed to a C caller is the first parameter ofthe log callback registered via
pactffi_register_plugin_log_callback. The intended flowappears to be:
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 thatpactffi_get_plugin_logsis independently usable without registering a callback.