*** dmsimard has joined #zuul | 00:32 | |
*** bhavikdbavishi has joined #zuul | 02:54 | |
*** Goneri has quit IRC | 02:55 | |
*** bhavikdbavishi1 has joined #zuul | 02:57 | |
*** bhavikdbavishi has quit IRC | 02:58 | |
*** bhavikdbavishi1 is now known as bhavikdbavishi | 02:58 | |
*** bhavikdbavishi has quit IRC | 04:17 | |
*** bhavikdbavishi has joined #zuul | 04:45 | |
*** bhavikdbavishi1 has joined #zuul | 05:22 | |
*** bhavikdbavishi has quit IRC | 05:24 | |
*** bhavikdbavishi1 is now known as bhavikdbavishi | 05:24 | |
*** evrardjp has quit IRC | 05:33 | |
*** evrardjp has joined #zuul | 05:33 | |
*** bhavikdbavishi1 has joined #zuul | 05:41 | |
*** bhavikdbavishi has quit IRC | 05:43 | |
*** bhavikdbavishi1 is now known as bhavikdbavishi | 05:43 | |
*** bhavikdbavishi has quit IRC | 06:28 | |
*** sean-k-mooney1 has joined #zuul | 08:16 | |
*** sean-k-mooney has quit IRC | 08:18 | |
*** zbr has joined #zuul | 08:45 | |
*** bhavikdbavishi has joined #zuul | 12:20 | |
*** tosky has joined #zuul | 13:00 | |
*** iurygregory has quit IRC | 13:13 | |
*** iurygregory has joined #zuul | 13:30 | |
*** bhavikdbavishi has quit IRC | 13:46 | |
*** polls45 has joined #zuul | 14:02 | |
*** avass has quit IRC | 14:08 | |
*** yourname_ has joined #zuul | 14:09 | |
*** yourname_ has quit IRC | 14:14 | |
*** yourname_ has joined #zuul | 14:15 | |
*** ikhan has quit IRC | 14:41 | |
*** iurygregory has quit IRC | 15:22 | |
*** bhavikdbavishi has joined #zuul | 15:46 | |
*** bhavikdbavishi has quit IRC | 15:56 | |
*** bhavikdbavishi has joined #zuul | 16:02 | |
openstackgerrit | Tristan Cacqueray proposed zuul/zuul master: WIP: web: add custom Ansi component implementation in ReasonML https://review.opendev.org/762759 | 16:07 |
---|---|---|
tristanC | we 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 |
openstackgerrit | Tristan Cacqueray proposed zuul/zuul master: WIP: web: add custom Ansi component implementation in ReasonML https://review.opendev.org/762759 | 16:22 |
*** bhavikdbavishi1 has joined #zuul | 16:43 | |
*** bhavikdbavishi has quit IRC | 16:45 | |
*** bhavikdbavishi1 is now known as bhavikdbavishi | 16:45 | |
*** Goneri has joined #zuul | 16:45 | |
*** bhavikdbavishi has quit IRC | 18:53 | |
*** iurygregory has joined #zuul | 19:26 | |
*** tosky has quit IRC | 20:05 | |
openstackgerrit | Albin Vass proposed zuul/zuul master: Add job node to components graph. https://review.opendev.org/762767 | 20:15 |
zbr | tristanC: what level of ansi support to expect? | 20:21 |
fungi | i 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 cetera | 20:24 |
fungi | oh also i blink is unnecessary (and likely to be annoying if anything did try to use it) | 20:25 |
openstackgerrit | Tristan Cacqueray proposed zuul/zuul master: WIP: web: add custom Ansi component implementation in ReasonML https://review.opendev.org/762759 | 20:26 |
fungi | reverse and 8-color background palette support might be useful | 20:26 |
fungi | concealed is probably pointless, as is key remapping | 20:27 |
tristanC | zbr: i only implemented basic 4bit color and bold/italic mode. | 20:27 |
fungi | 4-bit color is 3-bit color plus bold bit though, right? | 20:28 |
tristanC | fungi: the extra bits is often defined as "bright", bold is usualy set as [01m | 20:29 |
zbr | tristanC: i have particular love for the react-ansi library but ANSI support is much more complex than 3-4 bit even. | 20:30 |
fungi | usually 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 change | 20:30 |
zbr | but it should be fine for 99% of what we can expect to be used in practice | 20:30 |
zbr | in the end we used to have 0% ANSI support till Friday | 20:31 |
tristanC | fungi: i would support for \r too, to skip intermediary lines, for example curl status progress | 20:31 |
zbr | i would have preffered to make use of an existing library | 20:32 |
fungi | tristanC: the only terminals i'm familiar with treat [01m as "bright" in 16-color mode or "bold" in 8-color mode | 20:32 |
fungi | (depending on what color and/or font support they had) | 20:32 |
tristanC | and 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 codebase | 20:32 |
zbr | yep, moving cursor back is used by multiple tools that display progress | 20:32 |
fungi | if delete/movement/overstrike are going to be supported, presumably it's sufficient to calculate their end state and not try to step through/animate them | 20:34 |
fungi | ansi 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 context | 20:35 |
zbr | yep, this would ideal "render the final" so inside the logs we would not have anything more than ANSI styling. | 20:36 |
zbr | nobody expect to support moving the cursor to another line | 20:36 |
zbr | but expect that at some point we will want to render final result that happens on a single line | 20:37 |
zbr | probably most tools are already disabling "animations" when not used on a pure terminal so we are unlikely to get into problems | 20:37 |
fungi | especially since the html output has effectively infinite rows so relative screen geometry isn't like on a real terminal | 20:38 |
zbr | the 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 |
fungi | sane tools omit ansi escapes if stdin is not a tty | 20:40 |
zbr | yep, 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 |
fungi | or rows | 20:41 |
fungi | columns can theoretically be calculated based on font pitch and browser geometry | 20:41 |
zbr | true, but you can enable them with env vars. still enabling colors does not mean you enable the advanced stuff too. | 20:41 |
zbr | terminals 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 |
zbr | but if we go into problems we can use a hardcoded value that produce decent results. | 20:43 |
tristanC | zbr: would you have examples of console log that does not render in zuul ui? | 20:43 |
zbr | nope | 20:43 |
zbr | i 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 |
zbr | and at this moment I do not have. | 20:44 |
zbr | the tools I know, make use only of basic 3-4 bit coloring features. | 20:44 |
tristanC | zbr: yeah, as fungi said, cli usually checks for tty before using ansi code | 20:45 |
zbr | which means at leas at this moment we will not start seeing colors without someone deliberately enabling them | 20:45 |
tristanC | and i'm surprised we added react-ansi in the first place, as zuul job task shouldn't have a tty | 20:45 |
zbr | and when they do, they will be able to evaluate the results. | 20:45 |
zbr | i 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 |
tristanC | zbr: what do you mean by rendering engine? | 20:49 |
fungi | yes, 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 of | 20:49 |
zbr | my initial implementation was using ansi2react which had bad performance, i switched to react-ansi after as it was much faster. | 20:50 |
fungi | also 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 both | 20: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 avass | 20:52 | |
avass | I need to set up my nick correctly :) | 20:53 |
avass | THe logs that produces is always horrible to look at | 20:53 |
tristanC | avass: would you know how to reproduce the output in opendev? | 20:54 |
tristanC | i only used https://zuul.opendev.org/t/zuul/build/e92490099f6f460f872e3a35942dee0b/console#3/0/13/ubuntu-bionic to check my implementation | 20:55 |
fungi | my 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 work | 20:55 |
fungi | https://review.opendev.org/762363 | 20: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 | |
fungi | oh, though i now see one problem with that change. i'll restore and update it | 20:56 |
avass | I think it's coming from cmake so it should be enough to force that to use colors | 20:56 |
avass | I've barely touched cmake myself though | 20:57 |
zbr | i used cmake in the past, not so bad. | 20:57 |
openstackgerrit | Jeremy Stanley proposed zuul/zuul master: DNM: ANSI Color Test https://review.opendev.org/762363 | 20:58 |
*** zenkuro has joined #zuul | 20:58 | |
tristanC | and here is how it looks with the proposed Ansi.re in zuul ui: https://i.imgur.com/mnKPHHM.png | 20:58 |
avass | fungi: heh :) | 20:58 |
zbr | fungi: lets use that change to build a good ansi testing sequence. can I add new stuff tomorrow if I find? | 20:58 |
zbr | we can get some goo sample.ans file, but only from real world tools using CI | 20:59 |
fungi | zbr: absolutely! feel free to revise 762363 with whatever trivial examples seem useful | 20:59 |
zbr | we don't need to render video in ANSI | 20:59 |
zbr | i will do some captures, like ansible, and other tools we all use. | 21:00 |
avass | tristanC: I can take a look at it tomorrow and see if I can set up a minimal example for it though | 21:00 |
fungi | my previous iteration on 762363 did manage to run the ls example and did not appear to include ansi escapes even though color was forced | 21:01 |
fungi | but hopefully the direct echo of escapes will fire when it runs this time | 21:01 |
zbr | btw, please remember to reply to my message around UX changes for summary page, http://lists.zuul-ci.org/pipermail/zuul-discuss/2020-November/001393.html | 21:02 |
zbr | i am curious about A-E changes, which ones are likes or disliked. | 21:02 |
avass | I would guess it comes from this: https://cmake.org/cmake/help/v3.0/variable/CMAKE_COLOR_MAKEFILE.html | 21:06 |
fungi | yep, the echo did get colorized | 21:06 |
fungi | https://013466c23682e65bfda5-2d3a3f9d742fc77cdc67c9dcee096957.ssl.cf2.rackcdn.com/739444/7/check/zuul-build-dashboard-opendev/049c887/npm/html/ | 21:06 |
fungi | browse 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 task | 21:07 |
zbr | as 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 |
tristanC | i 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 interested | 21:07 |
fungi | it's interesting that a command task containing `bash -c 'ls -l --color=always /'` doesn't get ansi color | 21:08 |
fungi | but the `bash -c 'echo -e "\E[31mr\E[32ma\E[33mi\E[34mn\E[35mb\E[36mo\E[37mw\E[0m"'` task worked | 21:08 |
avass | I wonder why, both --color and --color=always works for me | 21:13 |
fungi | --color is synonymous with --color=always according to the manpage for gnu ls on my system | 21:17 |
fungi | i was just being pedantic | 21:17 |
*** sean-k-mooney1 has quit IRC | 21:37 | |
*** sean-k-mooney1 has joined #zuul | 21:43 | |
*** armstrongs has joined #zuul | 21:50 | |
*** armstrongs has quit IRC | 22:00 | |
openstackgerrit | Tristan Cacqueray proposed zuul/zuul master: web: add custom ANSI component implementation in ReasonML https://review.opendev.org/762759 | 22:42 |
tristanC | ^ PS4 adds progress bar escape code support and hide them from the console | 22:43 |
*** zenkuro has quit IRC | 22:50 |
Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!