diff --git a/modules/mesh-delivery-checker/internal/check/checker.go b/modules/mesh-delivery-checker/internal/check/checker.go index c6d5fa60..ebe06713 100644 --- a/modules/mesh-delivery-checker/internal/check/checker.go +++ b/modules/mesh-delivery-checker/internal/check/checker.go @@ -222,6 +222,9 @@ func (ch *Checker) Wait() { ch.wg.Wait() } // Candidate takes one value of the indexer's candidates bucket in (the key is the group) and checks it if it is to be // checked. A value that is not a candidate is said and left. func (ch *Checker) Candidate(ctx context.Context, key string, value []byte) { + if meshcatalogclient.IsTryGroup(key) { + return // a try's candidate is judged by its try (Tryer), never as a pull request's check: judged twice, the engines were asked twice + } ch.init() c, err := meshcatalog.DecodeCandidatesByGroupValue(value) if err != nil { diff --git a/modules/mesh-delivery-checker/internal/check/checker_test.go b/modules/mesh-delivery-checker/internal/check/checker_test.go index 3ead2d80..e644894b 100644 --- a/modules/mesh-delivery-checker/internal/check/checker_test.go +++ b/modules/mesh-delivery-checker/internal/check/checker_test.go @@ -157,6 +157,12 @@ func TestACandidateNotYetCheckedGetsItsVerdictKeyCreatedOnceAndIsJudged(t *testi if j.count() != 1 { t.Errorf("judged %d times after the same candidate again, want once", j.count()) } + // The candidate of a whole try's group is the try's: the try judges it, never the checker as a pull request's check. + r.ch.Candidate(ctx, "try-1793913602402800439", candidateOf(t, "try-1793913602402800439", pullOf(repoA, 7, head1))) + r.ch.Wait() + if j.count() != 1 { + t.Errorf("a try's candidate was judged as a check: %d judgments, want one", j.count()) + } } // racyKV lets another instance create the key just before this one's create.