Gather all operator logs on e2e test failure#358
Conversation
c6e040c to
238bc2d
Compare
shayasoolin
left a comment
There was a problem hiding this comment.
Might be safer to keep the tail, just have it much longer, say 32K lines.
Ronkahn21
left a comment
There was a problem hiding this comment.
Can we implement a line-limit control for logs? I recommend a parameter that defaults to -1 (unlimited). This is necessary because large test outputs (2,000+ lines) are currently flooding the terminal and cutting off vital early-stage debug data. Providing a way to redirect this to a file would also be a great solution.
Ah, yes I can see how this is annoying. I'll add make it configurable, stdout vs write to file with a timestamp. Still stdout for github CI unfortunately. |
ea8fa8a to
37f5db4
Compare
c608346 to
2616a2e
Compare
e9f4a8c to
d6b5524
Compare
shayasoolin
left a comment
There was a problem hiding this comment.
Do we want to consider a TAIL param (or even const) just for the stdout case? With some max value, and if someone really wants the full log, there's the file mode instead.
Maybe? Can you create a github issue or add it to the E2E improvements doc? This PR gets us to a good place in terms of diagnostics gathering. I'm sure it could be improved further but it's a matter of prioritization I think. |
d6b5524 to
17db482
Compare
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
This PR changes the e2e test diagnostic utility to gather all operator logs after a test failure, instead of just the last 2000 lines. This ensures complete diagnostic information is available when debugging test failures, rather than potentially missing earlier relevant logs that occurred before the failure.
Which issue(s) this PR fixes:
NONE
Special notes for your reviewer:
Small change to
operator/e2e/tests/debug_utils.go:operatorLogLinesconstant (previously set to 2000)TailLinesoption from the pod log request, which causes it to fetch all logsDoes this PR introduce a API change?
Additional documentation e.g., enhancement proposals, usage docs, etc.: