yast / yast-yast2

YaST module yast2
http://en.opensuse.org/Portal:YaST
GNU General Public License v2.0
55 stars 44 forks source link

need a non-curses textmode for ci #1210

Closed duanev closed 2 years ago

duanev commented 2 years ago

Concourse ci log output doesn't play well with cursor-positioning (it works, but the output gets pasted over the lines at the start of the logs). I saw linemode=1 and hoped that yast would skip curses ... but it doesn't. Tried TERM=dumb too but nothing is emitted then at all. Is this work in progress?

shundhammer commented 2 years ago

Sorry, clearly no. This would be yet another mode that would need constant maintaining. If this is only for some arcane CI system, then that CI system needs to overcome its limitations.

We do have some tests for NCurses mode, though; I'll look them up so you can check if they are suitable for your purposes as well. But be advised that such tests are very time-consuming to write and to maintain, and that by their very nature they tend to be fragile (i.e. break a lot for very minor reasons).

shundhammer commented 2 years ago

For our NCurses UI tests, see https://github.com/yast/yast-ruby-bindings/tree/master/tests/libyui.

Example test: https://github.com/yast/yast-ruby-bindings/blob/master/tests/libyui/multi_selection_box_spec.rb

On the downside, this needs quite some infrastructure; that is one reason why we had to move it to that yast-ruby-bindings source code repository. That is less than optimal, of course; it was one compromise that we had to take to get any NCurses UI tests at all.

Build-time requirements: https://github.com/yast/yast-ruby-bindings/blob/master/package/yast2-ruby-bindings.spec#L48-L53

How to run the test suite: https://github.com/yast/yast-ruby-bindings/blob/master/package/yast2-ruby-bindings.spec#L94-L100

duanev commented 2 years ago

Well... I would hardly call CI arcane, and all CI versions I know of only support dumb terminal log files. In these environments no ANSI escape sequence is appropriate. I understand it would be more work, and thus this is better as a feature request, yet "auto" tends to imply unattended, and unattended requires a way to diagnose failures after the fact (hence logs).

So here's an idea: a pipe that strips ANSI? The output won't be great, but definitely better than what we get now (scrambles logs), and it should be simple... just an idea.

On Tue, Dec 7, 2021 at 4:47 AM Stefan Hundhammer @.***> wrote:

For our NCurses UI tests, see https://github.com/yast/yast-ruby-bindings/tree/master/tests/libyui.

Example test:

https://github.com/yast/yast-ruby-bindings/blob/master/tests/libyui/multi_selection_box_spec.rb

On the downside, this needs quite some infrastructure; that is one reason why we had to move it to that yast-ruby-bindings source code repository. That is less than optimal, of course; it was one compromise that we had to take to get any NCurses UI tests at all.

Build-time requirements: https://github.com/yast/yast-ruby-bindings/blob/master/package/yast2-ruby-bindings.spec#L48-L53

How to run the test suite: https://github.com/yast/yast-ruby-bindings/blob/master/package/yast2-ruby-bindings.spec#L48-L53

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/yast/yast-yast2/issues/1210#issuecomment-987798784, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABFP2L3HYKV2AEMCZQAEKLUPXQ4HANCNFSM5JKYZBXQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

shundhammer commented 2 years ago

That would open another neverending source of trouble. Rather than pretending that we also support that scenario, we chose the honest solution: We clearly say that it's not supported.

And for unattended installations, we have AutoYaST.

duanev commented 2 years ago

Oh whoops, perhaps I didn't mention that I am using an autoyast.xml (supplied via "floopy" image). Apologies if that changes the whole conversation 😬 I fully concur, dumb terminal mode is unnecessary for non-autoyast installs

On Wed, Dec 8, 2021, 3:43 AM Stefan Hundhammer @.***> wrote:

That would open another neverending source of trouble. Rather than pretending that we also support that scenario, we chose the honest solution: We clearly say that it's not supported.

And for unattended installations, we have AutoYaST.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/yast/yast-yast2/issues/1210#issuecomment-988653697, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABFP2JULUB5ZRULYQPPZFDUP4SE7ANCNFSM5JKYZBXQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.