• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

opendefensecloud / solution-arsenal / 23816144397

31 Mar 2026 07:43PM UTC coverage: 71.48% (-0.1%) from 71.608%
23816144397

Pull #338

github

web-flow
Merge 3e3a19987 into 75215b1ab
Pull Request #338: feat: reworked rendertask to be a clusterwide ressource, modified tes…

91 of 112 new or added lines in 5 files covered. (81.25%)

20 existing lines in 4 files now uncovered.

2178 of 3047 relevant lines covered (71.48%)

29.82 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

66.67
/pkg/controller/predicates.go
1
// Copyright 2026 BWI GmbH and Solution Arsenal contributors
2
// SPDX-License-Identifier: Apache-2.0
3

4
package controller
5

6
import (
7
        apiequality "k8s.io/apimachinery/pkg/api/equality"
8
        "sigs.k8s.io/controller-runtime/pkg/event"
9
        "sigs.k8s.io/controller-runtime/pkg/predicate"
10

11
        solarv1alpha1 "go.opendefense.cloud/solar/api/solar/v1alpha1"
12
)
13

14
// renderTaskStatusChangePredicate returns a predicate that filters RenderTask
15
// events to only trigger reconciliation when the RenderTask's status changes.
16
// This avoids unnecessary reconciliation of the owning Release or HydratedTarget
17
// when only the RenderTask's metadata (e.g. finalizers) changes.
18
func renderTaskStatusChangePredicate() predicate.Predicate {
2✔
19
        return predicate.Funcs{
2✔
20
                CreateFunc: func(_ event.CreateEvent) bool { return true },
104✔
21
                UpdateFunc: func(e event.UpdateEvent) bool {
294✔
22
                        oldRT, ok := e.ObjectOld.(*solarv1alpha1.RenderTask)
294✔
23
                        if !ok {
294✔
NEW
24
                                return true
×
NEW
25
                        }
×
26
                        newRT, ok := e.ObjectNew.(*solarv1alpha1.RenderTask)
294✔
27
                        if !ok {
294✔
NEW
28
                                return true
×
NEW
29
                        }
×
30

31
                        return !apiequality.Semantic.DeepEqual(oldRT.Status, newRT.Status)
294✔
32
                },
33
                DeleteFunc:  func(_ event.DeleteEvent) bool { return true },
102✔
NEW
34
                GenericFunc: func(_ event.GenericEvent) bool { return true },
×
35
        }
36
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc