jsferner opened a new pull request #4023: NIFI-6873: Added support for replacing a process group via import URL: https://github.com/apache/nifi/pull/4023 Notes... 1. For the purposes of this feature, the root process group (PG) is considered a PG just like any other child PG. It can be downloaded and replaced via import, same as any other child PG. 2. When downloaded, Versioned Component IDs (VCIs) are generated from the PG component identifiers in a deterministic way and used as the IDs in the serialized result. This is identical to how PGs are saved to NiFi Registry. 3. For any downloaded process group (PG), the PG component it was downloaded from is the origin PG. It will always be the origin, until it is deleted. The origin PG and all its descendants will never have VCIs present, but it retains the original IDs that the VCIs were generated from and can always re-generate them deterministically when comparing components on a future import. 4. A downloaded PG can be imported anywhere else and this PG becomes an offspring of the origin. The offspring will have newly generated IDs, but will always have the VCIs from the download in it and will use them when comparing components on a future import. 5. Pasting a copy of an origin or offspring PG generates new IDs for the new components and does not preserve VCIs. Thus, it is treated as a completely different PG since the VCIs it will generate on download are based on its new component IDs. 6. Replacing a version controlled PG (or a PG with child components under version control) via import is not permitted. 7. Downloading a PG currently under version control is allowed, but not recommended because its VCIs most likely were not generated from its IDs since version controlled components are often generated elsewhere and imported. Future uploads to this PG will be disallowed while it's under version control and stopping version control will clear all VCIs. Without VCIs, future imports will regenerate the VCIs from the component IDs and these will not match the VCIs from the download that occurred while the PG was version controlled. In this case, import is still allowed, however all queues will have to be empty because components are removed and re-added. Changes... - decoupled flow update request behavior from VersionsResource into new abstract FlowUpdateResource - added replace process group functionality in ProcessGroupResource - parameterized FlowUpdateResource and created entity hierarchies to allow for maximum code sharing across different update types - refactored flow update methods to make use of commonality across different update types whenever possible - fixed issues in StandardProcessGroup verify update methods where same components existed in different ancestry chains but were considered a match when they shouldn't be - improved StandardProcessGroup to properly match up components on update using generated versioned component ids, when necessary to allow for update flow to efficiently match common components on flow import
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
