This is an automated email from the ASF dual-hosted git repository.

szaszm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git


The following commit(s) were added to refs/heads/main by this push:
     new 5ca60f3ec MINIFICPP-2837 Missing ProvidesApi from 
AttributeProviderService (#2192)
5ca60f3ec is described below

commit 5ca60f3ecb38e1c39035b60b042cb3198043eab6
Author: Martin Zink <[email protected]>
AuthorDate: Wed Jun 3 10:36:33 2026 +0200

    MINIFICPP-2837 Missing ProvidesApi from AttributeProviderService (#2192)
    
    Co-authored-by: Copilot Autofix powered by AI 
<[email protected]>
---
 .github/references/ubuntu_22_04_clang_arm_manifest.json       |  9 ++++++++-
 .../controllerservice/KubernetesControllerService.h           |  2 ++
 extensions/standard-processors/tests/unit/TailFileTests.cpp   |  2 ++
 .../include/minifi-cpp/controllers/AttributeProviderService.h | 11 ++++++++++-
 4 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/.github/references/ubuntu_22_04_clang_arm_manifest.json 
b/.github/references/ubuntu_22_04_clang_arm_manifest.json
index 18cf7a894..863fe0405 100644
--- a/.github/references/ubuntu_22_04_clang_arm_manifest.json
+++ b/.github/references/ubuntu_22_04_clang_arm_manifest.json
@@ -11192,7 +11192,14 @@
                 "typeDescription": "Controller service that provides access to 
the Kubernetes API",
                 "supportsDynamicRelationships": "false",
                 "supportsDynamicProperties": "false",
-                "type": 
"org.apache.nifi.minifi.controllers.KubernetesControllerService"
+                "type": 
"org.apache.nifi.minifi.controllers.KubernetesControllerService",
+                "providedApiImplementations": [
+                    {
+                        "artifact": "minifi-system",
+                        "group": "org.apache.nifi.minifi",
+                        "type": 
"org.apache.nifi.minifi.controllers.AttributeProviderService"
+                    }
+                ]
             },
             {
                 "propertyDescriptors": {
diff --git 
a/extensions/kubernetes/controllerservice/KubernetesControllerService.h 
b/extensions/kubernetes/controllerservice/KubernetesControllerService.h
index d2db5031d..0bda80b62 100644
--- a/extensions/kubernetes/controllerservice/KubernetesControllerService.h
+++ b/extensions/kubernetes/controllerservice/KubernetesControllerService.h
@@ -57,6 +57,8 @@ class KubernetesControllerService : public 
AttributeProviderServiceImpl {
   EXTENSIONAPI static constexpr bool SupportsDynamicProperties = false;
   ADD_COMMON_VIRTUAL_FUNCTIONS_FOR_CONTROLLER_SERVICES
 
+  static constexpr auto ImplementsApis = std::array{ 
AttributeProviderService::ProvidesApi };
+
   void initialize() final;
   void onEnable() override;
   std::optional<std::vector<AttributeMap>> getAttributes() override;
diff --git a/extensions/standard-processors/tests/unit/TailFileTests.cpp 
b/extensions/standard-processors/tests/unit/TailFileTests.cpp
index d74291317..f15705173 100644
--- a/extensions/standard-processors/tests/unit/TailFileTests.cpp
+++ b/extensions/standard-processors/tests/unit/TailFileTests.cpp
@@ -1718,6 +1718,8 @@ class TestAttributeProviderService final : public 
minifi::controllers::Attribute
   static constexpr bool SupportsDynamicProperties = false;
   ADD_COMMON_VIRTUAL_FUNCTIONS_FOR_CONTROLLER_SERVICES
 
+  static constexpr auto ImplementsApis = std::array{ 
AttributeProviderService::ProvidesApi };
+
   void initialize() override {};
   void onEnable() override {};
   std::optional<std::vector<AttributeMap>> getAttributes() override {
diff --git 
a/minifi-api/include/minifi-cpp/controllers/AttributeProviderService.h 
b/minifi-api/include/minifi-cpp/controllers/AttributeProviderService.h
index 85a84d3ce..64f2b6883 100644
--- a/minifi-api/include/minifi-cpp/controllers/AttributeProviderService.h
+++ b/minifi-api/include/minifi-cpp/controllers/AttributeProviderService.h
@@ -22,14 +22,23 @@
 #include <vector>
 
 #include "minifi-cpp/core/controller/ControllerServiceHandle.h"
+#include "minifi-cpp/core/ControllerServiceTypeDefinition.h"
+#include "minifi-cpp/agent/agent_version.h"
 
 namespace org::apache::nifi::minifi::controllers {
 
 class AttributeProviderService : public 
core::controller::ControllerServiceHandle {
  public:
+  static constexpr auto ProvidesApi = core::ControllerServiceTypeDefinition {
+    .artifact = "minifi-system",
+    .group = "org.apache.nifi.minifi",
+    .type = "org.apache.nifi.minifi.controllers.AttributeProviderService",
+    .version = MINIFI_VERSION_STR
+  };
+
   using AttributeMap = std::unordered_map<std::string, std::string>;
   virtual std::optional<std::vector<AttributeMap>> getAttributes() = 0;
-  virtual std::string_view name() const = 0;
+  [[nodiscard]] virtual std::string_view name() const = 0;
 };
 
 }  // namespace org::apache::nifi::minifi::controllers

Reply via email to