worker-protocol: add cancelled-and-hash-mismatch-status feature#15090
worker-protocol: add cancelled-and-hash-mismatch-status feature#15090amaanq wants to merge 1 commit intoNixOS:masterfrom
Conversation
7c26fed to
145c623
Compare
Ericson2314
left a comment
There was a problem hiding this comment.
Please make a first PR that just introduces ExitStatusFlags (and does the things I mention below). Then we'll return to this one for the actual wire protocol changes using it.
|
🎉 All dependencies have been resolved ! |
d2623b4 to
0c5cd3b
Compare
0c5cd3b to
5956f56
Compare
556da11 to
e4dbc59
Compare
f48542e to
9b369ca
Compare
ce832f0 to
433911c
Compare
|
Let's just combine-in https://github.com/NixOS/nix/pull/14559/files |
f2dfbe7 to
b8b6a14
Compare
b8b6a14 to
377a372
Compare
| * Build result. | ||
| */ | ||
| BuildResult buildResult; | ||
| BuildResult buildResult = {.inner = BuildResult::Failure{BuildResult::Failure::Cancelled, ""}}; |
There was a problem hiding this comment.
N.B. tempted to just change the default status on BuildResult itself, rather than here.
377a372 to
e7bf1b1
Compare
| /// Goal was never attempted because another goal failed (and | ||
| /// `--keep-going` wasn't used). Requires the | ||
| /// `cancelled-and-hash-mismatch-status` feature; falls back to | ||
| /// `MiscFailure` when communicating with older remotes. | ||
| Cancelled, |
There was a problem hiding this comment.
This should also handle Interrupted cases right?
There was a problem hiding this comment.
I added the comment based on Eelco's PR description, I don't think handling Interrupted would make sense since it's not a BuildResult status but rather its own error that occurs on SIGINT, SIGTERM, and SIGHUP.
939aa89 to
c948def
Compare
0f6f3a6 to
abd4ec8
Compare
This commit adds a `cancelled-and-hash-mismatch-status` protocol feature that gates two new `BuildResult` failure statuses: `HashMismatch` (a specific type of `OutputRejected` for hash mismatches) and `Cancelled` (for goals never attempted because another goal failed without `--keep-going`). Goals now default to `Cancelled` status instead of `MiscFailure`. When communicating with older remotes, `HashMismatch` falls back to `OutputRejected` and `Cancelled` falls back to `MiscFailure`. Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
abd4ec8 to
0b8349c
Compare
Motivation
This commit adds a
cancelled-and-hash-mismatch-statusprotocol feature that gates two newBuildResultfailure statuses:HashMismatch(a specific type ofOutputRejectedfor hash mismatches) andCancelled(for goals never attempted because another goal failed without--keep-going). Goals now default toCancelledstatus instead ofMiscFailure. When communicating with older remotes,HashMismatchfalls back toOutputRejectedandCancelledfalls back toMiscFailure.Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.