Skip to content

Commit

Permalink
changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
camilamacedo86 committed Jan 9, 2020
1 parent 4b8e84f commit 5142e28
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 20 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

- Fix `operator-sdk build`'s `--image-build-args` to support spaces within quotes like `--label some.name="First Last"`. ([#2312](https://github.com/operator-framework/operator-sdk/pull/2312))
- Fix misleading Helm operator "release not found" errors during CR deletion. ([#2359](https://github.com/operator-framework/operator-sdk/pull/2359))
- Fix Ansible based image in order to re-trigger reconcile when playbooks are runner with error. ([#2375](https://github.com/operator-framework/operator-sdk/pull/2375))

## v0.13.0

Expand Down
2 changes: 1 addition & 1 deletion pkg/ansible/controller/reconcile.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func (r *AnsibleOperatorReconciler) Reconcile(request reconcile.Request) (reconc
}
}
if event.Event == eventapi.EventRunnerOnFailed && !event.IgnoreError() {
eventErr := errors.New("event runner on failed : " + event.GetFailedPlaybookMessage())
eventErr := errors.New("event runner on failed")
return reconcile.Result{}, eventErr
}
}
Expand Down
24 changes: 5 additions & 19 deletions pkg/ansible/controller/reconcile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func TestReconcile(t *testing.T) {
},
},
{
Name: "Failure message reconcile",
Name: "Failure event runner on failed",
GVK: gvk,
ReconcilePeriod: 5 * time.Second,
ManageStatus: true,
Expand Down Expand Up @@ -165,15 +165,13 @@ func TestReconcile(t *testing.T) {
"spec": map[string]interface{}{},
},
}),
Result: reconcile.Result{
RequeueAfter: 5 * time.Second,
},
Request: reconcile.Request{
NamespacedName: types.NamespacedName{
Name: "reconcile",
Namespace: "default",
},
},
// Since face an event error needs re-trigger the reconcile
ExpectedObject: &unstructured.Unstructured{
Object: map[string]interface{}{
"metadata": map[string]interface{}{
Expand All @@ -183,23 +181,10 @@ func TestReconcile(t *testing.T) {
"apiVersion": "operator-sdk/v1beta1",
"kind": "Testing",
"spec": map[string]interface{}{},
"status": map[string]interface{}{
"status": map[string]interface{}{
"conditions": []interface{}{
map[string]interface{}{
"status": "True",
"type": "Failure",
"ansibleResult": map[string]interface{}{
"changed": int64(0),
"failures": int64(0),
"ok": int64(0),
"skipped": int64(0),
"completion": eventTime.Format("2006-01-02T15:04:05.99999999"),
},
"message": "new failure message",
"reason": "Failed",
},
map[string]interface{}{
"status": "False",
"status": "True",
"type": "Running",
"message": "Running reconciliation",
"reason": "Running",
Expand All @@ -208,6 +193,7 @@ func TestReconcile(t *testing.T) {
},
},
},
ShouldError: true,
},
{
Name: "Finalizer successful reconcile",
Expand Down

0 comments on commit 5142e28

Please sign in to comment.