The writers of findings give the seat's time.Time (artifact-store-tools, distribution, gitea, mesh-config; B5d; ADR 0634; issue 1966)
Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i
This commit is contained in:
@@ -948,8 +948,8 @@ func imageMissing(node, module, image string, at time.Time) meshconditions.Findi
|
||||
"was not sent to %s. What runs there is untouched, and the rest of %s is sent as usual.", module, node, node),
|
||||
Needs: fmt.Sprintf("build %s again; the details name the image.", module),
|
||||
Resolved: "Resolved: the store holds the image of " + module + " again",
|
||||
Evidence: []meshconditions.Evidence{{At: at.UTC().Format(time.RFC3339Nano), Said: "image " + image + " is not in the store"}},
|
||||
Source: "S25", Observer: Module, At: at.UTC().Format(time.RFC3339Nano)}
|
||||
Evidence: []meshconditions.Evidence{{At: at.UTC(), Said: "image " + image + " is not in the store"}},
|
||||
Source: "S25", Observer: Module, At: at.UTC()}
|
||||
}
|
||||
|
||||
func capital(s string) string {
|
||||
|
||||
@@ -13,7 +13,6 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"git.novox.be/novox/mesh-contracts/health-and-repair/go/clients/meshconditionsclient"
|
||||
meshconditions "git.novox.be/novox/mesh-contracts/health-and-repair/go/seats/meshconditions"
|
||||
@@ -124,8 +123,8 @@ func (h *Holder) sweepFinding(what string, err error) {
|
||||
"refused one of its asks, so it stopped before anything more was removed; what it kept stays kept.",
|
||||
Needs: "read the seat holder's journal for the refusal; the next sweep asks again.",
|
||||
Resolved: "Resolved: the artifact sweep ran through without a refusal",
|
||||
Evidence: []meshconditions.Evidence{{At: at.UTC().Format(time.RFC3339Nano), Said: fmt.Sprintf("%s: %v", what, err)}},
|
||||
Source: "CAT-AS1", Observer: Module, At: at.Format(time.RFC3339Nano)}
|
||||
Evidence: []meshconditions.Evidence{{At: at.UTC(), Said: fmt.Sprintf("%s: %v", what, err)}},
|
||||
Source: "CAT-AS1", Observer: Module, At: at}
|
||||
if werr := h.Bus.Put(FindingsState, sweepFindingKey, f); werr != nil {
|
||||
h.logf("the sweep's finding (%s: %v) could not be written: %v", what, err, werr)
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ func finding(kind, subject, words string, raised bool) {
|
||||
f := meshconditions.FindingsByKeyValue{V: meshconditionsclient.FindingVersion, Key: key, Kind: kind, Ref: key[strings.LastIndex(key, ".")+1:],
|
||||
Subject: meshconditions.Subject{Scope: meshconditionsclient.ScopeSeat, ID: "distribution"}, Severity: meshconditionsclient.Warning,
|
||||
Summary: words, Headline: words, Explanation: words, Resolved: "cleared once it no longer holds",
|
||||
Source: kind, Observer: "distribution", At: time.Now().UTC().Format(time.RFC3339Nano)}
|
||||
Source: kind, Observer: "distribution", At: time.Now().UTC()}
|
||||
if _, err := stdio.State(meshconditions.StateFindings).Put(key, f); err != nil {
|
||||
logf("the finding %s could not be written: %v", key, err)
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ func findingsKV(kv jetstream.KeyValue, logf func(string, ...any)) func(kind, sub
|
||||
f := meshconditions.FindingsByKeyValue{V: meshconditionsclient.FindingVersion, Key: key, Kind: kind, Ref: key[strings.LastIndex(key, ".")+1:],
|
||||
Subject: meshconditions.Subject{Scope: meshconditionsclient.ScopeSeat, ID: holder.Self}, Severity: meshconditionsclient.Warning,
|
||||
Summary: words, Headline: words, Explanation: words + "; registry_old_name or registry_direct_writes drops a retired node by hand",
|
||||
Resolved: "cleared when the window closes", Source: kind, Observer: holder.Self, At: time.Now().UTC().Format(time.RFC3339Nano)}
|
||||
Resolved: "cleared when the window closes", Source: kind, Observer: holder.Self, At: time.Now().UTC()}
|
||||
b, _ := json.Marshal(f)
|
||||
if _, err := kv.Put(ctx, key, b); err != nil {
|
||||
logf("the finding %s could not be written: %v", key, err)
|
||||
|
||||
@@ -259,7 +259,7 @@ func finding(kind, subject, words string, raised bool) {
|
||||
f := meshconditions.FindingsByKeyValue{V: meshconditionsclient.FindingVersion, Key: key, Kind: kind, Ref: key[strings.LastIndex(key, ".")+1:],
|
||||
Subject: meshconditions.Subject{Scope: meshconditionsclient.ScopeSeat, ID: packageseats.Self}, Severity: meshconditionsclient.Warning,
|
||||
Summary: words, Headline: words, Explanation: words, Resolved: "cleared once it no longer holds",
|
||||
Source: kind, Observer: packageseats.Self, At: time.Now().UTC().Format(time.RFC3339Nano)}
|
||||
Source: kind, Observer: packageseats.Self, At: time.Now().UTC()}
|
||||
if _, err := stdio.State(meshconditions.StateFindings).Put(key, f); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "the finding %s could not be written: %v\n", key, err)
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ func finding(kind, module, node, ref, summary, headline, explanation, needs, res
|
||||
Subject: meshconditions.Subject{Scope: meshconditionsclient.ScopeModule, ID: id, Machine: node},
|
||||
Severity: meshconditionsclient.Warning, Resolver: meshconditionsclient.ResolverOperator, Summary: summary, Headline: headline,
|
||||
Explanation: explanation, Needs: needs, Resolved: resolved,
|
||||
Evidence: []meshconditions.Evidence{{At: at.UTC().Format(time.RFC3339Nano), Said: said}}, Source: "config", Observer: Module, At: at.UTC().Format(time.RFC3339Nano)}
|
||||
Evidence: []meshconditions.Evidence{{At: at.UTC(), Said: said}}, Source: "config", Observer: Module, At: at.UTC()}
|
||||
}
|
||||
|
||||
// renameRefused is the finding of a move mesh-config refused.
|
||||
|
||||
Reference in New Issue
Block a user