nifi icon indicating copy to clipboard operation
nifi copied to clipboard

NIFI-12255 refactor PutElasticsearchRecord and PutElasticsearchJson relationships to be more consistent with other processors

Open ChrisSamo632 opened this issue 2 years ago • 2 comments

Summary

NIFI-12255 refactor PutElasticsearchRecord and PutElasticsearchJson relationships to be more consistent with other processors

Additionally:

  • added ability to unit test migrateRelationships for processor refactoring
  • addressed issue with StandardTestRunner#migrateProperties where some properties may be null
  • addressed some warnings in MockProcessContext and StandardTestRunner implementations, 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

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 main branch
  • [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 LICENSE and NOTICE files~

Documentation

  • ~[ ] Documentation formatting appears as expected in rendered files~

ChrisSamo632 avatar Oct 26 '23 20:10 ChrisSamo632

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

ChrisSamo632 avatar Jan 18 '24 08:01 ChrisSamo632

I've rebased from latest main to address merge conflicts.

Let me know your thoughts on previous comments @exceptionfactory.

ChrisSamo632 avatar Feb 16 '24 20:02 ChrisSamo632

Rebased against latest main to refactor changed into new nifi-extension-bundles module

ChrisSamo632 avatar May 04 '24 07:05 ChrisSamo632

@ChrisSamo632 Thanks for rebasing and also leveraging migrate properties!

joewitt avatar May 04 '24 16:05 joewitt