MINIFICPP-2764 Controller Service CPP API#2152
Open
martinzink wants to merge 1 commit intocontroller_c_apifrom
Open
MINIFICPP-2764 Controller Service CPP API#2152martinzink wants to merge 1 commit intocontroller_c_apifrom
martinzink wants to merge 1 commit intocontroller_c_apifrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces Controller Service support into the MiNiFi C++ extension C/C++ API surface, including runtime lookup from ProcessContext, C++ wrapper types for controller services, and test utilities to construct/register controller services in unit tests.
Changes:
- Add C API forward declarations and C++ context/wrapper types for Controller Services (including property access via
ControllerServiceContext). - Add
ProcessContext::getControllerService()and config-parsing helpers to resolve controller services from processor properties. - Extend test harness utilities to create/register controller services and modernize some STL usage in tests.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| minifi-api/include/minifi-c/minifi-c.h | Adds opaque MinifiControllerService forward declaration for the C API. |
| libminifi/test/libtest/unit/TestBase.h | Extends TestPlan API (add controller overload, const-correct runProcessor). |
| libminifi/test/libtest/unit/TestBase.cpp | Implements controller registration in tests; modernizes algorithms (ranges); updates log search logic. |
| libminifi/include/utils/CControllerService.h | Adjusts C controller-service class-description bridging function signature. |
| extension-framework/cpp-extension-lib/src/core/ProcessContext.cpp | Implements controller service lookup via C API. |
| extension-framework/cpp-extension-lib/src/core/ControllerServiceImpl.cpp | Adds base implementation for C++ extension controller services. |
| extension-framework/cpp-extension-lib/src/core/ControllerServiceContext.cpp | Implements property retrieval for controller services via C API. |
| extension-framework/cpp-extension-lib/libtest/CProcessorTestUtils.h | Adds helper to create custom C controller services for tests. |
| extension-framework/cpp-extension-lib/include/api/utils/ProcessorConfigUtils.h | Adds helpers to parse controller-service properties and resolve services. |
| extension-framework/cpp-extension-lib/include/api/core/Resource.h | Adds controller-service class description builder and related includes. |
| extension-framework/cpp-extension-lib/include/api/core/ProcessorImpl.h | Minor const/namespace qualification adjustments. |
| extension-framework/cpp-extension-lib/include/api/core/ProcessContext.h | Declares getControllerService API. |
| extension-framework/cpp-extension-lib/include/api/core/ControllerServiceImpl.h | Declares controller service base class for extension authors. |
| extension-framework/cpp-extension-lib/include/api/core/ControllerServiceContext.h | Declares controller service context wrapper. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
extension-framework/cpp-extension-lib/src/core/ControllerServiceContext.cpp
Show resolved
Hide resolved
extension-framework/cpp-extension-lib/include/api/core/Resource.h
Outdated
Show resolved
Hide resolved
extension-framework/cpp-extension-lib/include/api/utils/ProcessorConfigUtils.h
Show resolved
Hide resolved
extension-framework/cpp-extension-lib/src/core/ControllerServiceImpl.cpp
Outdated
Show resolved
Hide resolved
extension-framework/cpp-extension-lib/include/api/core/ControllerServiceImpl.h
Outdated
Show resolved
Hide resolved
extension-framework/cpp-extension-lib/include/api/core/ControllerServiceImpl.h
Show resolved
Hide resolved
extension-framework/cpp-extension-lib/include/api/core/ControllerServiceImpl.h
Outdated
Show resolved
Hide resolved
extension-framework/cpp-extension-lib/src/core/ControllerServiceContext.cpp
Outdated
Show resolved
Hide resolved
8 tasks
936d6ee to
6c3628f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR includes the CPP bindings and wrappers around the stable C API.
This API in action can be seen in #2153
Depends on
Thank you for submitting a contribution to Apache NiFi - MiNiFi C++.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:
Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?
Does your PR title start with MINIFICPP-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
Has your PR been rebased against the latest commit within the target branch (typically main)?
Is your initial contribution a single, squashed commit?
For code changes:
For documentation related changes:
Note:
Please ensure that once the PR is submitted, you check GitHub Actions CI results for build issues and submit an update to your PR as soon as possible.