[
https://issues.apache.org/jira/browse/NIFI-16398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18132797#comment-18132797
]
Sejal Gupta commented on NIFI-16398:
------------------------------------
Hi [~mcgilman] , I'd like to work on this one and will raise a PR shortly.
Could you assign it to me?
Planned approach:
* Add {{TROUBLESHOOTING}} to {{{}ConnectorState{}}}, and
{{ENTER_TROUBLESHOOTING}} / {{END_TROUBLESHOOTING}} to
{{{}ConnectorActionName{}}}.
* Add shared helpers: {{{}isConnectorInTroubleshooting{}}},
{{canEnterTroubleshooting}} and {{{}canEndTroubleshooting{}}}. Map
{{TROUBLESHOOTING}} to the caution status variant.
* Add {{ConnectorService}} methods that call the existing endpoints: {{POST
/connectors/\{id}/troubleshooting}} to enter and {{DELETE}} on the same path to
end. Both use the current revision.
* Add listing and canvas state actions and effects. They replace the stored
entity from the server response, use the existing error handling, and ignore a
second lifecycle request while one is in flight.
* Add "Enter troubleshooting" and "End troubleshooting" to the listing action
menu and to the canvas connector info panel. Both follow the backend
{{availableActions}} plus read/operate permissions.
* Add unit tests for each of these.
I've already tried it against a local NiFi with the Kafka-to-S3 connector.
Enter and End work from both the listing and the canvas, and the state badge
shows with the caution treatment.
> Add connector troubleshooting actions and state presentation
> ------------------------------------------------------------
>
> Key: NIFI-16398
> URL: https://issues.apache.org/jira/browse/NIFI-16398
> Project: Apache NiFi
> Issue Type: Task
> Components: Core UI
> Reporter: Matt Gilman
> Priority: Major
>
> h2. Background
> The NiFi backend exposes a TROUBLESHOOTING connector state and connector
> actions for entering and ending that state. The frontend does not currently
> recognize the state or present the corresponding actions.
> Users need an explicit, permission-aware way to start and end troubleshooting
> and a consistent visual representation of the active state.
> h2. Goals
> * Add TROUBLESHOOTING to the frontend connector state model.
> * Add ENTER_TROUBLESHOOTING and END_TROUBLESHOOTING action names.
> * Display troubleshooting actions only when allowed by the backend.
> * Execute troubleshooting lifecycle requests through connector state effects.
> * Present the troubleshooting state consistently in connector listings and
> details.
> h2. Scope
> h3. Shared Connector Contracts
> * Add TROUBLESHOOTING to ConnectorState.
> * Add ENTER_TROUBLESHOOTING and END_TROUBLESHOOTING to ConnectorActionName.
> * Add a shared isConnectorInTroubleshooting utility.
> * Map TROUBLESHOOTING to the caution status variant.
> * Update connector permission and action-availability helpers.
> h3. Connector Service and State
> * Add service methods for entering and ending troubleshooting mode.
> * Add connector state actions for both lifecycle operations.
> * Add effects that invoke the service and process successful responses.
> * Update connector entities from server responses rather than constructing
> local state transitions.
> * Surface lifecycle failures through the existing connector error handling.
> * Prevent duplicate requests while a lifecycle operation is already in
> progress.
> h3. Connector Listing
> * Add Enter troubleshooting and End troubleshooting menu actions.
> * Use the backend-provided availableActions collection as the source of truth.
> * Apply connector read/write permission checks.
> * Emit or dispatch the selected connector entity through the existing listing
> ownership boundary.
> * Display TROUBLESHOOTING with the caution status treatment.
> h3. Connector Details
> * Display TROUBLESHOOTING in the connector details header.
> * Use the same shared state-to-status-variant mapping as the listing.
> * Expose lifecycle actions from the details or canvas information controls
> where appropriate.
> h3. Tests
> Add coverage for:
> * Connector state and action-name contracts.
> * Troubleshooting-state detection.
> * Status variant selection.
> * Permission and available-action gating.
> * Listing action visibility.
> * Enter and end action emission.
> * Service request construction.
> * Effect success and failure behavior.
> * Reducer updates from returned connector entities.
> * Prevention of duplicate lifecycle requests.
> h2. Out of Scope
> * Troubleshooting banners on advanced pages.
> * Route guards for troubleshooting-only pages.
> * Component run-status changes.
> * Processor advanced UI access.
> * Connector-scoped Controller Service editing.
> * Remote Process Group refresh.
> * Alignment and provenance replay.
> * Changes to backend lifecycle behavior.
> h2. Acceptance Criteria
> * ConnectorState includes TROUBLESHOOTING.
> * ConnectorActionName includes ENTER_TROUBLESHOOTING and END_TROUBLESHOOTING.
> * Enter troubleshooting is shown only when allowed by the backend and
> permitted for the user.
> * End troubleshooting is shown only when allowed by the backend and permitted
> for the user.
> * Lifecycle requests use the current connector revision and required request
> metadata.
> * Successful responses replace the stored connector entity.
> * Failures are surfaced through the existing error mechanism.
> * Duplicate lifecycle requests cannot be submitted while one is in progress.
> * Connector listings and details render TROUBLESHOOTING with a caution
> treatment.
> * Existing connector states and actions remain unchanged.
> * Frontend lint, strict type-check, unit tests, and production build pass.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)