Uh oh!
There was an error while loading. Please reload this page.
🐛 Fix testCatalogName conflict - #2367
Conversation
✅ Deploy Preview for olmv1 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
ad9ea17 to
18931abCompareCodecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@## main #2367 +/- ##
==========================================
+ Coverage 70.58% 74.51% +3.92%
==========================================
Files 93 93 Lines 7333 7333 ==========================================
+ Hits 5176 5464 +288 + Misses 1721 1435 -286 + Partials 436 434 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
dtfranz
commented
Dec 1, 2025
/lgtm |
jianzhangbjz
commented
Dec 1, 2025
/approve |
Uh oh!
There was an error while loading. Please reload this page.
jianzhangbjz
commented
Dec 1, 2025
It failed at the below, which I don't think this PR introduced it. ===RUNTestClusterExtensionRecoversFromExistingDeploymentWhenFailureFixed
cluster_extension_install_test.go:679: Whenaclusterextensionisinstalledfromacatalog
cluster_extension_install_test.go:680: Whentheextensionbundleformatisregistry+v1
helpers.go:263: EnsuringClusterCataloghas Status.ConditionofProgressingwithastatus==Trueandreason==Succeeded
helpers.go:273: Checkingthatcataloghastheexpectedmetadatalabel
helpers.go:278: EnsuringClusterCataloghas Status.ConditionofType=Servingwithstatus==True
cluster_extension_install_test.go:703: BycreatinganewDeploymentthatcannotbeadopted
cluster_extension_install_test.go:746: Itresolvesthespecifiedpackage with correctbundlepath
cluster_extension_install_test.go:747: BycreatingtheClusterExtensionresource
cluster_extension_install_test.go:750: ByeventuallyreportingProgressing==TruewithReasonRetrying
cluster_extension_install_test.go:751: ErrorTrace: /home/runner/work/operator-controller/operator-controller/test/e2e/cluster_extension_install_test.go:756/opt/hostedtoolcache/go/1.24.6/x64/src/runtime/asm_amd64.s:1700
Error: Not equal: expected: "Retrying"
actual : "RolloutInProgress"
Diff:
---Expected+++Actual
@@ -1+1 @@
-Retrying+RolloutInProgress
cluster_extension_install_test.go:751: ErrorTrace: /home/runner/work/operator-controller/operator-controller/test/e2e/cluster_extension_install_test.go:751
Error: Conditionneversatisfied
Test: TestClusterExtensionRecoversFromExistingDeploymentWhenFailureFixed
helpers.go:321: BydeletingClusterCatalog "test-catalog-x8krz9gf"
helpers.go:330: BydeletingClusterExtension"clusterextension-p8zl88ng"
helpers.go:294: BywaitingforCustomResourceDefinitionsof"clusterextension-p8zl88ng"tobedeleted
helpers.go:302: BywaitingforClusterRoleBindingsof"clusterextension-p8zl88ng"tobedeleted
helpers.go:310: BywaitingforClusterRolesof"clusterextension-p8zl88ng"tobedeleted
helpers.go:340: BydeletingServiceAccount"clusterextension-p8zl88ng"
helpers.go:349: BydeletingNamespace"clusterextension-p8zl88ng"---FAIL: TestClusterExtensionRecoversFromExistingDeploymentWhenFailureFixed (106.27s) |
jianzhangbjz
commented
Dec 1, 2025
Anyway, fix this in this PR. |
perdasilva
commented
Dec 1, 2025
/approve |
jianzhangbjz
commented
Dec 1, 2025
/retest |
| // If the CRD doesn't exist (e.g., in non-experimental environments), skip this step silently | ||
| if !apierrors.IsNotFound(err) && !strings.Contains(err.Error(), "no matches for kind") { | ||
| fmt.Printf("Failed to list cluster extension revisions: %v\n", err) | ||
| } |
There was a problem hiding this comment.
why is this change need, it only reduces maybe a number of cases where this is printed out. BTW, we should log it, not print out directly on the console.
There was a problem hiding this comment.
Yes, you're right. I will remove it.
| objs = append(objs, ocv1.ClusterExtensionRevisionObject{ | ||
| Object: unstr, | ||
| Object: unstr, | ||
| CollisionProtection: ocv1.CollisionProtectionPrevent, |
There was a problem hiding this comment.
this change is really not necessary, because in the CRD the default value is already and it going to applied by API server if missing from the payload. Server-side apply works like this:
- patch with the values that controllers is interested to managed are sent to API server
- API server applies the patch,
- applies defaults for the missing fields,
- perform validations
- persist the resource in etcd.
I have deployed OLM from the latest main, and created simple test-extension:
apiVersion: olm.operatorframework.io/v1kind: ClusterExtensionmetadata:
name: test-clusterextensionspec:
namespace: fooserviceAccount:
name: test-operator-installer-sasource:
catalog:
packageName: testselector:
matchLabels:
olm.operatorframework.io/metadata.name: test-catalogupgradeConstraintPolicy: SelfCertifiedversion: 1.0.0sourceType: Catalogand the created revision contains the default collision protection:
apiVersion: olm.operatorframework.io/v1kind: ClusterExtensionRevisionmetadata:
annotations:
olm.operatorframework.io/bundle-name: test-operator.1.0.0olm.operatorframework.io/bundle-reference: docker-registry.operator-controller-e2e.svc.cluster.local:5000/bundles/registry-v1/test-operator:v1.0.0olm.operatorframework.io/bundle-version: 1.0.0olm.operatorframework.io/package-name: testcreationTimestamp: "2025-12-01T15:10:21Z"finalizers:
- olm.operatorframework.io/teardowngeneration: 1labels:
olm.operatorframework.io/owner-name: test-clusterextensionname: test-clusterextension-1spec:
lifecycleState: Activephases:
- name: policiesobjects:
- collisionProtection: Preventobject:
apiVersion: networking.k8s.io/v1kind: NetworkPolicymetadata:
labels:
olm.operatorframework.io/owner-kind: ClusterExtensionolm.operatorframework.io/owner-name: test-clusterextensionname: test-operator-network-policynamespace: foospec:
podSelector: {}policyTypes:
- Ingress
- name: rbacobjects:
- collisionProtection: Preventobject:
apiVersion: v1kind: ServiceAccountmetadata:
labels:
olm.operatorframework.io/owner-kind: ClusterExtensionolm.operatorframework.io/owner-name: test-clusterextensionname: simple-bundle-managernamespace: foo
- collisionProtection: Preventobject:
apiVersion: rbac.authorization.k8s.io/v1kind: ClusterRolemetadata:
labels:
olm.operatorframework.io/owner-kind: ClusterExtensionolm.operatorframework.io/owner-name: test-clusterextensionname: testoperator.v1.0.-1eqned1rve17v8ggw7pxcudwuwxtutac7n2t3grh27tmrules:
- apiGroups:
- ""resources:
- configmaps
- serviceaccountsverbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- networking.k8s.ioresources:
- networkpoliciesverbs:
- get
- list
- create
- update
- delete
- apiGroups:
- coordination.k8s.ioresources:
- leasesverbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""resources:
- eventsverbs:
- create
- patch
- apiGroups:
- ""resources:
- namespacesverbs:
- get
- list
- watch
- collisionProtection: Preventobject:
apiVersion: rbac.authorization.k8s.io/v1kind: ClusterRolemetadata:
labels:
olm.operatorframework.io/owner-kind: ClusterExtensionolm.operatorframework.io/owner-name: test-clusterextensionname: testoperator.v1.0.0-t88i5epjh8oxp4klplhjyrsekwcp92b27w03ayr1ku5rules:
- apiGroups:
- authentication.k8s.ioresources:
- tokenreviewsverbs:
- create
- apiGroups:
- authorization.k8s.ioresources:
- subjectaccessreviewsverbs:
- create
- collisionProtection: Preventobject:
apiVersion: rbac.authorization.k8s.io/v1kind: ClusterRoleBindingmetadata:
labels:
olm.operatorframework.io/owner-kind: ClusterExtensionolm.operatorframework.io/owner-name: test-clusterextensionname: testoperator.v1.0.-1eqned1rve17v8ggw7pxcudwuwxtutac7n2t3grh27tmroleRef:
apiGroup: rbac.authorization.k8s.iokind: ClusterRolename: testoperator.v1.0.-1eqned1rve17v8ggw7pxcudwuwxtutac7n2t3grh27tmsubjects:
- kind: ServiceAccountname: simple-bundle-managernamespace: foo
- collisionProtection: Preventobject:
apiVersion: rbac.authorization.k8s.io/v1kind: ClusterRoleBindingmetadata:
labels:
olm.operatorframework.io/owner-kind: ClusterExtensionolm.operatorframework.io/owner-name: test-clusterextensionname: testoperator.v1.0.0-t88i5epjh8oxp4klplhjyrsekwcp92b27w03ayr1ku5roleRef:
apiGroup: rbac.authorization.k8s.iokind: ClusterRolename: testoperator.v1.0.0-t88i5epjh8oxp4klplhjyrsekwcp92b27w03ayr1ku5subjects:
- kind: ServiceAccountname: simple-bundle-managernamespace: foo
- name: crdsobjects:
- collisionProtection: Preventobject:
apiVersion: apiextensions.k8s.io/v1kind: CustomResourceDefinitionmetadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.1labels:
olm.operatorframework.io/owner-kind: ClusterExtensionolm.operatorframework.io/owner-name: test-clusterextensionname: olme2etests.olm.operatorframework.iospec:
group: olm.operatorframework.ionames:
kind: OLME2ETestlistKind: OLME2ETestListplural: olme2etestssingular: olme2etestscope: Clusterversions:
- name: v1schema:
openAPIV3Schema:
properties:
spec:
properties:
testField:
type: stringtype: objecttype: objectserved: truestorage: true
- name: deployobjects:
- collisionProtection: Preventobject:
apiVersion: v1data:
httpd.sh: | #!/bin/sh echo true > /var/www/started echo true > /var/www/ready echo true > /var/www/live exec httpd -f -h /var/www -p 80kind: ConfigMapmetadata:
labels:
olm.operatorframework.io/owner-kind: ClusterExtensionolm.operatorframework.io/owner-name: test-clusterextensionname: httpd-scriptnamespace: foo
- collisionProtection: Preventobject:
apiVersion: v1data:
name: test-configmapversion: v1.0.0kind: ConfigMapmetadata:
annotations:
shouldNotTemplate: | The namespace is {{ $labels.namespace }}. The templated $labels.namespace is NOT expected to be processed by OLM's rendering engine for registry+v1 bundles.labels:
olm.operatorframework.io/owner-kind: ClusterExtensionolm.operatorframework.io/owner-name: test-clusterextensionname: test-configmapnamespace: foo
- collisionProtection: Preventobject:
apiVersion: apps/v1kind: Deploymentmetadata:
labels:
app.kubernetes.io/component: controllerapp.kubernetes.io/name: test-operatorapp.kubernetes.io/version: 1.0.0olm.operatorframework.io/owner-kind: ClusterExtensionolm.operatorframework.io/owner-name: test-clusterextensionname: test-operatornamespace: foospec:
replicas: 1revisionHistoryLimit: 1selector:
matchLabels:
app: olme2eteststrategy: {}template:
metadata:
annotations:
alm-examples: |- [ { "apiVersion": "olme2etests.olm.operatorframework.io/v1", "kind": "OLME2ETests", "metadata": { "labels": { "app.kubernetes.io/managed-by": "kustomize", "app.kubernetes.io/name": "test" }, "name": "test-sample" }, "spec": null } ]capabilities: Basic InstallcreatedAt: "2024-10-24T19:21:40Z"olm.targetNamespaces: ""operators.operatorframework.io/builder: operator-sdk-v1.34.1operators.operatorframework.io/project_layout: go.kubebuilder.io/v4labels:
app: olme2etestspec:
containers:
- command:
- /scripts/httpd.shimage: busybox:1.36livenessProbe:
failureThreshold: 1httpGet:
path: /liveport: 80periodSeconds: 2name: busybox-httpd-containerports:
- containerPort: 80readinessProbe:
httpGet:
path: /readyport: 80initialDelaySeconds: 1periodSeconds: 1resources: {}startupProbe:
failureThreshold: 30httpGet:
path: /startedport: 80periodSeconds: 10volumeMounts:
- mountPath: /scriptsname: scriptsreadOnly: trueserviceAccountName: simple-bundle-managerterminationGracePeriodSeconds: 0volumes:
- configMap:
defaultMode: 493name: httpd-scriptname: scriptsrevision: 1There was a problem hiding this comment.
Yes, you're correct. I will revert it.
perdasilva
commented
Dec 2, 2025
/lgtm |
34394ce
into
operator-framework:mainUh oh!
There was an error while loading. Please reload this page.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jianzhangbjz, pedjak, perdasilva, rashmigottipati The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Description
Reviewer Checklist
Assisted-by: Claude Code