Skip to content

Commit 2042b1d

Browse files
fix: function IsCRDNotFound should also work with NoResourceMatchErrors (#105)
* fix: function IsCRDNotFound should also work with NoResourceMatchErrors * feat: release v0.1.14 --------- Co-authored-by: Maximilian Techritz <maximilian.techritz@sap.com>
1 parent 51cc4a7 commit 2042b1d

File tree

5 files changed

+14
-4
lines changed

5 files changed

+14
-4
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.1.13-dev
1+
v0.1.14

charts/control-plane-operator/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ apiVersion: v2
22
name: control-plane-operator
33
description: A Helm chart for the Cloud Orchestration Control Plane Operator
44
type: application
5-
version: v0.1.13
6-
appVersion: v0.1.13
5+
version: v0.1.14
6+
appVersion: v0.1.14
77
home: https://github.com/openmcp-project/control-plane-operator
88
sources:
99
- https://github.com/openmcp-project/control-plane-operator

charts/control-plane-operator/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ image:
88
repository: ghcr.io/openmcp-project/images/control-plane-operator
99
pullPolicy: IfNotPresent
1010
# Overrides the image tag whose default is the chart appVersion.
11-
tag: v0.1.13
11+
tag: v0.1.14
1212

1313
imagePullSecrets: []
1414
nameOverride: ""

pkg/utils/errors.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ func IsCRDNotFound(err error) bool {
1515
return true
1616
}
1717

18+
// check if err tree contains a "NoResourceMatchError" error.
19+
if errors.Is(err, &meta.NoResourceMatchError{}) {
20+
return true
21+
}
22+
1823
// check if err tree contains a "ErrResourceDiscoveryFailed" error.
1924
var rdfErr *apiutil.ErrResourceDiscoveryFailed
2025
if !errors.As(err, &rdfErr) {

pkg/utils/errors_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ func TestIsCRDNotFound(t *testing.T) {
2525
err: &meta.NoKindMatchError{},
2626
want: true,
2727
},
28+
{
29+
name: "no resource match error",
30+
err: &meta.NoResourceMatchError{},
31+
want: true,
32+
},
2833
{
2934
name: "resource discovery failed error",
3035
err: &apiutil.ErrResourceDiscoveryFailed{},

0 commit comments

Comments
 (0)