-
Notifications
You must be signed in to change notification settings - Fork 46
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
Issue/434 missing buffer logs #435
Conversation
add smoke test, needs to be executed in isolation, as it uses the global logging provider and thusly is affected by other tests in the same process
@@ -12,3 +12,7 @@ resolver = "2" | |||
|
|||
[patch.crates-io] | |||
onig = { git = "https://github.com/rust-onig/rust-onig", default-features = false } | |||
pact_models = { path = "./pact_models" } | |||
pact_matching = { path = "./pact_matching" } | |||
pact_mock_server = { git = 'https://github.com/pact-foundation/pact-core-mock-server.git', branch = "issue/134_missing_buffer_logs" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note these are reliant on patches in branches which pull in the updated pact-models code from this pr.
will need co-ordinating with release of pact models, then pact-plugin-driver, which is required by pact-core-mock-server, which is required by crates in this repo.
println!("{}",logs); | ||
assert_ne!(logs,"", "logs are empty"); | ||
|
||
pactffi_cleanup_mock_server(port); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the assertion above it fails, this line will not be executed.
I'm wondering if we use the patch block to force the logging crate version, this will fix this issue. It does mean we need some way of working out when to update it. But the logging crates have been quite stable. |
I'm going to close this PR, as it can't be merged in the current state. I'll then cherry pick the changes from your branch. |
This was not caused by the logging crates, but by the FFI InMemory sink which uses the global static |
ahhh great, good detective work @rholshausen |
fixes #434
I believe this issue stems from one of the pact crates having a different version of the tracing crate used for logging.
This seems like an awkward position to be in, when upgrading dependencies of each of the indiv pact rust crates, especially as two sit across different repos (pact_mock_server / pact-plugin-driver).
Would it make sense to crate a pact_logging crate that wraps the required deps for logging, and this singular crate can be imported by all the other pact rust crates.
If we need to update the logging deps, we update them in the pact_logging crate, and then can use the workspace override to patch all crates to use the same versions (via pact_logging)