[ 
https://issues.apache.org/jira/browse/NIFI-15341?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18046388#comment-18046388
 ] 

Paul Grey commented on NIFI-15341:
----------------------------------

{quote}Thoughts on making this easier to support from a client-side perspective?
{quote}
In looking at the current implementations of `migrateProperties()`, it appears 
that they mostly consist of simple renames and removes, which could be solved 
with two column CSV structure you suggest.  But the current code solution 
doesn't block the introduction of more complex logic.  Here are a few examples 
where conditional logic is being used:
 * 
[https://github.com/apache/nifi/blob/49778f23c38aad41e1b20c0bdd538a5ab18235ea/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-abstract-processors/src/main/java/org/apache/nifi/processors/aws/s3/AbstractS3Processor.java#L183-L196]
 * 
[https://github.com/apache/nifi/blob/f918193a0943d2b425ae70fb15053f86a51aa40a/nifi-extension-bundles/nifi-extension-utils/nifi-migration-utils/src/main/java/org/apache/nifi/migration/ProxyServiceMigration.java#L116-L128]
 * 
https://github.com/apache/nifi/blob/49778f23c38aad41e1b20c0bdd538a5ab18235ea/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/s3/PutS3Object.java#L371-L391

What are your thoughts on accounting for more complex logic during migrations?

 

> External Controller Service resolution can break with property migration
> ------------------------------------------------------------------------
>
>                 Key: NIFI-15341
>                 URL: https://issues.apache.org/jira/browse/NIFI-15341
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>    Affects Versions: 2.7.1
>            Reporter: Joe Gresock
>            Assignee: Joe Gresock
>            Priority: Minor
>         Attachments: CS_Resolution.json
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> When importing or replacing a Process Group, External Controller Services can 
> fail to resolve if a component property was renamed between the versioned 
> flow and the currently installed bundle using property migration.
> To reproduce in 2.4.0 or later, download attached JSON file representing a 
> Process Group Replace request.  Then log into NiFi and copy the Bearer token. 
>  Then create a new blank process group in NiFi and copy its identifier for 
> below.
> Next, create a new StandardRestrictedSSLContextService at the root canvas and 
> name it "SSL Context Service".
> {code:java}
> BEARER_TOKEN=<paste bearer token>
> PG_ID=<pg id>
> curl -k -vv -X POST 
> https://localhost:8443/nifi-api/process-groups/$PG_ID/replace-requests -H 
> "Content-Type: application/json" -H "Authorization: Bearer $BEARER_TOKEN" -d 
> @CS_Resolution.json
> {code}
> Observe that the SSL Context Service property in the MongoDBControllerService 
> now references a UUID instead of the "SSL Context Service" service.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to