Repository navigation
Commit 6ca7f0e
committed
in_tail: fix NameError in flush_buffer with emit_unmatched_lines
**Which issue(s) this PR fixes**:
Fixes #
**What this PR does / why we need it**:
TailInput#flush_buffer referenced an undefined local variable
`tail_watcher` instead of its argument `tw`, so it raised
`NameError: undefined local variable or method 'tail_watcher'` when an
incomplete buffered line is flushed and the parser returns no record
while `emit_unmatched_lines` is enabled. This can happen with parser
plugins which don't implement the `unmatched_lines` feature, because
in_tail only emits the buffered line as `unmatched_line` in that case.
Add a regression test which flushes a buffered line with such a parser
and checks that `unmatched_line` and `path_key` are emitted.
**Docs Changes**:
None
**Release Note**:
in_tail: fix NameError raised when flushing buffered lines with
emit_unmatched_lines true
Co-Authored-By: Qwen3.8-Flash-Next
Signed-off-by: Takuro Ashie <ashie@clear-code.com>1 parent f727da5 commit 6ca7f0e
2 files changed
Lines changed: 36 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
706 | 706 | | |
707 | 707 | | |
708 | 708 | | |
709 | | - | |
| 709 | + | |
710 | 710 | | |
711 | 711 | | |
712 | 712 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
113 | 122 | | |
114 | 123 | | |
115 | 124 | | |
| |||
1310 | 1319 | | |
1311 | 1320 | | |
1312 | 1321 | | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
1313 | 1348 | | |
1314 | 1349 | | |
1315 | 1350 | | |
| |||
0 commit comments