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

opendefensecloud / solution-arsenal / 23764791425

30 Mar 2026 07:57PM UTC coverage: 72.056% (-0.09%) from 72.141%
23764791425

Pull #338

github

web-flow
Merge 4bff943de into 0fe88d665
Pull Request #338: feat: reworked rendertask to be a clusterwide ressource, modified tes…

81 of 94 new or added lines in 5 files covered. (86.17%)

20 existing lines in 5 files now uncovered.

2215 of 3074 relevant lines covered (72.06%)

29.01 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 },
100✔
21
                UpdateFunc: func(e event.UpdateEvent) bool {
466✔
22
                        oldRT, ok := e.ObjectOld.(*solarv1alpha1.RenderTask)
466✔
23
                        if !ok {
466✔
NEW
24
                                return true
×
NEW
25
                        }
×
26
                        newRT, ok := e.ObjectNew.(*solarv1alpha1.RenderTask)
466✔
27
                        if !ok {
466✔
NEW
28
                                return true
×
NEW
29
                        }
×
30

31
                        return !apiequality.Semantic.DeepEqual(oldRT.Status, newRT.Status)
466✔
32
                },
33
                DeleteFunc:  func(_ event.DeleteEvent) bool { return true },
98✔
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