6 ms·
How GitHub Actions renders large-scale logs
- saurik 6y agoI am very excited to see if this helps. I use GitHub Actions constantly for very large builds with very large logs and I find their log browser infuriatingly useless... like: actively harmful :(. It punished me so much and so often and so consistently for having the gall to think that logs would be useful that I finally became demoralized and gave up trying to use their interface: I just wait until the builds complete (as they sadly refuse to do this during a build) and ask for the "raw log" so I can get the experience they seem to believe I couldn't possibly want: a ridiculously long text file downloaded into my browser, which allows me to use built-in browser features to scroll through and search it :(. I will, I guess, cautiously try to venture into using the logs again to see if they managed to fix things.
- napsterbr 6y agoI'm with you. The usability behind Actions is terrible, in every possible way. At least when compared to what I used before (Jenkins).
- IshKebab 6y agoWow you must be the only person in the world that things Jenkins is more usable than Github Actions!
- ec109685 6y agoWhat is strange about this is VSCode which Microsoft owns has no problem with 50kb files. Surprised they just don’t go with its text editor. Even more sad, vim 20 years ago could handle these files with ease, and here we are where 20kb causes the browser to choke.
- Varriount 6y agoNot too long ago had to search through a truly gigantic file (I believe it contained JSON logs?). Sublime Text slowed to a crawl and froze when attempting to open it, and I didn't even bother with VS Code. On a hunch, I tried opening it in Notepad - and it loaded quite quickly!
- Spqa 6y agoSublime and VS code might try to parse it for syntax highlighting, notepad simply read the text.
- IshKebab 6y agoVSCode disables syntax highlighting on very large files.
- scaladev 6y agovim does this too. If it hangs on you when opening a very large file, don't hesitate to press Ctrl+C. It does not terminate the whole process, but aborts the syntax highlighting, and the editor becomes very snappy.
- suprfsat 6y agoTo proactively turn off syntax highlighting, bracket matching, and so forth, I use alias vi='vim -u NONE' which makes it skip vimrc.
- deleted 6y ago[deleted]
- jordemort 6y agoI regularly work with Actions that produce very large logs (building Yocto) and I've found trying to diagnose build failures to be extremely frustrating since this change rolled out. I want to jump to the end of the log immediately, since that's presumably where I will find my error, but instead of being able to do that in one step, I get stuck in a treadmill of endlessly lazy-loaded log lines; every time I get to the bottom of the window, it's no longer the bottom of the window anymore, regardless of if I used the mouse wheel or tried to yank the scrollbar down. Now when I have build failures, I find myself immediately just going for the raw logs, because I can jump to the end of them without putting in unreasonable effort.
- dataflow 6y agoMaybe this will sound dumb, but I had to deal with medium-large (not "very large") logs in the past, and I found that spending some time actually trimming down the messages was really helpful. Especially if you're using it for CI, some commands (e.g., wget, installers like apt-get, etc.) tend to produce what is essentially useless garbage (like XXXX.... progress indicators, "preparing to unpack", "unpacking", etc.). It's not something everyone bothers to do, but I spent some time making commands more quiet and actually keeping only the important parts, and I felt it paid off. All of which is to say—have you tried going this route? I'm not familiar with Yocto, but I feel like it's worth a shot regardless of the UI. There's only so much useful information to log, and it makes it easier to read the logs too, even with a perfect UI.
- jordemort 6y agoI haven't looked at what knobs are available to turn it down yet, but most of what it's logging is actually of interest to me - if it was any less verbose, it would make answering "why did this build take so much longer than the others?" much more difficult, and that's a question I have to answer with some regularity.
- dataflow 6y agoFor diagnosing build speed, one thing I find helpful is trimming N messages down to 1-2 per command. e.g., if you spawn a process, don't emit "created process", "started process", "shutting down process", "initializing process", "terminated process"... while they all seem useful, just including one of them (like "started process") can trim things down significantly with negligible effect on the usability. I can't speak the same for your use case necessarily, but it might be worth spending a couple hours at some point looking into what you can trim. It's easy to feel the upfront time investment isn't worth it, but it really compounds on a daily basis for every single person, so it's nice if you can address it.
- nanagojo 6y agoGotta love how GitHub made their own virtualization library but did not open source it :)
- graderjs 6y agoYeah I'm wondering if it's unreasonable for us to expect them to open source it? They're connected to open source, but i don't think the GitHub app is open source. Maybe it's not reasonable to expect
- nanagojo 6y agoWell it's more that these sorts of library _can_ live on its own and not be coupled to a core business. Not to mention that in the article they talk about how other open source libraries had some pitfalls.
- swyx 6y agoits perfectly reasonable to ask for it, and perfectly reasonable for them to say no :) i also wished they offered up the code, instead of dropping two measly bullet points. but they dont owe us anything
- Aeolun 6y agoSince we presumably load it in our browser, it seems a bit silly to withold the source? Maybe it’s too much of a pain for people to reverse engineer?
- catchmeifyoucan 6y agoOne alternate I’ve been thinking about lately to virtualization is the HTML canvas? I believe this is how flutter works. It scrolls buttery smooth. You can stylize elements. And also restrain to a certain viewport. There may be a few ambiguities, soo might do some research to make the text look good, but just a thought
- saagarjha 6y agoThis seems like it would be terrible user experience wise.
- no_wizard 6y agoIt’s an accessibility nightmare to do it all in canvas, the text isn’t even registered appropriately when you do it this way for screen readers for example
- no_wizard 6y agoJust to add on to this, since I can't edit, here's the Mozilla Developer Network entry that speaks to the accessibility challenges with canvas, for future reference in case someone stumbles upon this: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas#accessibility_concerns https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ca...
- catchmeifyoucan 6y agoCouldn't you overlay html elements on top of the canvas elements? You don't necessarily have to use canvas text. Each canvas element can tell you the size of each rect, so for each of the 50k log lines, you'd have an element in the canvas. When scrolling, the html elements can fade. As the rect scrolls into view, it draws the html div over itself, since each rect is uniquely associated with a line of text. It was a thought with some of the previous work I had done with canvas.
- goflapjack 6y agoPersonal Experience: I seriously couldn't care less about the head of the log but the tail. Yes, today their log browser is "infuriatingly useless".
- Waterluvian 6y agoCan I just have an option to download a text file and not even try to render long logs?
- deleted 6y ago[deleted]
- TheTaytay 6y agoYou can click on the little gear icon in the top right of the screen that renders the logs and then "View Raw Logs", which is a raw text dump. It's perfect and fast.
- Waterluvian 6y agoWonderful. I'll try that tomorrow. Hoping I can save target as.
- bkuehl 6y agoI love good write-ups like this! Although I would have liked a bit more detail. UX at scale is really difficult sometimes and there are constant trade-offs and limitations to deal with. Everyone expects perfectly smooth performance with data available at an instant and it's easy to be the other side and judge than to have to actually work through the complications of solving it.
- fomine3 6y agoSimple scroll virtualization kills browser's search ability. Please implement search feature if you implement scroll virtualization.
- mikepurvis 6y agoFWIW I hate how the discourse forum software not only does infinite scroll but then also hijacks Ctrl-F to go into its internal search utility. I will be very displeased if more websites follow this pattern.
- jhanschoo 6y agoI felt that this was close to optimal UX under the limitation of not being able to simultaneously render a lot of text. What would you have preferred?
- mikepurvis 6y agoTo be honest, I'm not sure. Maybe hijacking Ctrl-F is the right thing to do here, but I wish that what it hijacks me to would be closer in behaviour to what the native browser find-in-page functionality is. Instead it whisks me off to a totally separate SERP with a list of post snippets totally void of their surrounding context, when typically the whole point of doing a find-in-page is not to just find a result, but to find information like "how many of these are there here, how are they clustered, and what kind of stuff is around them?"
- fake-name 6y agoIt also breaks things like Ctrl+A, Ctrl+C, to copy everything onto the clipboard to then view it in a better viewer/editor.
- nyanpasu64 6y agoEven without virtualization, Ctrl+A has the disadvantage of often highlighting header/footer/repo text as well as the logs themselves.
- etaioinshrdlu 6y agoNow I wish AWS Cloudwatch would put the same care into their log viewer. It's maddening.
- lihaoyi 6y agoAs a point of contrast, I maintain a CI system at work, with a plain-old-HTML (almost javascript-free) log browser. Including ANSI syntax highlighting (server-rendered), timestamp tooltips, real-time updating, etc. Chrome has no problems loading >140k lines of logs (~10mb, biggest job I could find) and scrolling/searching/selecting/copying/etc. Obviously not as snappy as smaller logs, and also not as snappy as downloading the log file to browse in IntelliJ, but it works OK-ish. It's a lot higher than the ~20k line soft limit they described in the post! The biggest difference I could find is that Github Action's log browser generates 6 HTML elements with ~673 characters of HTML overhead per log line, whereas our own log browser generates 1 HTML element with ~45 characters of HTML element per log line (basically a single div with a timestamp attribute for a non-colored line). In that light I guess it's not surprising that browsers have more trouble with Github Actions logs given how much more work they are making the browser do to render each line of logs! The minimal-HTML nature of our log browser was an intentional design goal. It's interesting what kind of limits you hit: you cannot use opacity (too slow), no rounded corners (too slow), one-div-per-line is faster than using spans and line wrapping (no idea why), no per-line JS logic (attach your event handlers to the parent container and wait for propagation). Kind of restrictive, but it's certainly nice not to have to implement an entire virtualized scroll window (which I have done before, and would rather not do again if possible!)
- viklove 6y agoVim would have no trouble with a 10mb log file. The only time I've really run into trouble opening a file with vim was when the file size exceeded the ram on my machine (it was an XML data dump from discogs). Even running macros and regex searches were no problem.
- kureikain 6y agoThis is something frustrated me. We have log that build docker and ML tooling with all native toolchains and the log is unusable. I maintain Jenkins and sometime we pull log that has is about 500MB and it's crashed no matter what I do. If I switch to console plain text then browser is no longer crash but very slow. If Github action allow a plain text download option will make thing way easier.
- flohofwoe 6y agoI hope the UX is also considered for improvements. Currently it can only be described as "user hostile": - only a small area of the screen is actually used for logging messages - I'm constantly fighting the per-runstep folding views, but it's hard to describe what the actual problem is, except "it's awkward to use" - when new messages are added to the log, the view scrolls to the end of the log, it's impossible to "catch" the view with the mouse. - I don't know if I remember right, but searching only seems to work on the unfolded views, which is a pretty dumb idea. etc...etc... it's really not a nice experience IMHO. From my POV (mostly C/C++ compile logs) performance is fine, but everything else sucks :) Please have a look at any other CI system for inspiration, AppVeyor, Travis, Gitlab... I never had a problem with their log views, I guess mostly because they are much simpler.
- hannahkhisty 6y agoYes May be. A full-stack developer is an individual that works with all the levels of internet development, which involves business logic, data modeling, MVC, API, user experience, user interface, understanding the requirements of customers and enterprise, and even more. Being sophisticated development specialists, full-stack programmers are able to frame and create attractive and challenging sites and software. They are multi-talented specialists having the capability to work on all of the development aspects which range from front end to backend. Full Stack Classes in Nagpur provides you the best trainers that take care of the database and may even move towards handling debugging and testing software. https://www.sevenmentor.com/full-stack-classes-in-nagpur https://www.sevenmentor.com/full-stack-classes-in-nagpur
- kevincox 6y agoI hate this. One of the most common things I do is search and this breaks it. I also don't want your shitty override of the Ctrl+F key. However this may be because I am a FireFox user. I have found that for fairly simple HTML (basically just colouring and some links) such as this FireFox handles all but the largest files very well (and my build logs aren't very large in the grand scheme of things) but Chrome often locks up on much smaller files. I hope there is a way to disable this, or at least click though to the raw log without the JS nonsense.