-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Make @nix json structured build log parsing warn instead of fail (backport #11921) #12034
Conversation
(cherry picked from commit e82ff51)
Before this change, expressions like: with import <nixpkgs> {}; runCommand "foo" {} '' echo '@nix {}' >&$NIX_LOG_FD '' would result in Lix crashing, because accessing nonexistent fields of a JSON object throws an exception. Rather than handling each field individually, we just catch JSON exceptions wholesale. Since these log messages are an unusual circumstance, log a warning when this happens. Fixes #544. Change-Id: Idc2d8acf6e37046b3ec212f42e29269163dca893 (cherry picked from commit e55cd3b) (cherry picked from commit ee03fd4)
…type errors (cherry picked from commit 1485937)
…warning correctly (cherry picked from commit 03d4bfd)
(cherry picked from commit 1421420)
(cherry picked from commit f3c722c)
Cherry-pick of c783cd2 has failed:
To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
(cherry picked from commit c783cd2)
bb74914
to
180031f
Compare
That was a trivial |
This pull request has been removed from the queue for the following reason: Pull request #12034 has been dequeued. Rebase merges are not allowed on this repository.. The repository configuration doesn't allow rebase merge. The merge method configured in Mergify configuration must be allowed in the repository configuration settings.. You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. If you want to requeue this pull request, you need to post a comment with the text: |
@mergify queue |
🛑 The pull request has been removed from the queue
|
@mergify refresh |
@mergify queue |
✅ Pull request refreshed |
🛑 The pull request has been removed from the queue
|
@mergify rebase |
✅ Nothing to do for rebase action |
This pull request has been removed from the queue for the following reason: Pull request #12034 has been dequeued. Rebase merges are not allowed on this repository.. The repository configuration doesn't allow rebase merge. The merge method configured in Mergify configuration must be allowed in the repository configuration settings.. You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. If you want to requeue this pull request, you need to post a comment with the text: |
@edolstra can we get a release for this? I had to redirect people several times to this fix already. |
Motivation
A build may log with
@nix something
without the intent to write Nix structured logs, resulting in an obscure error.This makes it easy to understand and continues the build.
Example:
Context
Cherry-picked from https://gerrit.lix.systems/c/lix/+/2057
Author @lheckemann
Priorities and Process
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.
This is an automatic backport of pull request #11921 done by [Mergify](https://mergify.com).