Skip to content
This repository has been archived by the owner on Oct 20, 2022. It is now read-only.

Commit

Permalink
Hotfix dataflow nil pointer (#167)
Browse files Browse the repository at this point in the history
* Revert "Hotfix description (#163)"

This reverts commit 65671ad.

* clean

* fix nil pointer exception case

* append changelog

* fix log
  • Loading branch information
erdrix authored Nov 30, 2021
1 parent 7a60440 commit e554431
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@

### Fixed Bugs

- [PR #167](https://github.com/Orange-OpenSource/nifikop/pull/167) - **[Operator/NiFiDataflow]** Fix nil pointer exception case whe sync Dataflow.

## v0.7.5

### Added

- [PR #161](https://github.com/Orange-OpenSource/nifikop/pull/162) - **[Operator/NiFiParameterContext]** Support declarative sensitive value out of secret.
- [PR #162](https://github.com/Orange-OpenSource/nifikop/pull/162) - **[Operator/NiFiParameterContext]** Support declarative sensitive value out of secret.

### Fixed Bugs

Expand Down
2 changes: 1 addition & 1 deletion controllers/nifidataflow_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ func (r *NifiDataflowReconciler) Reconcile(ctx context.Context, req ctrl.Request
r.Log.Info("Ensured Dataflow")

r.Recorder.Event(instance, corev1.EventTypeWarning, "Reconciled",
fmt.Sprintf("Reconciled failed dataflow %s based on flow {bucketId : %s, flowId: %s, version: %s}",
fmt.Sprintf("Success fully ensured dataflow %s based on flow {bucketId : %s, flowId: %s, version: %s}",
instance.Name, instance.Spec.BucketId,
instance.Spec.FlowId, strconv.FormatInt(int64(*instance.Spec.FlowVersion), 10)))

Expand Down
3 changes: 2 additions & 1 deletion pkg/clientwrappers/dataflow/dataflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,8 @@ func SyncDataflow(
updateRequest2Status(updateRequest, t)
}

if err := clientwrappers.ErrorGetOperation(log, err, "Get version-request"); err != nificlient.ErrNifiClusterReturned404 || !updateRequest.Request.Complete {
if err := clientwrappers.ErrorGetOperation(log, err, "Get version-request"); err != nificlient.ErrNifiClusterReturned404 ||
(updateRequest != nil && updateRequest.Request != nil && !updateRequest.Request.Complete) {
if err != nil {
return &flow.Status, err
}
Expand Down

0 comments on commit e554431

Please sign in to comment.