Skip to content

Conversation

mattyb149
Copy link
Contributor

Summary

NIFI-13944 This PR upgrades the Redis library to 5.2.0 along with the corresponding Spring Redis version, and excludes the banned org.json:json dependency in favor of Ted Dunning's version.

Tracking

Please complete the following tracking steps prior to pull request creation.

Issue Tracking

Pull Request Tracking

  • Pull Request title starts with Apache NiFi Jira issue number, such as NIFI-00000
  • Pull Request commit message starts with Apache NiFi Jira issue number, as such NIFI-00000

Pull Request Formatting

  • Pull Request based on current revision of the main branch
  • 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

  • Build completed using mvn clean install -P contrib-check
    • 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

@mattyb149 mattyb149 added the hacktoberfest-accepted Hacktoberfest Accepted label Oct 28, 2024
@joewitt
Copy link
Contributor

joewitt commented Oct 28, 2024

Seems to build. But the bundled dependencies of Spring seem considerable and likely avoidable. The LICENSE/NOTICE is unchanged but clearly does need to change.

Seems like at least a few modules also included that are likely in a parent class loader. Reviewing further but this is a good example of a dependency where maintenance jumps (major lines no less) are much more than bumping versions.

Copy link
Contributor

@exceptionfactory exceptionfactory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the upgrade @mattyb149, this looks good from my perspective.

@joewitt, reviewing the current Redis NAR bundles, they contain roughly the same set of Spring Framework dependencies, most of which are transitive through Spring Data Redis. From that perspective, I think the upgrade works as it stands, although it does highlight the potential need for further review in a separate issue. It is worth noting, however, that only the Framework NAR contains the Spring libraries, so these would not be inherited from the nifi-standard-shared-nar. I will defer to you for further review.

@exceptionfactory
Copy link
Contributor

Although for clarification, it looks like the NOTICE files are outdated, so I agree they should be updated to reflect current contents and versions.

<exclusions>
<exclusion>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
Copy link
Contributor

@exceptionfactory exceptionfactory Oct 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This version of the json library 20240303 is actually licensed under the Public Domain, not the historically banned license. For that reason, the exclusion is not necessary and the banned dependency settings can be adjusted.

Copy link
Contributor

@exceptionfactory exceptionfactory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed in an offline conversation, the license and notice files contain more information than needed as dependencies with the provided scope should not be referenced.

Copy link
Contributor

@exceptionfactory exceptionfactory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks closer to completion, but the information in NOTICE looks like it reflects what is in nifi-redis-service-api-nar, not what is in nifi-redis-nar, so both NOTICE files need to be updated.

pom.xml Outdated
<exclude>org.testng:testng</exclude>
<!-- Cat-X Deps -->
<exclude>org.json:json:*:*:compile</exclude>
<exclude>org.json:json:[,20240303]:compile</exclude>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewing the Maven Version Ranges, it looks like this should use parentheses to indicate x < 20240303:

Suggested change
<exclude>org.json:json:[,20240303]:compile</exclude>
<exclude>org.json:json:(,20240303):compile</exclude>

mattyb149 and others added 2 commits October 29, 2024 18:04
- Removed unnecessary spring-beans library from nifi-redis-extensions
- Added BSD-3 License to nifi-redis-nar for antlr-runtime
- Removed Commons Pool and Spring Framework from NOTICE in nifi-redis-nar
- Added Google GSON to NOTICE for nifi-redis-service-api-nar
- Removed Open JSON from NOTICE for nifi-redis-service-api-nar
- Updated jedis and Spring versions in NOTICE
- Added json Public Domain to NOTICE files
Copy link
Contributor

@exceptionfactory exceptionfactory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates @mattyb149. On further review, I noticed several additional updates needed, which I pushed in the latest commit. +1 merging

@exceptionfactory exceptionfactory merged commit 41edb12 into apache:main Oct 30, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest-accepted Hacktoberfest Accepted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants