Skip to content

test: Fix the NiFi upgrade kuttl test - #1032

Open
siegfriedweber wants to merge 1 commit into
mainfrom
fix/upgrade-kuttl-test
Open

siegfriedweber wants to merge 1 commit into
mainfrom
fix/upgrade-kuttl-test

Conversation

@siegfriedweber

Copy link
Copy Markdown
Member

Description

The upgrade test was flaky, and failed outright once it got past the rotation. Two causes:

  • readyReplicas returns to 3 after every single pod is replaced, so step 7 started against a half-upgraded cluster and retried against restarting pods.
  • flow.py lost its run/query subcommands when it was rewritten for NiFi 2.x in e10a273, so step 7's arguments were silently ignored: query re-uploaded the process group, restarted the canvas and counted an arbitrary copy. Every retry of the assertion added another copy, so the flow file counts before and after the upgrade could never match.

Fixed by additionally asserting updatedReplicas in step 6, which only reaches 3 once every pod runs the new revision (the sleep in 06-sleep.yaml is still required, since both fields are also 3 before the rotation starts), and by restoring run/query, requiring exactly one process group, exiting non-zero on failure and moving informational output to stderr so stdout holds only the count. That last change also revives the so-far-dead grep -Eov 'Error|\b0\b' guard.

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
  • Integration tests passed:
    PASS: kuttl/harness/upgrade_nifi_old-2.6.0_nifi_new-2.12.0_zookeeper-latest-3.9.6_openshift-false (267.02s)
    

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

@siegfriedweber
siegfriedweber requested a review from a team November 26, 2026 15:17
@siegfriedweber siegfriedweber self-assigned this Nov 26, 2026
@siegfriedweber siegfriedweber moved this to Development: Waiting for Review in Stackable Engineering Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Development: Waiting for Review

Development

Successfully merging this pull request may close these issues.

1 participant