MINIFICPP-2868 - Remove getProcessorType from ProcessorApi - #2219
Open
adamdebreceni wants to merge 2 commits into
Open
MINIFICPP-2868 - Remove getProcessorType from ProcessorApi#2219adamdebreceni wants to merge 2 commits into
adamdebreceni wants to merge 2 commits into
Conversation
lordgamez
approved these changes
Jul 24, 2026
fgerlits
approved these changes
Aug 3, 2026
martinzink
approved these changes
Aug 5, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
This PR removes the getProcessorType() virtual from the public ProcessorApi interface and shifts responsibility for processor “type” to the core::Processor wrapper, updating construction sites across core and extensions accordingly.
Changes:
- Removed
getProcessorType()fromProcessorApi/ProcessorImpland related helper macros. - Introduced
type_stored oncore::Processorand updated constructors/call sites to pass the type explicitly. - Updated tests/fixtures and configuration code to construct
core::Processorwith a type derived from class names or literals.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| minifi-api/include/minifi-cpp/core/ProcessorApi.h | Removes getProcessorType() from the public API interface. |
| core-framework/include/core/ProcessorImpl.h | Removes the macro and pure virtual related to getProcessorType(). |
| libminifi/include/core/Processor.h | Changes Processor constructor to require a type and adds type_ member. |
| libminifi/src/core/Processor.cpp | Stores a passed-in type and returns it from getProcessorType(). |
| libminifi/src/core/ClassLoader.cpp | Passes a derived short class name as processor type. |
| libminifi/src/core/FlowConfiguration.cpp | Constructs reporting task processor with explicit type/name/uuid. |
| libminifi/src/core/flow/StructuredConfiguration.cpp | Wraps funnel/RPG port using literal processor type strings. |
| libminifi/include/Port.h | Makes Port final and passes literal type "Port". |
| libminifi/include/utils/CProcessor.h | Removes CProcessor’s getProcessorType() override. |
| extension-framework/include/core/AbstractProcessor.h | Removes final getProcessorType() implementation. |
| libminifi/test/libtest/unit/ProcessorUtils.h | Updates test helpers to pass derived type and adds StringUtils include. |
| extension-framework/cpp-extension-lib/libtest/CProcessorTestUtils.h | Derives type from description and passes it to Processor. |
| extensions/python/ExecutePythonProcessor.h | Removes ADD_GET_PROCESSOR_NAME usage. |
| extensions/python/tests/ExecutePythonProcessorTests.cpp | Updates processor wrapper construction to pass explicit type. |
| extensions/azure/tests/*.cpp, *.h | Updates processor wrapper construction to pass explicit type. |
| extensions/aws/tests/S3TestsFixture.h | Updates processor wrapper construction to pass explicit type. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
51
to
54
| virtual void initialize(ProcessorDescriptor& descriptor) = 0; | ||
| virtual bool isSingleThreaded() const = 0; | ||
| virtual std::string getProcessorType() const = 0; | ||
| virtual void onTrigger(ProcessContext&, ProcessSession&) = 0; | ||
| virtual void onSchedule(ProcessContext&, ProcessSessionFactory&) = 0; |
| nameStr, parent->getURL(), this->configuration_, uuid, direction); | ||
| auto* port = port_impl.get(); | ||
| auto port_wrapper = std::make_unique<core::Processor>(nameStr, uuid, std::move(port_impl)); | ||
| auto port_wrapper = std::make_unique<core::Processor>("RemoteProcessGroupPort", nameStr, uuid, std::move(port_impl)); |
| }); | ||
|
|
||
| auto funnel = std::make_unique<core::Processor>(name, uuid.value(), std::make_unique<minifi::Funnel>(name, uuid.value())); | ||
| auto funnel = std::make_unique<core::Processor>("Funnel", name, uuid.value(), std::make_unique<minifi::Funnel>(name, uuid.value())); |
| .logger = minifi::core::logging::LoggerFactory<T>::getLogger(uuid.value()) | ||
| }); | ||
| return std::make_unique<core::Processor>(name, uuid.value(), std::move(processor_impl)); | ||
| return std::make_unique<core::Processor>(minifi::utils::string::partAfterLastOccurrenceOf(core::className<T>(), ':'), name, uuid.value(), std::move(processor_impl)); |
| auto name = processor_impl->getName(); | ||
| auto uuid = processor_impl->getUUID(); | ||
| return std::make_unique<core::Processor>(name, uuid, std::move(processor_impl)); | ||
| return std::make_unique<core::Processor>(minifi::utils::string::partAfterLastOccurrenceOf(core::className<T>(), ':'), name, uuid, std::move(processor_impl)); |
Comment on lines
+53
to
+55
| class Port final : public core::Processor { | ||
| public: | ||
| Port(std::string_view name, const utils::Identifier& uuid, std::unique_ptr<PortImpl> impl): Processor(name, uuid, std::move(impl)) {} | ||
| Port(std::string_view name, const utils::Identifier& uuid, std::unique_ptr<PortImpl> impl): Processor("Port", name, uuid, std::move(impl)) {} |
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.
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.