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

Hotfix dataflow nil pointer #167

Merged
merged 6 commits into from
Nov 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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