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

0.4.20 pactffi_mock_server_logs empty - mismatch in tracing library #434

Closed
YOU54F opened this issue Jun 7, 2024 · 1 comment
Closed

Comments

@YOU54F
Copy link
Member

YOU54F commented Jun 7, 2024

pactffi_mock_server_logs are empty, in 0.4.20 release.

Initially identified in pact-net's test suite when attempting to update to libpact_ffi 0.4.20. pact-net uses pactffi_log_to_buffer when it initialises, and has a test to check that pactffi_mock_server_logs actually returns logs (and it failed)

Cause

I believe this is due to a mis-match in the logging libraries in pact_models, compared to the rest of the pact rust estate

All other crates

Reproductions

Added a test, which requires a buffer log sink. I believe the full test run sets a different global sink, so the test is ignored in the main run, and executed in isolation. It's not terribly pretty but it does the job.

✅ tag libpact_ffi-v0.4.19

❌ tag libpact_ffi-v0.4.20

Resolution

Suggest

  1. Update pact_models to match tracing libs
  2. Requires consuming in pact-plugin-driver & pact-core-mock-server
  3. Pin logging libs explicitly with version="=x.y.z", note the = sign in the version number. This forces pinned resolution

Testing

  1. Update pact_models to same logging libs
  2. Update pact_mock_server to use updated pact_models
  3. Update pact-plugin-driver, as it consumes pact_models, and are depended on by pact_mock_server
  4. Update all the things in pact-ref to point to updated pact_mock_server and pact-plugin-driver

pact-plugin-driver

pact_mock_server

pact_reference

@YOU54F
Copy link
Member Author

YOU54F commented Jun 18, 2024

should be fixed in 0.4.21, just awaiting release

@YOU54F YOU54F closed this as completed Jun 20, 2024
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

Successfully merging a pull request may close this issue.

1 participant