Skip to content

fix: Add test to check patch for FlowSynchronizationException - #929

Merged
adwk67 merged 3 commits into
mainfrom
test/fix-flow-sync-exception
May 12, 2026
Merged

fix: Add test to check patch for FlowSynchronizationException#929
adwk67 merged 3 commits into
mainfrom
test/fix-flow-sync-exception

Conversation

@adwk67

@adwk67 adwk67 commented Apr 30, 2026

Copy link
Copy Markdown
Member

Description

This PR adds a kuttl integration test that deploys a 2-node NiFi cluster with a flow containing the same controller service identifier at both root and child group level (with different property values), waits for the cluster to be healthy, then disconnects a non-coordinator node via the REST API, deletes the child-group CS on that node while it's disconnected, and reconnects it. When the node reconnects, the coordinator's flow triggers a COMPONENT_ADDED diff for the child-group CS, which hits the synchronizeControllerServices bulk path — and without the patch, updateControllerService is called on the still-ENABLED root CS, causing an FlowSynchronizationException that throws the node into an infinite disconnect/reconnect flap loop.

Tested with stackabletech/docker-images#1481 (Nifi 2.9.0)

2.9.0

--- PASS: kuttl (1760.56s)
    --- PASS: kuttl/harness (0.00s)
        --- PASS: kuttl/harness/cluster_operation_nifi-latest-2.9.0_openshift-false (127.83s)
        --- PASS: kuttl/harness/orphaned_resources_nifi-2.9.0_zookeeper-latest-3.9.4_openshift-false (145.56s)
        --- PASS: kuttl/harness/oidc-opa_nifi-2.9.0_zookeeper-latest-3.9.4_opa-l-1.12.3_oidc-use-tls-true_openshift-false (196.33s)
        --- PASS: kuttl/harness/cluster-sync-cs-bug_nifi-latest-2.9.0_openshift-false (213.59s)
        --- PASS: kuttl/harness/resources_nifi-2.9.0_zookeeper-latest-3.9.4_openshift-false (87.58s)
        --- PASS: kuttl/harness/external-access_nifi-2.9.0_zookeeper-latest-3.9.4_openshift-false (104.52s)
        --- PASS: kuttl/harness/smoke_v2_nifi-v2-2.9.0_use-zookeeper-manager-true_zookeeper-3.9.4_openshift-false_listener-class-external-unstable (387.99s)
        --- PASS: kuttl/harness/upgrade_nifi_old-1.28.1_nifi_new-2.9.0_zookeeper-latest-3.9.4_openshift-false (505.37s)
        --- PASS: kuttl/harness/ldap_nifi-2.9.0_zookeeper-latest-3.9.4_ldap-use-tls-true_openshift-false (214.29s)
        --- PASS: kuttl/harness/iceberg-rest_nifi-iceberg-rest-2.9.0_hive-l-4.2.0_trino-l-477_openshift-false (339.21s)
        --- PASS: kuttl/harness/custom-components-git-sync_nifi-2.9.0_zookeeper-latest-3.9.4_openshift-false (329.15s)
        --- PASS: kuttl/harness/smoke_v2_nifi-v2-2.9.0_use-zookeeper-manager-false_zookeeper-3.9.4_openshift-false_listener-class-external-unstable (156.91s)
        --- PASS: kuttl/harness/logging_nifi-2.9.0_zookeeper-latest-3.9.4_openshift-false (137.37s)
        --- PASS: kuttl/harness/smoke_v2_nifi-v2-2.9.0_use-zookeeper-manager-true_zookeeper-3.9.4_openshift-false_listener-class-cluster-internal (328.79s)
        --- PASS: kuttl/harness/smoke_v2_nifi-v2-2.9.0_use-zookeeper-manager-false_zookeeper-3.9.4_openshift-false_listener-class-cluster-internal (158.02s)
PASS

2.6.0

--- PASS: kuttl (220.80s)
    --- PASS: kuttl/harness (0.00s)
        --- PASS: kuttl/harness/cluster-sync-cs-bug_nifi-v2-2.6.0_openshift-false (220.77s)
PASS

2.7.2

--- PASS: kuttl (201.15s)
    --- PASS: kuttl/harness (0.00s)
        --- PASS: kuttl/harness/cluster-sync-cs-bug_nifi-v2-2.7.2_openshift-false (201.13s)
PASS

Definition of Done Checklist

  • Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
  • Please make sure all these things are done and tick the boxes

Author

  • Changes are OpenShift compatible
  • CRD changes approved
  • CRD documentation for all fields, following the style guide.
  • Helm chart can be installed and deployed operator works
  • Integration tests passed (for non trivial changes)
  • Changes need to be "offline" compatible
  • Links to generated (nightly) docs added
  • Release note snippet added

Reviewer

  • Code contains useful comments
  • Code contains useful logging statements
  • (Integration-)Test cases added
  • Documentation added or updated. Follows the style guide.
  • Changelog updated
  • Cargo.toml only contains references to git tags (not specific commits or branches)

Acceptance

  • Feature Tracker has been updated
  • Proper release label has been added
  • Links to generated (nightly) docs added
  • Release note snippet added
  • Add type/deprecation label & add to the deprecation schedule
  • Add type/experimental label & add to the experimental features tracker

@adwk67
adwk67 marked this pull request as ready for review May 4, 2026 20:46
@adwk67 adwk67 self-assigned this May 5, 2026
@adwk67 adwk67 moved this to Development: Waiting for Review in Stackable Engineering May 5, 2026
@razvan
razvan self-requested a review May 12, 2026 07:16
@razvan razvan moved this from Development: Waiting for Review to Development: In Review in Stackable Engineering May 12, 2026
@razvan
razvan requested a review from sweb May 12, 2026 07:38

@razvan razvan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! tested locally with the custom image from the accompanying docker-images PR.

Personally I would have used a Job for the test container, but I'm fine with the way it is.

@adwk67
adwk67 added this pull request to the merge queue May 12, 2026
Merged via the queue into main with commit 3d03213 May 12, 2026
10 checks passed
@adwk67
adwk67 deleted the test/fix-flow-sync-exception branch May 12, 2026 12:00
@adwk67 adwk67 moved this from Development: In Review to Development: Done in Stackable Engineering May 12, 2026
@lfrancke lfrancke moved this from Development: Done to Done in Stackable Engineering Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants