[jira] [Commented] (NIFI-12394) when importing versioned flow with component that migrates properties, controller service reference is invalid

2023-12-14 Thread Mark Payne (Jira)


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

Mark Payne commented on NIFI-12394:
---

Thanks for reporting, [~mosermw] . That's a good corner case that I'd not 
thought of.

So when a Processor (or Controller Service or Reporting Task) is created in the 
StandardVersionedComponentSynchronizer, we add a {{CreatedExtension}} to the 
{{createdExtensions}} Map. When the entry is added, it has the original 
property values.

We then call {{updateProcessor}} which calls {{{}populatePropertiesMap{}}}. 
This is the part of the code where, if a Property references a Controller 
Service, it updates the Properties Map.

Then, at the end, we call {{migrateConfiguration}} which is responsible for 
updating the properties, based on the original property values.

So the solution that I would propose would be in {{{}populatePropertiesMap{}}}, 
we update the logic there so that if it maps a property value to a Controller 
Service, we also get the {{CreatedExtension}} from the Map and update the 
property map there too. I believe this should then pass in the values to 
{{migrateConfiguration}} (which then calls {{{}migrateProperties{}}}) with the 
appropriate value.

> when importing versioned flow with component that migrates properties, 
> controller service reference is invalid
> --
>
> Key: NIFI-12394
> URL: https://issues.apache.org/jira/browse/NIFI-12394
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Flow Versioning
>Reporter: Michael W Moser
>Priority: Major
>
> I built a Process Group containing one StandardRestrictedSSLContextService 
> that is referenced by one InvokeHTTP processor.  I downloaded that Process 
> Group as a flow definition {*}with external services{*}.  I also versioned 
> that Process Group in NiFi Registry.
> Inside the flow definition file, I see the 
> StandardRestrictedSSLContextService with 
> "identifier":"d7d70b6c-abe4-3564-a219-b289cb7f25d2" and InvokeHTTP references 
> that UUID.
> When I create a new Process Group using either the downloaded flow definition 
> or the NiFi Registry flow, a new StandardRestrictedSSLContextService is 
> created and it has a new UUID as expected.  The InvokeHTTP processor is 
> invalid because it references the proposed 
> StandardRestrictedSSLContextService UUID d7d70b6c-abe4-3564-a219-b289cb7f25d2 
> which does not exist.
> The service and processor are created and references are updated, but when 
> migrating processor properties and any change occurs, the service reference 
> is reverted back to what was in proposedProperties.



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


[jira] [Commented] (NIFI-12394) when importing versioned flow with component that migrates properties, controller service reference is invalid

2023-12-14 Thread Michael W Moser (Jira)


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

Michael W Moser commented on NIFI-12394:


Thanks [~markap14] I really appreciate your thoughts.  I will work on a PR that 
follows this guidance.

> when importing versioned flow with component that migrates properties, 
> controller service reference is invalid
> --
>
> Key: NIFI-12394
> URL: https://issues.apache.org/jira/browse/NIFI-12394
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Flow Versioning
>Reporter: Michael W Moser
>Priority: Major
>
> I built a Process Group containing one StandardRestrictedSSLContextService 
> that is referenced by one InvokeHTTP processor.  I downloaded that Process 
> Group as a flow definition {*}with external services{*}.  I also versioned 
> that Process Group in NiFi Registry.
> Inside the flow definition file, I see the 
> StandardRestrictedSSLContextService with 
> "identifier":"d7d70b6c-abe4-3564-a219-b289cb7f25d2" and InvokeHTTP references 
> that UUID.
> When I create a new Process Group using either the downloaded flow definition 
> or the NiFi Registry flow, a new StandardRestrictedSSLContextService is 
> created and it has a new UUID as expected.  The InvokeHTTP processor is 
> invalid because it references the proposed 
> StandardRestrictedSSLContextService UUID d7d70b6c-abe4-3564-a219-b289cb7f25d2 
> which does not exist.
> The service and processor are created and references are updated, but when 
> migrating processor properties and any change occurs, the service reference 
> is reverted back to what was in proposedProperties.



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


[jira] [Commented] (NIFI-12394) when importing versioned flow with component that migrates properties, controller service reference is invalid

2024-01-17 Thread ASF subversion and git services (Jira)


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

ASF subversion and git services commented on NIFI-12394:


Commit 050f81f68611c3eba275be2d8824b4fd572b648b in nifi's branch 
refs/heads/main from Michael W Moser
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=050f81f686 ]

NIFI-12394 Fixed Service references for Migrated Configurations

When syncing to a VersionedFlow, make sure processor references to new 
controller services are valid after the processor migrates the configuration of 
its properties

This closes #8184

Signed-off-by: David Handermann 


> when importing versioned flow with component that migrates properties, 
> controller service reference is invalid
> --
>
> Key: NIFI-12394
> URL: https://issues.apache.org/jira/browse/NIFI-12394
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Flow Versioning
>Reporter: Michael W Moser
>Assignee: Michael W Moser
>Priority: Major
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> I built a Process Group containing one StandardRestrictedSSLContextService 
> that is referenced by one InvokeHTTP processor.  I downloaded that Process 
> Group as a flow definition {*}with external services{*}.  I also versioned 
> that Process Group in NiFi Registry.
> Inside the flow definition file, I see the 
> StandardRestrictedSSLContextService with 
> "identifier":"d7d70b6c-abe4-3564-a219-b289cb7f25d2" and InvokeHTTP references 
> that UUID.
> When I create a new Process Group using either the downloaded flow definition 
> or the NiFi Registry flow, a new StandardRestrictedSSLContextService is 
> created and it has a new UUID as expected.  The InvokeHTTP processor is 
> invalid because it references the proposed 
> StandardRestrictedSSLContextService UUID d7d70b6c-abe4-3564-a219-b289cb7f25d2 
> which does not exist.
> The service and processor are created and references are updated, but when 
> migrating processor properties and any change occurs, the service reference 
> is reverted back to what was in proposedProperties.



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