Skip to content

Commit b862e70

Browse files
author
Ish Shah
authored
Cherry pick PR #2031 to v0.10.x (#2035)
* cherry picked commit * backport second bug fix * revert previous backport
1 parent 7052e8e commit b862e70

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
- The command `operator-sdk olm-catalog gen-csv --csv-version=<version> --update-crds` would fail to copy over CRD manifests into `deploy/olm-catalog` for manifests whose name didn't end with a `_crd.yaml` suffix. This has been fixed so `gen-csv` now copies all CRD manifests specified by `deploy/olm-catalog/csv_config.yaml` by checking the type of the manifest rather than the filename suffix. ([#2015](https://github.com/operator-framework/operator-sdk/pull/2015))
1414
- Fixed an issue in `operator-sdk olm-catalog gen-csv` where the generated CSV is missing the expected set of owned CRDs. ([#2017](https://github.com/operator-framework/operator-sdk/pull/2017))
15+
- Fixed invalid usage of `logr.Logger.Info()` in the Ansible-based operator implementation, which caused unnecessary operator panics. ([#2031](https://github.com/operator-framework/operator-sdk/pull/2031))
1516

1617
## v0.10.0
1718

pkg/ansible/controller/reconcile.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ func (r *AnsibleOperatorReconciler) markError(u *unstructured.Unstructured, name
271271
// Get the latest resource to prevent updating a stale status
272272
err := r.Client.Get(context.TODO(), namespacedName, u)
273273
if apierrors.IsNotFound(err) {
274-
logger.Info("Resource not found, assuming it was deleted", err)
274+
logger.Info("Resource not found, assuming it was deleted")
275275
return nil
276276
}
277277
if err != nil {
@@ -310,7 +310,7 @@ func (r *AnsibleOperatorReconciler) markDone(u *unstructured.Unstructured, names
310310
// Get the latest resource to prevent updating a stale status
311311
err := r.Client.Get(context.TODO(), namespacedName, u)
312312
if apierrors.IsNotFound(err) {
313-
logger.Info("Resource not found, assuming it was deleted", err)
313+
logger.Info("Resource not found, assuming it was deleted")
314314
return nil
315315
}
316316
if err != nil {

0 commit comments

Comments
 (0)