Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
mcgilman
left a comment
There was a problem hiding this comment.
Reviewed with emphasis on the connector version-change UI and its supporting framework behavior.
Co-authored-by: Cursor <cursoragent@cursor.com>
|
[grok-4.6] I have moved this PR to draft. My last commit (d3035f2) was a mistake and should not be merged. In response to @bobpaulin's request for revert coverage, I changed I am reverting that behavior and working out the correct approach for what should happen when a version change leaves behind values the target version does not declare. I will update this PR when that is settled. |
|
[grok-4.6] Correction pushed as b4b8ca8. The PR is still in draft until the full system test suite finishes. To be clear about what changed versus my earlier mistake: the framework still discards a stored property or configuration step that the current Connector version does not declare, but it no longer treats that as a free-standing deletion. Two things it deliberately does not do at that moment:
Those happen when the user applies a configuration, which is the point at which the configuration is pushed to the provider and Assets no longer referenced by either the active or working configuration are reclaimed. An Asset stays available until then. Why discard at all: the stored value is not visible to the current version, and Tests:
All 57 connector system tests and the 760 nifi-framework-core unit tests pass. |
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 <cursoragent@cursor.com>
b4b8ca8 to
534d60f
Compare
https://issues.apache.org/jira/browse/NIFI-16283
Summary
Testing
All listed tests passed before rebasing onto the main branch version change to 2.13.0-SNAPSHOT. A post-rebase local Maven run could not begin compilation because the local Maven repository does not yet contain the new 2.13.0-SNAPSHOT reactor artifacts; CI will build those artifacts from the full reactor.