-
Notifications
You must be signed in to change notification settings - Fork 99
MINIFICPP-2708 Controller Service C API #2096
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: MINIFICPP-2669
Are you sure you want to change the base?
Conversation
c4355e7 to
52b5626
Compare
There was a problem hiding this 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 pull request implements a C API for Controller Services, extending the existing C API infrastructure (which previously only supported Processors) to include Controller Services. This aligns with the JIRA ticket MINIFICPP-2708 and allows Controller Services to be defined and used through the C interface.
Changes:
- Renamed
ControllerServiceApi/ControllerServiceApiDefinitiontypes toControllerServiceType/ControllerServiceTypeDefinitionfor better clarity - Moved
ControllerServiceMetadatafromcore::controllernamespace tocorenamespace for consistency - Added C API structures and functions for Controller Service definition, creation, and property access
Reviewed changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| minifi-api/include/minifi-c/minifi-c.h | Adds C API structures for controller services including MinifiControllerServiceContext, MinifiControllerServiceMetadata, MinifiControllerServiceCallbacks, and MinifiControllerServiceClassDefinition |
| libminifi/include/utils/CControllerService.h | New C++ wrapper class for controller services created through C API |
| libminifi/src/minifi-c.cpp | Implements C API functions for controller service operations including property access and service retrieval |
| minifi-api/include/minifi-cpp/core/ControllerServiceType.h | Renames ControllerServiceApi to ControllerServiceType for clarity |
| minifi-api/include/minifi-cpp/core/ControllerServiceTypeDefinition.h | Renames ControllerServiceApiDefinition to ControllerServiceTypeDefinition |
| minifi-api/common/include/minifi-cpp/core/ControllerServiceMetadata.h | Moves from controller namespace to core namespace |
| minifi-api/include/minifi-cpp/core/controller/ControllerServiceDescriptor.h | Adds overload for setSupportedProperties accepting Property span |
| libminifi/include/core/controller/ControllerService.h | Updates to use renamed types and implements new setSupportedProperties overload |
| extensions/*/*.cpp | Updates extension loaders to include new controller_services_count and controller_services_ptr fields |
| Extensions.md | Documents the new controller service fields in MinifiExtensionCreateInfo |
Comments suppressed due to low confidence (1)
minifi-api/common/include/minifi-cpp/core/ControllerServiceMetadata.h:2
- Inconsistent comment formatting: the asterisk on line 2 is not aligned with the others. It should be aligned with line 3's asterisk for consistency.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
0e54f0b to
d6bf004
Compare
b6d2def to
0a5d4de
Compare
| cb(user_ctx, | ||
| c_controller_service->getImpl(), | ||
| minifiStringView(class_description.group_name), | ||
| minifiStringView(class_description.name), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are group_name and name switched up?
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.