Add improved logging around command failures#2351
Merged
Merged
Conversation
palfrey
commented
May 20, 2026
| exit_code = ?execution_result.exit_code, | ||
| stdout = ?stdout[..min(stdout.len(), 1000)], | ||
| stderr = ?stderr[..min(stderr.len(), 1000)], | ||
| command = ?command_proto.arguments, |
Member
Author
There was a problem hiding this comment.
The error was just Command returned non-zero exit code, exit_code: 1, stdout: "", stderr: "bootstrap_process_wrapper: execvp: No such file or directory\n" or similar, now we get the full command which helps debugging a lot
palfrey
commented
May 20, 2026
| let program = self.canonicalise_path(args[0], &command_proto.working_directory)?; | ||
| let program = self | ||
| .canonicalise_path(args[0], &command_proto.working_directory) | ||
| .err_tip(|| format!("Canonicalisation failure. Command={args:#?}"))?; |
Member
Author
There was a problem hiding this comment.
Error executing action, err: Error { code: NotFound, messages: ["No such file or directory (os error 2)", "Could not canonicalize path for command root /bin/bash."] } isn't very useful without knowing what was trying to invoke bash
palfrey
commented
May 20, 2026
|
|
||
| ```sh | ||
| nix run create-local-image | ||
| create-local-image |
Member
Author
There was a problem hiding this comment.
Previous command just got you error: cannot find flake 'flake:create-local-image' in the flake registries, new one actually works :)
132c0ff to
c3daa29
Compare
amankrx
approved these changes
May 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Split out from #2321, improving a couple of cases of command failure logging that I've seen while working on that.
Type of change
Please delete options that aren't relevant.
How Has This Been Tested?
bazel test //..., various local LRE testingChecklist
bazel test //...passes locallygit amendsee some docsThis change is