MINIFICPP-2765 Move GCP Extension to stable C API#2153
Open
martinzink wants to merge 4 commits intocontroller_cpp_apifrom
Open
MINIFICPP-2765 Move GCP Extension to stable C API#2153martinzink wants to merge 4 commits intocontroller_cpp_apifrom
martinzink wants to merge 4 commits intocontroller_cpp_apifrom
Conversation
There was a problem hiding this comment.
Pull request overview
Migrates the GCP extension from the legacy MiNiFi C++ extension model to the stable C API extension model, updating processors, controller services, and tests accordingly.
Changes:
- Ported GCP processors and the credentials controller service to the stable C API (
api::core::*) lifecycle (onScheduleImpl/onTriggerImpl/enableImpl). - Replaced
REGISTER_RESOURCEregistration with a newExtensionInitializer.cppusingMinifiInitExtensionregistration calls. - Updated GCP extension unit tests to use C API test utilities and adjusted test linking.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| extensions/gcp/tests/PutGCSObjectTests.cpp | Updates processor tests to use C API processor/controller-service wrappers and shared mock client injection. |
| extensions/gcp/tests/ListGCSBucketTests.cpp | Updates list-bucket tests to C API controller service creation and processor property setting. |
| extensions/gcp/tests/GCPCredentialsControllerServiceTests.cpp | Adjusts controller service tests for C API controller service wrapper access and property setting. |
| extensions/gcp/tests/FetchGCSObjectTests.cpp | Refactors fetch tests to C API processor creation and property accessors. |
| extensions/gcp/tests/DeleteGCSObjectTests.cpp | Refactors delete tests to C API processor creation and property accessors. |
| extensions/gcp/tests/CMakeLists.txt | Switches test linking to libminifi-c-unittest for the C API test harness. |
| extensions/gcp/processors/PutGCSObject.h | Moves processor to C API lifecycle overrides and updates includes/annotations. |
| extensions/gcp/processors/PutGCSObject.cpp | Implements onScheduleImpl / onTriggerImpl and uses API property parsing and session attribute APIs. |
| extensions/gcp/processors/ListGCSBucket.h | Moves processor to C API lifecycle overrides and updates includes/annotations. |
| extensions/gcp/processors/ListGCSBucket.cpp | Implements onScheduleImpl / onTriggerImpl and uses API property parsing and session attribute APIs. |
| extensions/gcp/processors/GCSProcessor.h | Migrates base processor to api::core::ProcessorImpl and updates scheduling/credentials retrieval APIs. |
| extensions/gcp/processors/GCSProcessor.cpp | Implements onScheduleImpl and updates controller service parsing to API utilities. |
| extensions/gcp/processors/FetchGCSObject.h | Moves processor to C API lifecycle overrides and updates includes/annotations. |
| extensions/gcp/processors/FetchGCSObject.cpp | Implements onScheduleImpl / onTriggerImpl and uses API property parsing and session attribute APIs. |
| extensions/gcp/processors/DeleteGCSObject.h | Moves processor to C API lifecycle overrides and updates includes/annotations. |
| extensions/gcp/processors/DeleteGCSObject.cpp | Implements onTriggerImpl and uses API property parsing and session attribute APIs. |
| extensions/gcp/controllerservices/GCPCredentialsControllerService.h | Migrates controller service to api::core::ControllerServiceImpl and introduces enableImpl. |
| extensions/gcp/controllerservices/GCPCredentialsControllerService.cpp | Implements credentials loading via controller service context and adds file-content helper. |
| extensions/gcp/GCPAttributes.h | Switches metadata attribute setting to use api::core::ProcessSession::setAttribute. |
| extensions/gcp/ExtensionInitializer.cpp | Adds stable C API extension entry point and registers processors/controller service. |
| extensions/gcp/CMakeLists.txt | Registers the extension via register_c_api_extension and links extension lib accordingly. |
Comments suppressed due to low confidence (1)
extensions/gcp/controllerservices/GCPCredentialsControllerService.cpp:1
- enableImpl() always returns MINIFI_STATUS_SUCCESS, even when the credentials location is invalid or credential creation fails (credentials_ stays null). This can leave the controller service enabled in a broken state and shifts the failure downstream. Return a non-success status (and ideally stop enabling) when credentials_location is missing/invalid or when credentials_ could not be created.
/**
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
080caf9 to
598f925
Compare
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.
Depends on but can be independenly reviewed because that PR is implementation detail for the GCP refactor
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.