[
https://issues.apache.org/jira/browse/NIFI-16283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18129614#comment-18129614
]
ASF subversion and git services commented on NIFI-16283:
--------------------------------------------------------
Commit 8e00cad5d36d8d00af110ec7cf566f8274743e8b in nifi's branch
refs/heads/main from Mark Payne
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=8e00cad5d36 ]
NIFI-16283 Support changing Connector versions (#11677)
* NIFI-16283 Support changing Connector versions
Co-authored-by: Cursor <[email protected]>
* NIFI-16283 Address connector version review feedback
Co-authored-by: Cursor <[email protected]>
* NIFI-16283 Discard Connector configuration a version no longer declares
Changing a Connector's NAR version to one that does not declare a stored
property or configuration step left the stored value in place, which made
the Connector invalid for a property the new version does not know about.
Because StandardConnectorConfigurationContext.setProperties merges rather
than replaces, the UI could not clear a property it does not know exists,
so the Connector could not be recovered. After migrateProperties runs, the
configuration now keeps only what the current version declares.
Discarding a value does not push the configuration to the
ConnectorConfigurationProvider and does not reclaim any Asset the value
referenced. Assets are reclaimed when the user applies a configuration,
which is also what pushes to the provider.
Tests:
- TestStandardConnectorNode verifies a replacement drops an undeclared
property and configuration step, retains declared values, and leaves the
referenced Asset intact.
- TestStandardConnectorRepository verifies applying an update reclaims
Assets no longer referenced by the active or working configuration.
- ConnectorChangeVersionIT changes 1.0.0 to 2.0.0 and back, then exercises
Troubleshooting on the reverted version.
Co-authored-by: Cursor <[email protected]>
* NIFI-16283 Drive connector version changes from available actions
The connector table was repeating the reload rule on its own. Report a
CHANGE_VERSION action that is allowed only when a reload would succeed, and
have the table read that action.
Co-authored-by: Cursor <[email protected]>
* NIFI-16283 Address connector action review feedback
Co-authored-by: Cursor <[email protected]>
* NIFI-16283 Merge connector types across nodes and migrate with replacement
ClassLoader
Co-authored-by: Cursor <[email protected]>
---------
Co-authored-by: Cursor <[email protected]>
> Support changing the NAR version of an existing Connector
> ---------------------------------------------------------
>
> Key: NIFI-16283
> URL: https://issues.apache.org/jira/browse/NIFI-16283
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Core Framework, Core UI
> Reporter: Mark Payne
> Assignee: Mark Payne
> Priority: Major
> Time Spent: 3h
> Remaining Estimate: 0h
>
> h2. Problem
> Users can change the NAR version of a Processor, Controller Service,
> Reporting Task, Flow Analysis Rule, Parameter Provider, or Registry Client
> while keeping the same component instance. Connectors have no equivalent.
> PUT /connectors/{id} accepts a ConnectorDTO that includes a bundle, but
> StandardConnectorDAO.updateConnector only updates the name. The requested
> bundle is ignored. DtoFactory.createConnectorDto never populates
> multipleVersionsAvailable. ReloadComponent has no Connector method. The
> Connectors UI has no Change Version action.
> Startup can remap a missing Connector bundle when exactly one compatible NAR
> is present (ConnectorVersionResolutionIT). That is not a user-initiated
> version change, and it does not cover choosing among multiple installed
> versions or replacing a GhostConnector.
> h2. Desired behavior
> When more than one NAR provides the same Connector type (same group and
> artifact, different version), or when a GhostConnector has at least one
> compatible NAR:
> * GET /connectors/{id} sets multipleVersionsAvailable using the same
> compatible-bundle counting as Processors.
> * The Connectors UI offers Change Version, listing versions from GET
> /flow/connector-types with a type filter (same pattern as
> getProcessorVersionsForType).
> * PUT /connectors/{id} with a new bundle coordinate of the same group and
> artifact reloads the Connector implementation, analogous to
> StandardProcessorDAO.updateBundle / StandardReportingTaskDAO.updateBundle.
> * Changing group or artifact is rejected.
> * Version change is allowed only in a safe lifecycle state (at least STOPPED,
> not Troubleshooting / draining / updating).
> * After reload, identity, managed Process Group, configuration, and assets
> are preserved; configuration-step schema differences are handled consistently
> with other extension reloads (keep overlapping properties, surface
> invalid/new properties).
> h2. Scope
> * Framework: StandardConnectorDAO verify + updateBundle;
> ReloadComponent/StandardReloadComponent.reload(ConnectorNode, ...);
> ConnectorNode/StandardConnectorNode bundle-update verification and instance
> swap (classloader, GhostConnector -> real type, @OnRemoved/@OnAdded as for
> other types).
> * REST: honor bundle on PUT /connectors/{id}; populate
> multipleVersionsAvailable in DtoFactory.createConnectorDto.
> * UI: Change Version on the connector table/menu using
> ChangeComponentVersionDialog and GET /flow/connector-types.
> * nifi-toolkit command mirroring change-version-processor, required for the
> system test.
> * Tests: unit tests for DAO/reload; system test with two NAR versions of the
> same Connector type; ghost-to-real replacement.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)