NIFI-16235 - Support rebasing locally added Controller Services in versioned Process Groups - #11571
pvillard31 wants to merge 3 commits into
Conversation
…rsioned Process Groups
exceptionfactory
left a comment
There was a problem hiding this comment.
Thanks for this addition @pvillard31. The basic approach looks good, I noted a handful of mostly test-related recommendations
exceptionfactory
left a comment
There was a problem hiding this comment.
Thanks for the updates @pvillard31, I noted one more implementation question, and one other test-related recommendation, then this should be ready to go.
| .formatted(collidingComponent.getClass().getSimpleName(), controllerService.getIdentifier())); | ||
| } | ||
|
|
||
| controllerService.setGroupIdentifier(parentGroup.getIdentifier()); |
There was a problem hiding this comment.
Is this intentional? It appears to change the value of the provided Controller Service, rather than just classifying the changes
There was a problem hiding this comment.
This was intentional to translate the locally mapped parent identifier to the corresponding target Process Group identifier before apply(), but I agree that classify() should not mutate the supplied Controller Service. I will move that translation to the apply phase.
| final ControllerServiceEntity serviceY = util.createControllerService(CONTROLLER_SERVICE_TYPE, originalGroup.getId()); | ||
| util.updateProcessorProperties(fakeProcessor, Map.of(CONTROLLER_SERVICE_PROPERTY, serviceY.getId())); | ||
|
|
||
| final RebaseAnalysisEntity analysis = util.getRebaseAnalysis(originalGroup.getId(), "2"); |
There was a problem hiding this comment.
This 2 value is repeated in a handful of places in this test, so it would be helpful to promote as a static variable
Summary
NIFI-16235 - Support rebasing locally added Controller Services in versioned Process Groups
Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
Pull Request Tracking
NIFI-00000NIFI-00000VerifiedstatusPull Request Formatting
mainbranchVerification
Please indicate the verification steps performed prior to pull request creation.
Build
./mvnw clean install -P contrib-checkLicensing
LICENSEandNOTICEfilesDocumentation