Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

devenv tasks test fails on aarch64 Linux #977

Closed
qkaiser opened this issue Oct 7, 2024 · 3 comments
Closed

devenv tasks test fails on aarch64 Linux #977

qkaiser opened this issue Oct 7, 2024 · 3 comments
Labels
bug Something isn't working dependencies Pull requests that update a dependency file

Comments

@qkaiser
Copy link
Contributor

qkaiser commented Oct 7, 2024

Our Build Nix workflow is failing with these exceptions when built for aarch64 Linux :

nix build -L --option system aarch64-linux --extra-platforms aarch64-linux .#packages.aarch64-linux.devenv
--snip--
devenv> test tasks::test::test_dependency_failure ... ok
devenv> test tasks::test::test_nonexistent_script ... FAILED
devenv> test tasks::test::test_shell_escape ... ok
devenv> test tasks::test::test_inputs_outputs ... ok
devenv> test tasks::test::test_status_without_command ... ok
devenv> test tasks::test::test_task_name ... ok
devenv> test tasks::test::test_tasks_cycle ... ok
devenv> test tasks::test::test_status ... ok
devenv> test tasks::test::test_basic_tasks ... ok
devenv> test tasks::test::test_before_tasks ... ok
devenv> failures:
devenv> ---- tasks::test::test_nonexistent_script stdout ----
devenv> thread 'tasks::test::test_nonexistent_script' panicked at devenv/src/tasks.rs:1106:9:
devenv> assertion failed: `(left matches right)`
devenv> Diff < left / right > :
devenv> <[
devenv> <    (
devenv> <        "myapp:task_1",
devenv> <        Completed(
devenv> <            Failed(
devenv> <                3.552045ms,
devenv> <                TaskFailure {
devenv> <                    stdout: [],
devenv> <                    stderr: [],
devenv> <                    error: "Task exited with status: exit status: 127",
devenv> <                },
devenv> <            ),
devenv> <        ),
devenv> <    ),
devenv> <]
devenv> >[(task_1,
devenv> >TaskStatus::Completed(TaskCompleted::Failed(_, TaskFailure {
devenv> >stdout: _, stderr: _, error })))]
devenv> >if
devenv> >error == "No such file or directory (os error 2)" && task_1 == "myapp:task_1"
devenv> note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
devenv> failures:
devenv>     tasks::test::test_nonexistent_script
devenv> test result: FAILED. 14 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.68s
devenv> error: test failed, to rerun pass `-p devenv --lib`
error: builder for '/nix/store/q5id3zg5526rwna2f44l70dcn2r3ir4h-devenv-1.3.drv' failed with exit code 101;
       last 10 log lines:
       >
       > note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
       >
       >
       > failures:
       >     tasks::test::test_nonexistent_script
       >
       > test result: FAILED. 14 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.68s
       >
       > error: test failed, to rerun pass `-p devenv --lib`
       For full logs, run 'nix log /nix/store/q5id3zg5526rwna2f44l70dcn2r3ir4h-devenv-1.3.drv'.

There's no mention of this on the devenv issue tracker. Not sure if the problem is coming from devenv or the action runner itself.

@qkaiser qkaiser added the bug Something isn't working label Oct 7, 2024
@qkaiser
Copy link
Contributor Author

qkaiser commented Oct 7, 2024

In a nutshell, a task with an inexistent script should raise a "No such file or directory (os error 2)" error message, but it raises "Task exited with status: exit status: 127" instead on aarch64.

127 being the status code for command not found.

@vlaci I think it should be reported to devenv, right ?

@qkaiser qkaiser added the dependencies Pull requests that update a dependency file label Oct 7, 2024
@vlaci
Copy link
Contributor

vlaci commented Oct 7, 2024

In a nutshell, a task with an inexistent script should raise a "No such file or directory (os error 2)" error message, but it raises "Task exited with status: exit status: 127" instead on aarch64.

127 being the status code for command not found.

@vlaci I think it should be reported to devenv, right ?

Devenv's using an old pinned nixpkgs, so the issue won't pop-up for regular users.

I've made a PoC to allow updating it, which was picked up by the maintainers there cachix/devenv#1489

Unfortunately there are other cases, where it doesn't work correctly. I look into it.

@vlaci
Copy link
Contributor

vlaci commented Oct 7, 2024

The more interesting part is, how the build passed before and why does it fail now? 🤔

EDIT: I see it didn't work before, it was not a required status check 🤦

Nevertheless, added a workaround at cb09f38

@vlaci vlaci mentioned this issue Oct 7, 2024
@qkaiser qkaiser closed this as completed Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

2 participants