Skip to content

NIFI-15549: Adding endpoints for viewing and clearing state for compo…#10855

Merged
rfellows merged 2 commits intoapache:NIFI-15258from
mcgilman:NIFI-15549
Feb 5, 2026
Merged

NIFI-15549: Adding endpoints for viewing and clearing state for compo…#10855
rfellows merged 2 commits intoapache:NIFI-15258from
mcgilman:NIFI-15549

Conversation

@mcgilman
Copy link
Contributor

@mcgilman mcgilman commented Feb 4, 2026

…nents that are managed by a Connector.

Summary

NIFI-00000

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 contains commits signed with a registered key indicating Verified status

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 ./mvnw clean install -P contrib-check
    • JDK 21
    • JDK 25

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

@pvillard31 pvillard31 added the NIP-11 NIP-11 adds support for Connectors label Feb 4, 2026
Copy link
Contributor

@rfellows rfellows left a comment

Choose a reason for hiding this comment

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

A few things...

Comment on lines 2244 to 2247
serviceFacade.authorizeAccess(lookup -> {
final Authorizable connector = lookup.getConnector(connectorId);
connector.authorize(authorizer, RequestAction.WRITE, NiFiUserUtils.getNiFiUser());
});
Copy link
Contributor

Choose a reason for hiding this comment

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

This should use withWriteLock pattern that is established in other resources for state-modifying operations

Comment on lines 2353 to 2356
serviceFacade.authorizeAccess(lookup -> {
final Authorizable connector = lookup.getConnector(connectorId);
connector.authorize(authorizer, RequestAction.WRITE, NiFiUserUtils.getNiFiUser());
});
Copy link
Contributor

Choose a reason for hiding this comment

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

This should use withWriteLock pattern that is established in other resources for state-modifying operations

Copy link
Contributor

Choose a reason for hiding this comment

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

The unit tests added in TestConnectorResource.java only test the REST resource layer with mocked serviceFacade calls. There are no integration or unit tests for the actual StandardNiFiServiceFacade implementation methods:

  • getConnectorProcessorState
  • clearConnectorProcessorState
  • getConnectorControllerServiceState
  • clearConnectorControllerServiceState
  • locateConnectorProcessor
  • locateConnectorControllerService

Copy link
Contributor

@rfellows rfellows left a comment

Choose a reason for hiding this comment

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

Thanks @mcgilman 👍

@rfellows rfellows merged commit 3f981da into apache:NIFI-15258 Feb 5, 2026
1 of 11 checks passed
markap14 pushed a commit that referenced this pull request Feb 11, 2026
#10855)

* NIFI-15549: Adding endpoints for viewing and clearing state for components that are managed by a Connector.

* NIFI-15549: Addressing review feedback.
pvillard31 pushed a commit to pvillard31/nifi that referenced this pull request Feb 14, 2026
apache#10855)

* NIFI-15549: Adding endpoints for viewing and clearing state for components that are managed by a Connector.

* NIFI-15549: Addressing review feedback.
pvillard31 pushed a commit that referenced this pull request Feb 14, 2026
#10855)

* NIFI-15549: Adding endpoints for viewing and clearing state for components that are managed by a Connector.

* NIFI-15549: Addressing review feedback.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

NIP-11 NIP-11 adds support for Connectors

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants