hledger icon indicating copy to clipboard operation
hledger copied to clipboard

hledger-web tests fail on stackage

Open simonmichael opened this issue 1 year ago • 4 comments

With setupTerm: Couldn't look up terminfo entry "unknown". Something to do with terminal helpers in Hledger.Utils.IO ?

https://github.com/commercialhaskell/lts-haskell/commit/1342c798114a09c49d87a59d25609fbe16098907

simonmichael avatar Jan 18 '24 23:01 simonmichael

(thanks for filing, in the end I hesitated since I wondered if it's a problem on the stackage server env)

juhp avatar Jan 19 '24 03:01 juhp

@juhp: when you have time could you clarify when you see this terminfo "unknown" error, with hledger-web tests ?

I failed to reproduce it with https://github.com/commercialhaskell/stackage/pull/7413.

simonmichael avatar May 10 '24 20:05 simonmichael

Notes: hledger-lib's test suite seems currently disabled in stackage (because of issues running doctest). hledger-ui doesn't have a test suite. hledger-web's test suite is the only one using hspec. Most hledger packages import from transitively, even if they don't use, these three terminal-related packages: ansi-terminal, terminal-size, terminfo. Test runners also interact with the terminal.

simonmichael avatar May 12 '24 02:05 simonmichael

Pausing this issue in favour of https://github.com/commercialhaskell/stackage/pull/7413

simonmichael avatar May 14 '24 05:05 simonmichael

Unfortunately the situation remains unchanged:

Running tests for hledger-web 1.33.1, linux-x86_64
test: setupTerm: Couldn't look up terminfo entry "unknown"

alaendle avatar May 22 '24 18:05 alaendle

Okay - pretty sure we just depend on https://packages.ubuntu.com/jammy/ncurses-term to get the "unknown" terminfo ... will re-run with installed package ... and keep you up-to-date ...

alaendle avatar May 22 '24 18:05 alaendle

Hmm - doesn't seem to solve the problem - need to dive deeper ... maybe tomorrow ... (temporarily?) re-disabled tests ... any idea/hint welcome ...

alaendle avatar May 22 '24 19:05 alaendle

I've tried to reproduce this inside the build container - without success - so my best guess is that this has to do with the user things happening here: https://github.com/commercialhaskell/stackage/blob/770b1939dc1784b0484b7f6aeb102c65a1f9cb25/automated/build.sh#L145 But I even tried to mimic this inside the container by creating another user and running nice -n 15 /bin/bash -c "chown other $HOME && exec sudo -E -u other env \"HOME=$HOME\" \"PATH=\$PATH\" ./verify-package hledger-web 2>&1" - but even this succeeds. So at least I have no idea what could be done with justifiable effort - so my suggestion would be to accept the test failure on stackage (as long it doesn't effect more packages) and close this issue without a solution.

alaendle avatar May 23 '24 09:05 alaendle

Thank you @alaendle. Closing for now per this and the discussion on https://github.com/commercialhaskell/stackage/pull/7413.

simonmichael avatar May 23 '24 17:05 simonmichael