-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Error messages should be better #6
Comments
TBH the errors I encountered in this were not hard to comprehend or anything. It was just not straightforward to me how to handle the transition to Your comment is super helpful though 🙌 |
Just opened NixOS/nixpkgs#292214 to document recommendations for adding new package versions And there's NixOS/nixpkgs#290743 to improve other error messages |
pkgs/by-name
error messages should be better
I was a little curious to do some analysis on failed runs of the Here's a way to download the logs of the failed runs using Github cli: run from the gh run list --workflow=check-by-name.yml --status=failure --json databaseId --limit 1000 |
jq -r '.[] | .databaseId' |
xargs -P 4 -I{} sh -c '
echo "Processing run ID {}..."
gh run view {} --log-failed > "run_{}.log"
' Note it's important to be aware of the rate limit of the Github API, you can check it by running: ❯ gh api rate_limit | jq '.rate'
{
"limit": 5000,
"used": 1,
"remaining": 4999,
"reset": 1713159188
} My initial testing was with I changed it to ❯ gh api rate_limit | jq '.rate'
{
"limit": 5000,
"used": 3013,
"remaining": 1987,
"reset": 1713159188
} ResultsI moved the logs to a separate directory and removed the empty logs: ❯ mkdir -p ~/check-by-name-failed
❯ mv run_* ~/check-by-name-failed
❯ cd ~/check-by-name-failed
❯ ls *.log -l | wc -l
1000
❯ find . -name "*.log" -type f -empty -delete
❯ ls *.log -l | wc -l
984 nix eval errors❯ mkdir -p ~/processed
❯ rg -l "nix-instantiate" | wc -l
319
❯ rg -l "nix-instantiate" | xargs -I {} mv {} ~/processed
❯ rg -l "Nix evaluation failed for some package" | wc -l
38
❯ rg -l "Nix evaluation failed for some package" | xargs -I {} mv {} ~/processed Seems to be 357 logs that relate to nix eval errors which makes sense to me. Actually, I might have screwed up somewhere? After processing more logs I found new top-level packages❯ rg -l "top-level package" | wc -l
314
❯ rg -l "top-level package" | xargs -I {} mv {} ~/processed Github error limit❯ rg -l "Not retrying anymore, probably GitHub is having internal issues" | wc -l
132
❯ rg -l "Not retrying anymore, probably GitHub is having internal issues" | xargs -I {} mv {} ~/processed missing package.nix file❯ rg -l "Missing required \"package.nix\" file" | wc -l
41
❯ rg -l "Missing required \"package.nix\" file" | xargs -I {} mv {} ~/processed must be defined like❯ rg -l "must be defined like" | wc -l
44
❯ rg -l "must be defined like" | xargs -I {} mv {} ~/processed example of multiple similar errors in a single file:
rnix errors❯ rg -l rnix | wc -l
24
❯ rg -l rnix | xargs -I {} mv {} ~/processed Note: I did not finish processing and categorizing all log files. The above are the largest categories. |
This is a great data driven approach to improving the errors. Thanks for documenting your process, @willbush! |
It should be better explained what people can do when certain CI errors occur. I'm currently manually writing comments like this:
And I shouldn't have to if CI errors were better and ideally linked to more thorough documentation :)
The text was updated successfully, but these errors were encountered: