-
Notifications
You must be signed in to change notification settings - Fork 24
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
Terminal escape characters pollute CI logs #32
Comments
👍 -- These control characters are hugely annoying when managing rollups and makes me slower. I think by and far most people look at the dump that highfive/rust-log-analyzer emits. I think if we don't fix this in CI then we should at minimum fix this in RLA by doing post-processing. |
These were added because the colors worked in Travis CI and AppVeyor previously. If the control characters aren't supported in Azure Pipelines let's remove them. |
They are supported in Azure, their terminal advertises this and we use them. The problem is that people prefer to look / process the raw logs instead of inspecting the log web view that Azure supports because of various reasons. Maybe fixing this by doing some post-processing in RLA like @Centril proposes is the better solution. Or maybe there is some service that we can pipe this logs into and renders them quickly with colors and we can just post a link to that ? The main reason I don't use the Azure web API for reading the logs is that the link does not point to it. With travis, the other reason was that the web API only supported 10k Lines, and that it was very slow. I don't know if this also holds for Azure, but if it doesn't, maybe we can just link users there. |
Azure's UI is unergonomic and buggy; it takes much less time for me to check the RLA raw logs when doing rollups.
I would do whatever can be fixed quickest because this problem is painful today. |
RLA does (at least try) strip them out from the GH comments -- e.g., rust-lang/rust#63991 (comment) -- but stripping from raw logs is somewhat harder in that we don't actually store those anywhere today (RLA's comment just points directly to the Azure raw log, e.g. https://dev.azure.com/rust-lang/e71b0ddf-dd27-435a-873c-e30f86eea377/_apis/build/builds/6949/logs/49). If we want to remove the ANSI codes from the raw link then we could hypothetically implement a sanitizer service that'll strip out the codes before sending the bytes on without storing the logs... or maybe something like that exists already. @Centril, do you think a sanitizer service is what's needed here? Edit: Thinking about this a bit more, it actually seems like we could probably sanitize the logs locally in browser via JS which would then be fairly low cost for us (just a single static page) and fairly easy to implement (fetch request, regex replace). I can look into doing so if there's interest. |
@Mark-Simulacrum The main thing I want is to be able to click the raw log link in the RLA comments and not see the escape codes. If doing it via a JS landing page that does the sanitation works then that's fine by me. If you can replace the codes by actual colors (also via regex) then even better. |
#31 is the PR implementing the client-side JS (and can technically be used today by prepending |
I'm going to transfer this issue over to rust-log-analyzer since I think we do not want to change behavior in CI (though log-analyzer may want to expose different UI, which we're working on). |
For some reason terminal escape characters are used in CI to color the terminal output, which ends up polluting the logs making them harder to read. For example, in https://dev.azure.com/rust-lang/e71b0ddf-dd27-435a-873c-e30f86eea377/_apis/build/builds/5993/logs/49 , we find:
and
We probably should disable colored output when running on CI, not only for rust-lang/rust tools, but also for cargo. Probably cargo is detecting the terminal using in azure as supporting colors, so maybe a quick hack for this could be to just, e.g.,
TERM=1
in azure to remove this.cc @rust-lang/infra
The text was updated successfully, but these errors were encountered: