nifi icon indicating copy to clipboard operation
nifi copied to clipboard

NIFI-9920 Fetching all bulletins of a process group on update process…

Open aksharau opened this issue 3 years ago • 6 comments

… group

Summary

NIFI-9920

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
    • [ ] JDK 8
    • [x] JDK 11 Used the following for running test cases
mvn -pl nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api  clean test
  • [ ] JDK 17

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

aksharau avatar Aug 25 '22 09:08 aksharau

My suggestion:

Maybe additional test should be created here: https://github.com/apache/nifi/blob/main/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/java/org/apache/nifi/web/StandardNiFiServiceFacadeTest.java, or one of existing ones should be updated?

doodzio avatar Sep 04 '22 14:09 doodzio

Thanks @doodzio for the suggestion. I have added the relevant test cases. Please do note that I had to bump up the mockito version as it was giving me below error for all the existing test cases. Could not initialize plugin: interface org.mockito.plugins.MockMaker (alternate: null)

Should I bump up the mockito version for entire nifi? I saw that nifi-registry is also using a different mockito version, so did not venture into changing it for all of nifi and only updated it for the nifi-web-api module.

aksharau avatar Sep 08 '22 13:09 aksharau

I see that you added additional dependencies, this can be the reason, as you can see, there are already usages of org.mockito. therefore, it is imported as dependency by another library.

Edit: You should try to write test without adding additional dependencies I will try to check this locally

Edit 2: See https://github.com/apache/nifi/blob/3914c0accd82f784d20da976e520b680e9b47fa2/pom.xml#L137, actually used version is 3.11.2, version imported by you 4.7.0

doodzio avatar Sep 08 '22 17:09 doodzio

Thanks @doodzio for checking. Without adding 4.7.0 as dependency, the unit tests failed at my end, even the ones that existed earlier. Hence I had to change the version to 4.7.0. I had also mailed the dev mailing list, I got a suggestion to try with Java 11, will try with that and update.

Edit: I have removed the additional dependency, it worked with java 11 build.

aksharau avatar Sep 09 '22 04:09 aksharau

Hi, I didn't have time recently ( I was AFK).

It seems that your code have some formatting issues, mainly new test cases, It will be to many to point in review. Check this guide for details It contains configuration for eclipse and InteliJ, ~for VSCode you can try Prettier~

You can check formatting errors with mvn checkstyle:check

doodzio avatar Sep 10 '22 19:09 doodzio

Thanks much @doodzio for your comments and guidance. I have applied the formatting changes by checking it with mvn checkstyle:check

aksharau avatar Sep 11 '22 05:09 aksharau

Thanks @aksharau looks good to me. +1 merged to main

markap14 avatar Nov 21 '22 16:11 markap14