Re: [PR] NIFI-12394 when synching to a VersionedFlow, make sure processor references to new controller services are valid [nifi]

2024-01-17 Thread via GitHub


exceptionfactory closed pull request #8184: NIFI-12394 when synching to a 
VersionedFlow, make sure processor references to new controller services are 
valid
URL: https://github.com/apache/nifi/pull/8184


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] NIFI-12394 when synching to a VersionedFlow, make sure processor references to new controller services are valid [nifi]

2024-01-17 Thread via GitHub


mosermw commented on code in PR #8184:
URL: https://github.com/apache/nifi/pull/8184#discussion_r1455849633


##
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/flow/synchronization/StandardVersionedComponentSynchronizer.java:
##
@@ -1433,6 +1434,14 @@ private Map populatePropertiesMap(final 
ComponentNode componentN
 final String serviceVersionedComponentId = 
proposedProperties.get(propertyName);
 String instanceId = 
getServiceInstanceId(serviceVersionedComponentId, group);
 value = (instanceId == null) ? 
serviceVersionedComponentId : instanceId;
+
+// Find the same property descriptor in the 
component's CreatedExtension and replace it with the
+// instance ID of the service
+createdExtensions.stream().filter(ce -> 
ce.extension.equals(componentNode)).forEach(createdExtension -> {
+LOG.debug("Replacing CreatedExtension property {} 
old value {} with new value {}",
+propertyName, 
createdExtension.propertyValues.get(propertyName) , value);

Review Comment:
   Good point @exceptionfactory, I have removed the debug log statement.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] NIFI-12394 when synching to a VersionedFlow, make sure processor references to new controller services are valid [nifi]

2024-01-12 Thread via GitHub


exceptionfactory commented on code in PR #8184:
URL: https://github.com/apache/nifi/pull/8184#discussion_r1451043360


##
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/flow/synchronization/StandardVersionedComponentSynchronizer.java:
##
@@ -1433,6 +1434,14 @@ private Map populatePropertiesMap(final 
ComponentNode componentN
 final String serviceVersionedComponentId = 
proposedProperties.get(propertyName);
 String instanceId = 
getServiceInstanceId(serviceVersionedComponentId, group);
 value = (instanceId == null) ? 
serviceVersionedComponentId : instanceId;
+
+// Find the same property descriptor in the 
component's CreatedExtension and replace it with the
+// instance ID of the service
+createdExtensions.stream().filter(ce -> 
ce.extension.equals(componentNode)).forEach(createdExtension -> {
+LOG.debug("Replacing CreatedExtension property {} 
old value {} with new value {}",
+propertyName, 
createdExtension.propertyValues.get(propertyName) , value);

Review Comment:
   This debug log should be removed because property values may contain 
sensitive information that should not be logged.
   ```suggestion
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] NIFI-12394 when synching to a VersionedFlow, make sure processor references to new controller services are valid [nifi]

2023-12-27 Thread via GitHub


NissimShiman commented on PR #8184:
URL: https://github.com/apache/nifi/pull/8184#issuecomment-1870398821

   Reviewing...


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] NIFI-12394 when synching to a VersionedFlow, make sure processor references to new controller services are valid [nifi]

2023-12-22 Thread via GitHub


mosermw opened a new pull request, #8184:
URL: https://github.com/apache/nifi/pull/8184

   NIFI-12394 when synching to a VersionedFlow, make sure processor references 
to new controller services are valid after the processor migrates the 
configuration of its properties.
   
   This change is to update controller service references in the 
CreatedExtension properties. This is important when calling 
migrateConfiguration on the component, because that uses the CreatedExtension 
properties as its "original" properties to migrate.
   
   - made sure CreatedExtension was created before the component is updated
   - made controller service reference value "final" so I can use it inside 
lambda function
   - fixed an unrelated but minor log INFO message problem
   - added unit test for synchronizing a new process group with an external 
flow definition
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   # Summary
   
   [NIFI-12394](https://issues.apache.org/jira/browse/NIFI-12394)
   
   # Tracking
   
   Please complete the following tracking steps prior to pull request creation.
   
   ### Issue Tracking
   
   - [x] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI) issue 
created
   
   ### Pull Request Tracking
   
   - [x] Pull Request title starts with Apache NiFi Jira issue number, such as 
`NIFI-0`
   - [x] Pull Request commit message starts with Apache NiFi Jira issue number, 
as such `NIFI-0`
   
   ### Pull Request Formatting
   
   - [x] Pull Request based on current revision of the `main` branch
   - [x] Pull Request refers to a feature branch with one commit containing 
changes
   
   # Verification
   
   Please indicate the verification steps performed prior to pull request 
creation.
   
   ### Build
   
   - [x] Build completed using `mvn clean install -P contrib-check`
 - [x] JDK 21
   
   ### Licensing
   
   - [x] New dependencies are compatible with the [Apache License 
2.0](https://apache.org/licenses/LICENSE-2.0) according to the [License 
Policy](https://www.apache.org/legal/resolved.html)
   - [x] New dependencies are documented in applicable `LICENSE` and `NOTICE` 
files
   
   ### Documentation
   
   - [x] Documentation formatting appears as expected in rendered files
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org