Mark Payne created NIFI-16283:
---------------------------------
Summary: 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 UI, Core Framework
Reporter: Mark Payne
Assignee: Mark Payne
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)