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

Some PRs trigger: code: 2, kind: NotFound, message: "No such file or directory" #446

Closed
doronbehar opened this issue Apr 3, 2020 · 3 comments · Fixed by #449
Closed

Comments

@doronbehar
Copy link
Contributor

I see this error on several PRs with seemingly OK syntax:

Failed during the setup of executing nix-env: Os { code: 2, kind: NotFound, message: "No such file or directory" }

Examples:

If the PRs themselves have something wrong with them, I think at least the error message could be better?

@doronbehar
Copy link
Contributor Author

There's also this error coming out for me.

@cole-h
Copy link
Member

cole-h commented Apr 3, 2020

This is because ofborg currently propagates IO errors with little-to-no context. The problematic function could be one of these two:

fn place_nix(&self) -> Result<(), std::io::Error> {

fn remove_nix(&self) -> Result<(), std::io::Error> {

because any std::io::Error gets transformed to the local Error enum via this line:

Error::Io(e) => format!("Failed during the setup of executing nix-env: {:?}", e),

losing all context. I'm working on a PR for this that should give more context, like what operation actually failed (was it creating the file? Removing it? Writing to it?), but I don't know what other information would be helpful, or even if that other information could be displayed.


The internal error tag is when something goes really wrong inside ofborg. Currently, Graham manually removes these (in order to allow himself to investigate the cause, first). Assuming it evals + builds, I would say don't worry about it (unless someone else says otherwise).

@cole-h
Copy link
Member

cole-h commented Apr 4, 2020

The root cause appears to be: if the nix invocation fails (like when evaluating), the stats file won't be created (example log: https://gist.github.com/GrahamcOfBorg/9dfb034692a8b8397c6bdc476c6910ec). My follow-up PR at #449 demotes this to a logged warning, and should let it get to the point where ofborg reports an actual evaluation error.

EDIT: If this resurfaces, feel free to re-open or open a new issue and ping me. I'll look into it.

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

Successfully merging a pull request may close this issue.

2 participants