Closed YOU54F closed 1 month ago
So where have we got with this? Do we still want to go ahead? Or should we wait until the startup issues are resolved?
still need to sort the plugin startup issue as that will propagate to macos/linux. the flush suggestion you mentioned, should hopefully resolve that. will check later today
then there is a sep issue about the plugin shutdown on windows for avro. but we aren’t any worse than today.
should we make it configurable so the user can choose to use tokio tasks or threads rather than just binning the tokio tasks off. i haven’t done any measurements to ascertain if either is slower
shutdown issue resolved with local testing, PR raised here, need to make a couple of changes
fixed the startup issues now, woohoo!
https://github.com/austek/pact-avro-plugin/pull/45/files
we lose the rolling file appender from the plugin for reasons unknown.
pact plugin PR for this issue is updated here https://github.com/pact-foundation/pact-plugins/pull/69
pact-avro-plugin pr merged and released as 0.0.6 which gets us starting up
https://github.com/pact-foundation/pact-go/actions/runs/10637661001/job/29491970199
need #69 merging which will fix #73
There is an issue affecting Pact-Go users, whereby using plugins will cause sporadic segmentation faults.
The root issue cause of the issue https://github.com/tokio-rs/tokio/issues/3520 - Signals do not add SA_ONSTACK which may cause linked Go applications to crash
We can switch to using std::process in rust, introduced in this commit for windows, which uses threads instead of tokio tasks
threaded version
tokio version
I've tested this out on my fork and it's resulting in stable ci runs for pact-go cross platform utilising the following pact plugins (avro, csv, protobuf, matt)
Note: Avro plugin has failed to load on windows since moving to threads in commit
Amending the following logback.xml from the installed pact-avro-plugin
From
https://github.com/austek/pact-avro-plugin/blob/main/modules/plugin/src/main/resources/logback.xml
To
will allow the plugin framework to pick up the plugins loaded message (serverKey and port).
So there may be a change required in the pact-avro-plugin to support.
This can easily be reproduced with on a windows machine by performing
pact-plugin-cli install -y avro
It would be nice to implement the plugin timeout for loading - todo here by an env var possibly (so its usable by ffi & cli users easily)