NIFI-12255 refactor PutElasticsearchRecord and PutElasticsearchJson relationships to be more consistent with other processors
Summary
NIFI-12255 refactor PutElasticsearchRecord and PutElasticsearchJson relationships to be more consistent with other processors
Additionally:
- added ability to unit test
migrateRelationshipsfor processor refactoring - addressed issue with
StandardTestRunner#migratePropertieswhere some properties may benull - addressed some warnings in
MockProcessContextandStandardTestRunnerimplementations, improving some logging for easier test failure diagnostics
Breaking Change: addition of the successfull relationship to PutElasticsearchJson will require the connection to be added to a downstream processor (or terminated within the processor config). Relationship has been added for consistency with PutElasticsearchRecord, along with original (automatically renamed from success) and errors.
Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
- [x] Apache NiFi Jira issue created
Pull Request Tracking
- [x] Pull Request title starts with Apache NiFi Jira issue number, such as
NIFI-00000 - [x] Pull Request commit message starts with Apache NiFi Jira issue number, as such
NIFI-00000
Pull Request Formatting
- [x] Pull Request based on current revision of the
mainbranch - [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
- ~[ ] New dependencies are compatible with the Apache License 2.0 according to the License Policy~
- ~[ ] New dependencies are documented in applicable
LICENSEandNOTICEfiles~
Documentation
- ~[ ] Documentation formatting appears as expected in rendered files~
RE the migration testing, I discussed this with @markap14 at the time. I find some issues with the property mock processing, so fixed that (I'll have to reverse engineer what the problem was now, if more details are needed).
Adding the relationship mocking is something that could be separated out, although at the time it helped me confirm the updates I wanted to make and I thought it might be helpful for others in the future. It does, of course, increase this PR a bit though. Happy to create a separate jira ticket and either link it here (to reflect the additional change), or try to separate out the changes if people think it's necessary
I've rebased from latest main to address merge conflicts.
Let me know your thoughts on previous comments @exceptionfactory.
Rebased against latest main to refactor changed into new nifi-extension-bundles module
@ChrisSamo632 Thanks for rebasing and also leveraging migrate properties!