internal/report: strict-exempt severity
All checks were successful
Test / Create distribution (push) Successful in 1m5s
Test / Sandbox (push) Successful in 2m47s
Test / Hakurei (push) Successful in 3m51s
Test / ShareFS (push) Successful in 3m49s
Test / Sandbox (race detector) (push) Successful in 5m30s
Test / Hakurei (race detector) (push) Successful in 6m29s
Test / Flake checks (push) Successful in 1m40s

For reportable but inconsequential errors like modprobe by MODALIAS failures.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-05-27 18:53:15 +09:00
parent b18f40d974
commit 598c7aa30f

View File

@@ -15,8 +15,10 @@ import (
)
const (
// Trivial denotes an error that may happen frequently under normal operation.
Trivial = iota
// Inconsistent denotes an error diagnosed due to inconsistent state.
Inconsistent = iota
Inconsistent
// Degraded denotes an error condition causing a degraded state.
Degraded
// Fatal denotes an unrecoverable error. This is generally followed by
@@ -88,6 +90,8 @@ func (e Error) MarshalJSON() (data []byte, err error) {
}{Message: e.Message}
switch e.Severity {
case Trivial:
v.Severity = "trivial"
case Inconsistent:
v.Severity = "inconsistent"
case Degraded:
@@ -162,11 +166,11 @@ func (r *Reporter) dispatch(severity int, message string, e error) (err error) {
err = _err
}
r.mu.Unlock()
} else if flag&DBypassEarly == 0 {
} else if flag&DBypassEarly == 0 && severity != Trivial {
panic(p)
}
if flag&DStrict != 0 {
if flag&DStrict != 0 && severity != Trivial {
panic(p)
}