{{ message }}
Repository navigation
Conversation
In a log where most lines are colored, the log viewer stops applying colors partway down and shows each line's escape sequences as text instead, such as "test_foo ... [32mok[0m". With a 581-line unittest log, every line from 530 onwards was affected. The viewer downloads a log in chunks, and parseCssClassesForChunk() works out the colors of a chunk's lines in one of two ways, depending on how many of them contain escape sequences. LogTextManager looks up a line by its position within the chunk, but when no more than 100 of the chunk's lines, or no more than 30% of them, contain escape sequences, the colors are stored under the line's number in the whole log. For a chunk that doesn't start at the top of the log, the lookup then finds nothing and the line is shown with its escape sequences, or finds an earlier line's entry and shows that line's text in its place. The viewer fetches 500 lines beyond the ones on screen, so the log above arrives as lines 0-529, most of them colored, and lines 530-580, of which only 39 are. That second chunk is the one that loses its colors. f9df823 ("www: Fix indexing of log chunks") fixed the same mismatch in the other branch for buildbot#7852 and left this one. The basic test expected the whole-log line numbers and is updated to match.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

With python unittests in 3.14 now outputting coloured lines, I found that the buildbot console was not always displaying them correctly. I traced this to issue #7852 which turns out was only partially fixed. This patch fixes it in the remaining branch.
Contributor Checklist:
newsfragmentsdirectory (and read theREADME.txtin that directory)Here's a screenshot showing the issue: