Skip to content

MINIFICPP-2764 Controller Service CPP API#2152

Open
martinzink wants to merge 1 commit intocontroller_c_apifrom
controller_cpp_api
Open

MINIFICPP-2764 Controller Service CPP API#2152
martinzink wants to merge 1 commit intocontroller_c_apifrom
controller_cpp_api

Conversation

@martinzink
Copy link
Copy Markdown
Member

@martinzink martinzink commented Apr 1, 2026

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:

  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE file?
  • If applicable, have you updated the NOTICE file?

For documentation related changes:

  • Have you ensured that format looks appropriate for the output in which it is rendered?

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.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

@martinzink martinzink force-pushed the controller_cpp_api branch from 936d6ee to 6c3628f Compare April 2, 2026 05:50
@martinzink martinzink marked this pull request as ready for review April 2, 2026 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants