-
Notifications
You must be signed in to change notification settings - Fork 97
Jelias2/op acceptor metrics improvements #499
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #499 +/- ##
==========================================
- Coverage 58.58% 58.49% -0.10%
==========================================
Files 91 91
Lines 13020 13129 +109
==========================================
+ Hits 7628 7680 +52
- Misses 4942 4997 +55
- Partials 450 452 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
op-acceptor/runner/runner.go
Outdated
| // Trim leading and trailing whitespace (including newlines) | ||
| cleaned = strings.TrimSpace(cleaned) |
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.
Do we want to remove newlines? I'm just wondering if this result in hard to read output?
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.
I've posted some before and after logs in the PR description, feel free to take a look and provide feedback
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.
Thanks for the images - really helpful!
I find this to be an improvement for console logs but perhaps a step back for file logs. The file:num can be useful information and we've also lost the "usual" go test formatting/indentation, which makes it seem odd. What do you think?
Should we treat them differently?
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.
I agree that file:num is useful, in the PR there is a flag for toggling this StripCodeLinePrefixes.
I personally found the go test formatting in the file logs not the most readable. See some logs from running prior.
I'm in favor of the change still if you want can put it behind a flag for like --intelligent-formatting or something.
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.
op-acceptor/runner/runner.go
Outdated
| } | ||
|
|
||
| // cleanTestOutput cleans up test output by removing ANSI codes, excessive whitespace, and optionally file:line prefixes | ||
| func cleanTestOutput(output string, stripFileLinePrefixes bool) string { |
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.
Can we add some unit tests to ensure this function behaves as expected?
| GoBinary string // path to the Go binary | ||
| AllowSkips bool // Whether to allow skipping tests when preconditions are not met | ||
| OutputRealtimeLogs bool // Whether to output test logs to the console | ||
| StripCodeLinePrefixes bool // Whether to strip file:line prefixes from test 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.
Only additional config, large diff is indentation
| goBinary string // Path to the Go binary | ||
| allowSkips bool // Whether to allow skipping tests when preconditions are not met | ||
| outputRealtimeLogs bool // If enabled, test logs will be outputted in realtime | ||
| stripCodeLinePrefixes bool // Whether to strip file:line prefixes from test 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.
Only additional config: stripCodeLinePrefixes, large diff is indentation
| goBinary: cfg.GoBinary, | ||
| allowSkips: cfg.AllowSkips, | ||
| outputRealtimeLogs: cfg.OutputRealtimeLogs, | ||
| stripCodeLinePrefixes: cfg.StripCodeLinePrefixes, |
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.
Only additional config stripCodeLinePrefixes, large diff is indentation
| Timeout time.Duration // Timeout for gateless mode tests (if specified) | ||
| LogDir string // Directory to store test logs | ||
| OutputRealtimeLogs bool // If enabled, test logs will be outputted in realtime | ||
| StripCodeLinePrefixes bool // If enabled, file:line prefixes will be stripped from test 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.
Only additional config StripCodeLinePrefixes, large diff is indentation
| DefaultTimeout: ctx.Duration(flags.DefaultTimeout.Name), | ||
| Timeout: ctx.Duration(flags.Timeout.Name), | ||
| OutputRealtimeLogs: ctx.Bool(flags.OutputRealtimeLogs.Name), | ||
| StripCodeLinePrefixes: ctx.Bool(flags.StripCodeLinePrefixes.Name), |
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.
Only additional config StripCodeLinePrefixes, large diff is indentation
| GoBinary: config.GoBinary, | ||
| AllowSkips: config.AllowSkips, | ||
| OutputRealtimeLogs: config.OutputRealtimeLogs, | ||
| StripCodeLinePrefixes: config.StripCodeLinePrefixes, |
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.
Only additional config StripCodeLinePrefixes, large diff is indentation
5da44ac to
f1f867e
Compare
f1f867e to
eb71708
Compare

Description
Tests
Additional context
Logs Before
Logs After
Log File output
Metadata