Skip to content

Commit

Permalink
NIFI-12016: Incorporated review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mattyb149 committed Aug 28, 2024
1 parent d8d80d7 commit f9a5e78
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ static Optional<BundleCoordinate> findOptionalBundleForType(final ExtensionManag
// All NARs that are packaged with NiFi will have the same bundle coordinate as the NiFi framework bundle.
// During an upgrade, it's fairly common to have two versions of a NAR: the version shipped with NiFi and another version, perhaps to maintain
// backward compatibility to because the new version behaves some different way and the user wants the old behavior in some instances, etc.
// In this case, the user may have two versions. For example, version 2.2.0 and 2.4.0 while NiFi is at version 2.4.0.
// Now, during upgrade to 2.4.1, there will no longer be a 2.4.0 available. We want to be smart enough to realize that those extension using version
// 2.2.0 stay there but those using 2.4.0 upgrade to 2.4.1.
// To do this, we always first match on the exact version but this method is called when there's no exact match. So those marked 2.2.0 won't arrive here.
// But for those extensions that were using 2.4.0, we want to now look for version 2.4.1 - I.e., the one with the same version as the framework. If we
// In this case, the user may have two versions. For example, version 1.26.0 and 1.27.0 while NiFi is at version 1.27.0.
// Now, during upgrade to 1.27.1, there will no longer be a 1.27.0 available. We want to be smart enough to realize that those extension using version
// 1.26.0 stay there but those using 1.27.0 upgrade to 1.27.1.
// To do this, we always first match on the exact version but this method is called when there's no exact match. So those marked 1.26.0 won't arrive here.
// But for those extensions that were using 1.27.0, we want to now look for version 1.27.1 - i.e., the one with the same version as the framework. If we
// find that version, then we want to use it. This helps to smooth out the upgrade process even when users have multiple versions of a given NAR.
final String frameworkVersion = frameworkBundle.getBundleDetails().getCoordinate().getVersion();
for (final Bundle bundle : bundles) {
Expand Down

0 comments on commit f9a5e78

Please sign in to comment.