Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR makes improvements to the MiNiFi C API to better support error handling and simplify the API surface. The changes enable C extensions to detect and handle failures in session operations that could previously fail silently.
Changes:
- Modified three C API functions (MinifiProcessSessionTransfer, MinifiProcessSessionRemove, MinifiFlowFileSetAttribute) to return MinifiStatus instead of void for error signaling
- Removed MinifiProcessContextGetProcessorName from the C API as it was redundant with existing logging
- Updated error message formatting across the codebase to exclude processor names (which are already included in exception logging context)
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| minifi-api/minifi-c-api.def | Removed MinifiProcessContextGetProcessorName export |
| minifi-api/include/minifi-c/minifi-c.h | Updated function signatures to return MinifiStatus, removed MinifiProcessContextGetProcessorName declaration |
| libminifi/src/minifi-c.cpp | Implemented status returns with exception handling for transfer/remove/setAttribute operations, removed getProcessorName implementation |
| extension-framework/cpp-extension-lib/src/core/ProcessSession.cpp | Updated C++ wrappers to check status codes and throw exceptions on failure |
| extension-framework/cpp-extension-lib/src/core/ProcessContext.cpp | Removed getProcessorName method implementation |
| extension-framework/cpp-extension-lib/include/api/core/ProcessContext.h | Removed getProcessorName method declaration |
| extension-framework/include/utils/ProcessorConfigUtils.h | Removed processor name from error message formatting |
| extension-framework/cpp-extension-lib/include/api/utils/ProcessorConfigUtils.h | Removed processor name from error message formatting |
| extensions/standard-processors/tests/unit/*.cpp | Updated test expectations to match new error message format without processor names |
| extensions/mqtt/tests/*.cpp | Updated test expectations to match new error message format without processor names |
| extensions/llamacpp/tests/*.cpp | Updated test expectations to match new error message format without processor names |
| extensions/azure/tests/*.cpp | Updated test expectations to match new error message format without processor names |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
adamdebreceni
approved these changes
Feb 20, 2026
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.
Added MinifiStatus return to MinifiProcessSessionTransfer, MinifiProcessSessionRemove, MinifiFlowFileSetAttribute,
since these might(or might in the future) fail I think its best if we could signal failure back to the extensions.
Removed MinifiProcessContextGetProcessorName since it was only used in the parseProperty helper function so they can include the ProcessorName in the exception message, but these calls are already try-d and any failure logged with the processor name already included so we can further reduce the API
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.