Skip to content

Commit 8132d35

Browse files
authored
pkg/ansible/controller/reconcile.go: fix invalid logger.Info usage (#2031)
* pkg/ansible/controller/reconcile.go: fix invalid logger.Info usage * CHANGELOG.md: add line for #2031
1 parent a3458ab commit 8132d35

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
@@ -69,6 +69,7 @@
6969
- 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))
7070
- 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))
7171
- Added missing `jmespath` dependency to Ansible-based Operator .travis.yml file template. ([#2027](https://github.com/operator-framework/operator-sdk/pull/2027))
72+
- 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))
7273

7374
## v0.10.0
7475

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)