Fix blatantly broken daemon version detection code in testsuite #324

Closed
opened 2024-05-18 04:05:19 +00:00 by jade · 3 comments
Owner

Stop parsing nix --version output ;-; wowie

This version pulling returns "like", which is uhhh veeeery wrong.

isDaemonNewer () {
[[ -n "${NIX_DAEMON_PACKAGE:-}" ]] || return 0
local requiredVersion="$1"
local daemonVersion=$($NIX_DAEMON_PACKAGE/bin/nix daemon --version | cut -d' ' -f3)
[[ $(nix eval --expr "builtins.compareVersions ''$daemonVersion'' ''$requiredVersion''") -ge 0 ]]
}

Stop parsing nix --version output ;-; wowie This version pulling returns "like", which is uhhh veeeery wrong. https://git.lix.systems/lix-project/lix/src/commit/e9ca5c92d2b3fdda27ff194869268562c237b043/tests/functional/common/vars-and-functions.sh.in#L146-L151
jade added the
testing
bug
E/easy
E/help wanted
labels 2024-05-18 04:05:19 +00:00
Owner

Hang on, how is this currently not causing CI to fail??

Hang on, how is this currently not causing CI to fail??
Author
Owner

dont wanna know, this code is totally hosed.

dont wanna know, this code is *totally* hosed.
Member

This issue was mentioned on Gerrit on the following CLs:

  • commit message in cl/1417 ("tests: fix daemon version in isDaemonNewer function")
<!-- GERRIT_LINKBOT: {"cls": [{"backlink": "https://gerrit.lix.systems/c/lix/+/1417", "number": 1417, "kind": "commit message"}], "cl_meta": {"1417": {"change_title": "tests: fix daemon version in isDaemonNewer function"}}} --> This issue was mentioned on Gerrit on the following CLs: * commit message in [cl/1417](https://gerrit.lix.systems/c/lix/+/1417) ("tests: fix daemon version in isDaemonNewer function")
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#324
No description provided.