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

[test-utils] add log_prefix_for_test + store name of test in LogContext #878

Merged

Conversation

sunshowers
Copy link
Contributor

@sunshowers sunshowers commented Jan 10, 2024

While trying to diagnose oxidecomputer/omicron#4779,
which only occurs in CI, I'm trying to collect ClickHouse logs. To do that we
need a way to uniquely identify the ClickHouse logs per test.

It is possible to derive the log prefix from log_file_for_test, but it seems
cleaner to do it this way.

Not entirely sure about this design though -- a LogContext represents a single log file, but in this case we're also using it to generate a second path, kinda.

Created using spr 1.3.5
@sunshowers sunshowers requested review from davepacheco and ahl January 10, 2024 02:24
Created using spr 1.3.5
@sunshowers sunshowers changed the title [test-utils] add a log_prefix_for_test function [test-utils] add log_prefix_for_test + store name of test in LogContext Jan 10, 2024
Copy link
Collaborator

@ahl ahl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks good to me, but @davepacheco is more likely to have a useful opinion here than am I

@davepacheco
Copy link
Collaborator

Feel free to land when ready!

@sunshowers sunshowers merged commit b19a9a5 into main Jan 12, 2024
10 checks passed
@sunshowers sunshowers deleted the sunshowers/spr/test-utils-add-a-log_prefix_for_test-function branch January 12, 2024 00:46
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 this pull request may close these issues.

3 participants