You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Simon Bence (Jira)" <ji...@apache.org> on 2023/06/16 08:44:00 UTC
[jira] [Commented] (NIFI-11706) Create dedicated Parameter Contexts for versioned flows when importing
[ https://issues.apache.org/jira/browse/NIFI-11706?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17733405#comment-17733405 ]
Simon Bence commented on NIFI-11706:
------------------------------------
h1. Test Plan
h2. TC#1: Regression tests
h3. TS#1.1: Regress
GIVEN a F1 Versioned Flow within Registry R1
AND the root group (PG1) of F1 has a Parameter Context with the name set to "PC1"
AND the NiFi flow does not contain Parameter Context with name "PC1"
WHEN F1 is imported from registry
AND the checkbox "Keep Existing Parameter Context" is in "checked" state
THEN F1 is added successfully to the canvas
AND a Parameter Context with the name "PC1" is created
AND content of the Parameter Context "PC1" matches the content stored in Registry (Thus: no sensitive values are set)
AND Process Group PG1 has "PC1" as Parameter Context
h3. TS#1.2
GIVEN a F1 Versioned Flow within Registry R1
AND the root group (PG1) of F1 has a Parameter Context with the name set to "PC1"
AND the NiFi flow contains Parameter Context with name "PC1"
WHEN F1 is imported from registry
AND the checkbox "Keep Existing Parameter Context" is in "checked" state
THEN F1 is added successfully to the canvas
AND the existing Parameter Context "PC1" is not changed
AND the content of Parameter Context "PC1" stored in the Registry is disregarded
AND Process Group PG1 has "PC1" as Parameter Context
h2. TC#2: Simple case
h3. TS#2.1
GIVEN a F1 Versioned Flow within Registry R1
AND the root group (PG1) of F1 has a Parameter Context with the name set to "PC1"
AND the NiFi flow does not contain Parameter Context with name "PC1"
WHEN F1 is imported from registry
AND the checkbox "Keep Existing Parameter Context" is in "unchecked" state
THEN F1 is added successfully to the canvas
AND a Parameter Context with the name "PC1 (1)" is created
AND content of the Parameter Context "PC1 (1)" matches the content of Parameter Context "PC1" stored in Registry (Thus: no sensitive values are set)
AND Process Group PG1 has "PC1 (1)" as Parameter Context
h3. TS#2.2
GIVEN a F1 Versioned Flow within Registry R1
AND the root group of F1 has a Parameter Context with the name set to "PC1"
AND the NiFi flow contains Parameter Context with name "PC1"
WHEN F1 is imported from registry
AND the checkbox "Keep Existing Parameter Context" is in "unchecked" state
THEN F1 is added successfully to the canvas
AND a Parameter Context with the name "PC1 (1)" is created
AND content of the Parameter Context "PC1 (1)" matches the content of Parameter Context "PC1" stored in Registry (Thus: no sensitive values are set)
AND Process Group PG1 has "PC1 (1)" as Parameter Context
h2. TC#3: Flow is added multiple time
h3. TS#3.1: When original existing, then using the original
GIVEN a F1 Versioned Flow within Registry R1
AND the root group (PG1) of F1 has a Parameter Context with the name set to "PC1"
AND the NiFi flow contains Parameter Context with name "PC1"
AND the NiFi flow contains Parameter Context with name "PC1 (1)"
WHEN F1 is imported from registry
AND the checkbox "Keep Existing Parameter Context" is in "checked" state
THEN F1 is added successfully to the canvas
AND Parameter Context "PC1" is not changed
AND Process Group PG1 has "PC1" as Parameter Context
h3. TS#3.1: When original is missing, recreating it
GIVEN a F1 Versioned Flow within Registry R1
AND the root group (PG1) of F1 has a Parameter Context with the name set to "PC1"
AND the NiFi flow does not contain Parameter Context with name "PC1"
AND the NiFi flow contains Parameter Context with name "PC1 (1)"
WHEN F1 is imported from registry
AND the checkbox "Keep Existing Parameter Context" is in "checked" state
THEN F1 is added successfully to the canvas
AND a Parameter Context with the name "PC1" is created
AND content of the Parameter Context "PC1" matches the content of Parameter Context "PC1" stored in Registry (Thus: no sensitive values are set)
h3. TS#3.3: Postfix is incremented regardless of the gap
GIVEN a F1 Versioned Flow within Registry R1
AND the root group (PG1) of F1 has a Parameter Context with the name set to "PC1"
AND the NiFi flow does not contain Parameter Context with name "PC1"
AND the NiFi flow does not contain Parameter Context with name "PC1 (1)"
AND the NiFi flow contains Parameter Context with name "PC1 (2)"
WHEN F1 is imported from registry
AND the checkbox "Keep Existing Parameter Context" is in "unchecked" state
THEN F1 is added successfully to the canvas
AND a Parameter Context with the name "PC1 (3)" is created
AND content of the Parameter Context "PC1 (3)" matches the content of Parameter Context "PC1" stored in Registry (Thus: no sensitive values are set)
h2. TC#4: Form is reseted after use
h3. TS#4.1
GIVEN a F1 Versioned Flow within Registry R1
WHEN Import Version window is opened
AND the checkbox "Keep Existing Parameter Context" is set to "unchecked" state
AND F1 is imported from registry
AND the Import Version window is opened again
THEN the "Keep Existing Parameter Context" checkbox is "checked"
h3. TS#4.2
GIVEN a F1 Versioned Flow within Registry R1
WHEN Import Version window is opened
AND the checkbox "Keep Existing Parameter Context" is set to "unchecked" state
AND the import is canceled
AND the Import Version window is opened again
THEN the "Keep Existing Parameter Context" checkbox is "checked"
h3. TS#4.3
GIVEN a F1 Versioned Flow within Registry R1
WHEN Import Version window is opened
AND the checkbox "Keep Existing Parameter Context" is set to "unchecked" state
AND the window is closed by the ESC button of the keyboard
AND the Import Version window is opened again
THEN the "Keep Existing Parameter Context" checkbox is "checked"
h2. TC#5: Inheritance
h3. TS#5.1: Not directly referenced Parameter Contexts (parent contexts) are not postfixed
GIVEN a F1 Versioned Flow within Registry R1
AND the root group (PG1) of F1 has a Parameter Context with the name set to "PC1"
AND Parameter Context "PC1" inherits from Parameter Context "PC2"
AND the NiFi flow does not contain Parameter Context with name "PC2"
WHEN F1 is imported from registry
AND the checkbox "Keep Existing Parameter Context" is in "unchecked" state
THEN F1 is added successfully to the canvas
AND a Parameter Context with the name "PC2" is created
AND content of the Parameter Context "PC2" matches the content of Parameter Context "PC2" stored in Registry (Thus: no sensitive values are set)
AND Process Group PG1 has "PC1" as Parameter Context
h3. TS#5.2: Not directly references Parameter Contexts (parent contexts) are not
GIVEN a F1 Versioned Flow within Registry R1
AND the root group of F1 has a Parameter Context with the name set to "PC1"
AND Parameter Context "PC1" inherits from Parameter Context "PC2"
AND the NiFi flow contains Parameter Context with name "PC2"
WHEN F1 is imported from registry
AND the checkbox "Keep Existing Parameter Context" is in "unchecked" state
THEN F1 is added successfully to the canvas
AND Parameter Context PC2 is not changed
h2. TC#6: Multiple levels of versioned flows
h3. TS#6.1
GIVEN a F1 Versioned Flow within Registry R1
AND a F2 Versioned Flow within Registry R1
AND F1 contains an instance of F2
AND the root group (PG1) of F1 has a Parameter Context with the name set to "PC1"
AND the root group (PG2) of F2 has a Parameter Context with the name set to "PC2"
AND the NiFi flow does not contain Parameter Context with name "PC1"
AND the NiFi flow does not contain Parameter Context with name "PC2"
WHEN F1 is imported from registry
AND the checkbox "Keep Existing Parameter Context" is in "unchecked" state
THEN F1 is added successfully to the canvas
AND a Parameter Context with the name "PC1 (1)" is created
AND content of the Parameter Context "PC1 (1)" matches the content of Parameter Context "PC1" stored in Registry (Thus: no sensitive values are set)
AND a Parameter Context with the name "PC2 (2)" is created
AND content of the Parameter Context "PC2 (2)" matches the content of Parameter Context "PC2" stored in Registry (Thus: no sensitive values are set)
AND Process Group PG1 has "PC1 (1)" as Parameter Context
AND Process Group PG2 has "PC2 (1)" as Parameter Context
h3. TS#6.2
GIVEN a F1 Versioned Flow within Registry R1
AND a F2 Versioned Flow within Registry R1
AND F1 contains an instance of F2
AND the root group (PG1) of F1 has a Parameter Context with the name set to "PC1"
AND the root group (PG2) of F2 has a Parameter Context with the name set to "PC2"
AND the NiFi flow contains Parameter Context with name "PC1"
AND the NiFi flow contains Parameter Context with name "PC2"
WHEN F1 is imported from registry
AND the checkbox "Keep Existing Parameter Context" is in "unchecked" state
THEN F1 is added successfully to the canvas
AND a Parameter Context with the name "PC1 (1)" is created
AND content of the Parameter Context "PC1 (1)" matches the content of Parameter Context "PC1" stored in Registry (Thus: no sensitive values are set)
AND a Parameter Context with the name "PC2 (2)" is created
AND content of the Parameter Context "PC2 (2)" matches the content of Parameter Context "PC2" stored in Registry (Thus: no sensitive values are set)
AND Process Group PG1 has "PC1 (1)" as Parameter Context
AND Process Group PG2 has "PC2 (1)" as Parameter Context
h3. TS#6.3 Parameter context in a sub-group of a contained versioned flow is subject of recreation
GIVEN a F1 Versioned Flow within Registry R1
AND a F2 Versioned Flow within Registry R1
AND the root group (PG2_1) of F2 contains a Process Group PG2_2
AND F1 contains an instance of F2
AND the Process Group PG2_2 has a Parameter Context with the name set to "PC2"
AND the NiFi flow does not contain Parameter Context with name "PC2"
WHEN F1 is imported from registry
AND the checkbox "Keep Existing Parameter Context" is in "unchecked" state
THEN F1 is added successfully to the canvas
AND a Parameter Context with the name "PC2 (1)" is created
AND content of the Parameter Context "PC2 (1)" matches the content of Parameter Context "PC2" stored in Registry (Thus: no sensitive values are set)
AND Process Group PG2_2 has "PC2 (1)" as Parameter Context
h2. TC#7: Multiple usage in the same versioned flow will not result multiple re-creation
h3. TS#7.1
GIVEN a F1 Versioned Flow within Registry R1
AND the root group (PG1) of F1 has a Parameter Context with the name set to "PC1"
AND Process Group PG1 contains a Process Group PG2
AND PG2 has a Parameter Context with the name set to "PC1"
AND the NiFi flow does not contain Parameter Context with name "PC2"
WHEN F1 is imported from registry
AND the checkbox "Keep Existing Parameter Context" is in "unchecked" state
THEN F1 is added successfully to the canvas
AND a Parameter Context with the name "PC1 (1)" is created
AND no other instance of PC1 is created
AND PG1 has PC1 (1) as Parameter Context
AND PG2 has PC1 (1) as Parameter Context
h2 .TC#8: When inherited Parameter Context is also used directly
h3. TS#8.1
GIVEN a F1 Versioned Flow within Registry R1
AND the root group (PG1) of F1 has a Parameter Context with the name set to "PC1"
AND Process Group PG1 contains a Process Group PG2
AND the Process Group PG2 has a Parameter Context with the name set to "PC2"
AND Parameter Context "PC1" inherits from Parameter Context "PC2"
AND the NiFi flow does not contain Parameter Context with name "PC1"
AND the NiFi flow does not contain Parameter Context with name "PC2"
WHEN F1 is imported from registry
AND the checkbox "Keep Existing Parameter Context" is in "unchecked" state
THEN F1 is added successfully to the canvas
AND a Parameter Context with the name "PC1 (1)" is created
AND a Parameter Context with the name "PC2 (1)" is created
AND Process Group PG1 has "PC1 (1)" as Parameter Context
AND Process Group PG2 has "PC1 (2)" as Parameter Context
AND Parameter Context "PC1 (1)" inherits from Parameter Context "PC2 (1)"
> Create dedicated Parameter Contexts for versioned flows when importing
> ----------------------------------------------------------------------
>
> Key: NIFI-11706
> URL: https://issues.apache.org/jira/browse/NIFI-11706
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Core Framework
> Reporter: Simon Bence
> Assignee: Simon Bence
> Priority: Major
>
> As many Versioned Flows are imported multiple times but used with in somewhat different circumstances (such as: different endpoints, databases, etc.), it would make sense to give the user the possibility to import flows in a way that their Parameter Context become independent from the other instances. In order to achieve this a new checkbox will be added to the Import Version window which makes it possible to decide for the user if she wants to keep the existing Parameter Contexts (bounding the parameters to the potentially existing instances) or she wants to create a new set of Parameter Contexts making the flow parametrised independently.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)