pact-foundation / pact-reference

Reference implementations for the pact specifications
https://pact.io
MIT License
91 stars 46 forks source link

Protobuf 0.1.16 + Rust FFI Logger init causes test to fail #230

Closed YOU54F closed 1 year ago

YOU54F commented 1 year ago

Noticed some odd behaviour.

Using Protobuf 0.1.16 + and invoking the Rust FFI Logger causes test to fail, as the plugin cannot start up.

gRPC tests appear to be failing whenever I invoke something like

      PactRubyFfi.pactffi_logger_init
      PactRubyFfi.pactffi_logger_attach_sink('stderr', PactRubyFfi::FfiLogLevelFilter['LOG_LEVEL_DEBUG'])
      PactRubyFfi.pactffi_logger_apply
      PactRubyFfi.pactffi_log_message('pact_ruby', 'INFO', 'pact ruby grpc is alive') 

only noticed the failure today, as my CI run, is installing the latest proto plugin, and only got a passing test again, when I set the log level filter to 0. The current value is mapping through as 4 to the underlying ffi

edit: sidenote wasn't sure on the best repo, pact_plugins, pact proto or this one, so just popped it here for now

rholshausen commented 1 year ago

Looks like it is getting IO errors trying to connect to the plugin. I don't think this is related to logging, as I can see some logs from the plugin, or maybe, the amount of logging is exhausting some buffer and causing the IO errors.

The plugin creates a log file in the plugin directory, it might be worth while attaching those files as build artifacts so we can see if there is any error from the plugin side

YOU54F commented 1 year ago

Will close this for now and re-raise if I see the issue crops up again in a new release