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

Darwin: inconsistencies between CI and Runtime #166

Open
shivaraj-bh opened this issue Apr 14, 2024 · 3 comments
Open

Darwin: inconsistencies between CI and Runtime #166

shivaraj-bh opened this issue Apr 14, 2024 · 3 comments

Comments

@shivaraj-bh
Copy link
Member

shivaraj-bh commented Apr 14, 2024

CI uses nix flake check, which calls the process-compose app wrapped inside pkgs.runCommand. The apps that run inside runCommand gets a few packages by default, for example readlink from coreutils. This behaviour could make the tests pass in CI but fail on runtime (when ran using nix run), if the service doesn’t pass those packages in its environment.

For more detailed analysis, see: #164 (comment)

@shivaraj-bh
Copy link
Member Author

shivaraj-bh commented Apr 14, 2024

Is it just darwin? wouldn’t it also affect linux?

Edit: So far, there hasn’t been any issue reported about the inconsistencies happening on Linux but stdenv in Linux could also have packages which the host machine will not during runtime

@srid
Copy link
Member

srid commented Apr 14, 2024

Is this something to do with sandbox being disabled by default on darwin?

@shivaraj-bh
Copy link
Member Author

Is this something to do with sandbox being disabled by default on darwin?

No, it is to do with some packages (belonging to stdenv-darwin) being present in the runCommand’s environment (making the CI pass), while not being present in the environment while nix runing the service. Leading to regressions like:

#163
#164

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants