The judge init installs is no longer replaced by the leader's own
CI / test (push) Successful in 5m27s
CI / test (push) Successful in 5m27s
Found on a fresh HA install with a judge machine: the leader saw the policy's judge missing while init was still fetching it, served one itself, and its entry replaced init's, so a second judge ran off the judge machine. The keeper now waits ten minutes after it starts, and a serve job it starts gives way to a model added meanwhile (AddNew). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
34764f5ef0
commit
314cc5e6a3
9 files changed
+131
-2
No files matched your search
@@ -452,3 +452,26 @@ func TestAJudgeIsServedWithTheMemoryAskedAndNoPromptCache(t *testing.T) {
|
||||
t.Error("a model that is not a judge lost its prompt cache")
|
||||
}
|
||||
}
|
||||
|
||||
// takenCatalog has the model by the time a job comes to add it.
|
||||
type takenCatalog struct{ fakeCatalog }
|
||||
|
||||
func (c *takenCatalog) AddNew(context.Context, catalog.Model, string) error {
|
||||
return fmt.Errorf("model %q: %w", "x", catalog.ErrExists)
|
||||
}
|
||||
|
||||
func TestAJobAddingOnlyIfAbsentGivesWayToAModelAddedMeanwhile(t *testing.T) {
|
||||
files := []hf.File{{Path: "Qwen3Guard-Gen-0.6B-Q8_0.gguf", Bytes: 600 << 20, SHA256: "aa"}}
|
||||
s, _, _, _ := setup(t, files, nil)
|
||||
taken := &takenCatalog{}
|
||||
s.deps.Catalog = taken
|
||||
job, err := s.Start(Request{Repo: "example/Qwen3Guard-Gen-0.6B-GGUF", File: "Qwen3Guard-Gen-0.6B-Q8_0.gguf",
|
||||
GuardFormat: "qwen3guard", CPU: true, CPUCores: 2, MemoryGB: 2, Replicas: 2, IfAbsent: true})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
j := wait(t, s, job.ID)
|
||||
if j.State != Done || len(taken.added) != 0 {
|
||||
t.Errorf("job %s, added %d: %+v", j.State, len(taken.added), j.Steps)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user