Sunday, 2020-11-15

*** dmsimard has joined #zuul00:32
*** bhavikdbavishi has joined #zuul02:54
*** Goneri has quit IRC02:55
*** bhavikdbavishi1 has joined #zuul02:57
*** bhavikdbavishi has quit IRC02:58
*** bhavikdbavishi1 is now known as bhavikdbavishi02:58
*** bhavikdbavishi has quit IRC04:17
*** bhavikdbavishi has joined #zuul04:45
*** bhavikdbavishi1 has joined #zuul05:22
*** bhavikdbavishi has quit IRC05:24
*** bhavikdbavishi1 is now known as bhavikdbavishi05:24
*** evrardjp has quit IRC05:33
*** evrardjp has joined #zuul05:33
*** bhavikdbavishi1 has joined #zuul05:41
*** bhavikdbavishi has quit IRC05:43
*** bhavikdbavishi1 is now known as bhavikdbavishi05:43
*** bhavikdbavishi has quit IRC06:28
*** sean-k-mooney1 has joined #zuul08:16
*** sean-k-mooney has quit IRC08:18
*** zbr has joined #zuul08:45
*** bhavikdbavishi has joined #zuul12:20
*** tosky has joined #zuul13:00
*** iurygregory has quit IRC13:13
*** iurygregory has joined #zuul13:30
*** bhavikdbavishi has quit IRC13:46
*** polls45 has joined #zuul14:02
*** avass has quit IRC14:08
*** yourname_ has joined #zuul14:09
*** yourname_ has quit IRC14:14
*** yourname_ has joined #zuul14:15
*** ikhan has quit IRC14:41
*** iurygregory has quit IRC15:22
*** bhavikdbavishi has joined #zuul15:46
*** bhavikdbavishi has quit IRC15:56
*** bhavikdbavishi has joined #zuul16:02
openstackgerritTristan Cacqueray proposed zuul/zuul master: WIP: web: add custom Ansi component implementation in ReasonML  https://review.opendev.org/76275916:07
tristanCwe had some good success with react-reason in software-factory ( https://www.softwarefactory-project.io/software-factory-resources-in-reason.html ), and here is an attempt at solving the ANSI code rendering challenge using ReasonML ^16:10
openstackgerritTristan Cacqueray proposed zuul/zuul master: WIP: web: add custom Ansi component implementation in ReasonML  https://review.opendev.org/76275916:22
*** bhavikdbavishi1 has joined #zuul16:43
*** bhavikdbavishi has quit IRC16:45
*** bhavikdbavishi1 is now known as bhavikdbavishi16:45
*** Goneri has joined #zuul16:45
*** bhavikdbavishi has quit IRC18:53
*** iurygregory has joined #zuul19:26
*** tosky has quit IRC20:05
openstackgerritAlbin Vass proposed zuul/zuul master: Add job node to components graph.  https://review.opendev.org/76276720:15
zbrtristanC: what level of ansi support to expect?20:21
fungii honestly don't think we should shoot for more than 16-color (8-color+bold) interpretation, though underline and italics may not be too problematic. i definitely wouldn't worry about aiming for cursor movement, character deletion/overwrite, et cetera20:24
fungioh also i blink is unnecessary (and likely to be annoying if anything did try to use it)20:25
openstackgerritTristan Cacqueray proposed zuul/zuul master: WIP: web: add custom Ansi component implementation in ReasonML  https://review.opendev.org/76275920:26
fungireverse and 8-color background palette support might be useful20:26
fungiconcealed is probably pointless, as is key remapping20:27
tristanCzbr: i only implemented basic 4bit color and bold/italic mode.20:27
fungi4-bit color is 3-bit color plus bold bit though, right?20:28
tristanCfungi: the extra bits is often defined as "bright", bold is usualy set as [01m20:29
zbrtristanC: i have particular love for the react-ansi library but ANSI support is much more complex than 3-4 bit even.20:30
fungiusually terminals either supported 7 colors (+black) and had a bolder overstrike, or they supported 15 colors (+black) and reinterpreted bold as a brighter color shift rather than a font change20:30
zbrbut it should be fine for 99% of what we can expect to be used in practice20:30
zbrin the end we used to have 0% ANSI support till Friday20:31
tristanCfungi: i would support for \r too, to skip intermediary lines, for example curl status progress20:31
zbri would have preffered to make use of an existing library20:32
fungitristanC: the only terminals i'm familiar with treat [01m as "bright" in 16-color mode or "bold" in 8-color mode20:32
fungi(depending on what color and/or font support they had)20:32
tristanCand i would be happy to cover more sequences such as blink or 24bit support if you are ok with adding reasonml to the zuul web codebase20:32
zbryep, moving cursor back is used by multiple tools that display progress20:32
fungiif delete/movement/overstrike are going to be supported, presumably it's sufficient to calculate their end state and not try to step through/animate them20:34
fungiansi interpretation of logs is usually considered a security risk because it can be used to replace or obscure earlier lines, but maybe that's okay in a ci system context20:35
zbryep, this would ideal "render the final" so inside the logs we would not have anything more than ANSI styling.20:36
zbrnobody expect to support moving the cursor to another line20:36
zbrbut expect that at some point we will want to render final result that happens on a single line20:37
zbrprobably most tools are already disabling "animations" when not used on a pure terminal so we are unlikely to get into problems20:37
fungiespecially since the html output has effectively infinite rows so relative screen geometry isn't like on a real terminal20:38
zbrthe newer docker build has some really neat TUI animations, with potential to mess on non terminals. still i am sure they can be disabled.20:39
fungisane tools omit ansi escapes if stdin is not a tty20:40
zbryep, when it comes to web we do not have COLUMNS, we can consider them infinite. Any tool that draws stuff based on this may cause issues.20:40
fungior rows20:41
fungicolumns can theoretically be calculated based on font pitch and browser geometry20:41
zbrtrue, but you can enable them with env vars. still enabling colors does not mean you enable the advanced stuff too.20:41
zbrterminals expose columns to application but when running in a fake-tty, like with zuul you do not know the final columns, you will never know.20:42
zbrbut if we go into problems we can use a hardcoded value that produce decent results.20:43
tristanCzbr: would you have examples of console log that does not render in zuul ui?20:43
zbrnope20:43
zbri am sure I  can find example, but the scope is not to find on-purpose stuff that fails, i am interested about read build output that may fail.20:43
zbrand at this moment I do not have.20:44
zbrthe tools I know, make use only of basic 3-4 bit coloring features.20:44
tristanCzbr: yeah, as fungi said, cli usually checks for tty before using ansi code20:45
zbrwhich means at leas at this moment we will not start seeing colors without someone deliberately enabling them20:45
tristanCand i'm surprised we added react-ansi in the first place, as zuul job task shouldn't have a tty20:45
zbrand when they do, they will be able to evaluate the results.20:45
zbri think we will need add small test for the ANSI rendering component so we can easily test how good is the rendering, maybe even performance and also to evaluate the outcome of swapping the "rendering engine".20:49
tristanCzbr: what do you mean by rendering engine?20:49
fungiyes, as i said when i reviewed the change, i personally think that ansi escape sequences in logs are terrible for a variety of reasons, so i wouldn't want the support for them to encourage people to add color to stuff run by zuul, but i understand it's a feature users are interested in being able to take advantage of20:49
zbrmy initial implementation was using ansi2react which had bad performance, i switched to react-ansi after as it was much faster.20:50
fungialso ansi was developed for terminals and relies on static registers and fixed geometries, whereas web browsers have dynamic geometries and html relies on a state engine for styling, so mapping one to the other is an invitation for problems. plain text is the common format which renders fairly consistently in both20:52
yourname_I think we have some python tool running cmake in a container for some reason and that's always producing colored output. (another team is responsible for it and I'm not using it myself)20:52
*** yourname_ is now known as avass20:52
avassI need to set up my nick correctly :)20:53
avassTHe logs that produces is always horrible to look at20:53
tristanCavass: would you know how to reproduce the output in opendev?20:54
tristanCi only used https://zuul.opendev.org/t/zuul/build/e92490099f6f460f872e3a35942dee0b/console#3/0/13/ubuntu-bionic to check my implementation20:55
fungimy attempt at trivially echoing ansi color escapes which worked in my terminal in an ansible command task invoking a shell turned out to not actually work20:55
fungihttps://review.opendev.org/76236320:56
* zbr going out. tomorrow I will try to collect some sample ANSI output from various tools as are commonly used during build / testing.20:56
fungioh, though i now see one problem with that change. i'll restore and update it20:56
avassI think it's coming from cmake so it should be enough to force that to use colors20:56
avassI've barely touched cmake myself though20:57
zbri used cmake in the past, not so bad.20:57
openstackgerritJeremy Stanley proposed zuul/zuul master: DNM: ANSI Color Test  https://review.opendev.org/76236320:58
*** zenkuro has joined #zuul20:58
tristanCand here is how it looks with the proposed Ansi.re in zuul ui: https://i.imgur.com/mnKPHHM.png20:58
avassfungi: heh :)20:58
zbrfungi: lets use that change to build a good ansi testing sequence. can I add new stuff tomorrow if I find?20:58
zbrwe can get some goo sample.ans file, but only from real world tools using CI20:59
fungizbr: absolutely! feel free to revise 762363 with whatever trivial examples seem useful20:59
zbrwe don't need to render video in ANSI20:59
zbri will do some captures, like ansible, and other tools we all use.21:00
avasstristanC: I can take a look at it tomorrow and see if I can set up a minimal example for it though21:00
fungimy previous iteration on 762363 did manage to run the ls example and did not appear to include ansi escapes even though color was forced21:01
fungibut hopefully the direct echo of escapes will fire when it runs this time21:01
zbrbtw, please remember to reply to my message around UX changes for summary page, http://lists.zuul-ci.org/pipermail/zuul-discuss/2020-November/001393.html21:02
zbri am curious about A-E changes, which ones are likes or disliked.21:02
avassI would guess it comes from this: https://cmake.org/cmake/help/v3.0/variable/CMAKE_COLOR_MAKEFILE.html21:06
fungiyep, the echo did get colorized21:06
fungihttps://013466c23682e65bfda5-2d3a3f9d742fc77cdc67c9dcee096957.ssl.cf2.rackcdn.com/739444/7/check/zuul-build-dashboard-opendev/049c887/npm/html/21:06
fungibrowse to the builds list for the zuul tenant and select that zuul-ansi-test build at the top, then go to the console tab and expand the echo rainbow text task21:07
zbras a note, defining 3-4 environment variables could enable coloring for most tools, the list is not very long but we probably do not want to do this right now.21:07
tristanCi think the zuul webui could benefit a lot from reasonml, and i'd be happy to extend the initial demo ( https://review.opendev.org/762759 ) to the other components if you are interested21:07
fungiit's interesting that a command task containing `bash -c 'ls -l --color=always /'` doesn't get ansi color21:08
fungibut the `bash -c 'echo -e "\E[31mr\E[32ma\E[33mi\E[34mn\E[35mb\E[36mo\E[37mw\E[0m"'` task worked21:08
avassI wonder why, both --color and --color=always works for me21:13
fungi--color is synonymous with --color=always according to the manpage for gnu ls on my system21:17
fungii was just being pedantic21:17
*** sean-k-mooney1 has quit IRC21:37
*** sean-k-mooney1 has joined #zuul21:43
*** armstrongs has joined #zuul21:50
*** armstrongs has quit IRC22:00
openstackgerritTristan Cacqueray proposed zuul/zuul master: web: add custom ANSI component implementation in ReasonML  https://review.opendev.org/76275922:42
tristanC^ PS4 adds progress bar escape code support and hide them from the console22:43
*** zenkuro has quit IRC22:50

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!