fgerlits commented on code in PR #2227:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2227#discussion_r3721561447


##########
core-framework/include/core/Resource.h:
##########
@@ -57,6 +57,11 @@ class StaticClassType {
 #else
       auto module_name = "minifi-system";
 #endif
+#ifdef MINIFI_EXTENSION_GROUP_NAME
+    auto group_name = MAKESTRING(MINIFI_EXTENSION_GROUP_NAME);
+#else
+    auto group_name = "org.apache.nifi.minifi";
+#endif

Review Comment:
   Can `MINIFI_EXTENSION_GROUP_NAME` be undefined? It may be better to force it 
to be defined, and generate a compile error otherwise.



##########
minifi-api/include/minifi-cpp/agent/agent_docs.h:
##########
@@ -51,39 +57,125 @@ struct ClassDescription {
   bool isSingleThreaded_ = false;
 };
 
-struct Components {
-  std::vector<ClassDescription> processors;
-  std::vector<ClassDescription> controller_services;
-  std::vector<ClassDescription> parameter_providers;
-  std::vector<ClassDescription> other_components;
+struct BundleCoordinate {
+  std::string name;
+  std::string group_name;
+  std::string version;
+
+  auto operator<=>(const BundleCoordinate& rhs) const = default;
+};

Review Comment:
   I think the previous name, `BundleIdentifier`, described the purpose of this 
struct better than `BundleCoordinate`. Can we revert to that?



##########
extensions/python/PythonCreator.h:
##########
@@ -174,7 +175,8 @@ class PythonCreator : public 
minifi::core::CoreComponentImpl {
       .inputRequirement_ = toString(processor->getInputRequirement()),
       .isSingleThreaded_ = processor->isSingleThreaded()};
 
-    
minifi::ClassDescriptionRegistry::getMutableClassDescriptions()[details].processors.push_back(description);
+    auto& bundle_components = 
minifi::ClassDescriptionRegistry::getMutableClassDescriptions().try_emplace(details,
 details).first->second;
+    bundle_components.addClassDescription(description, 
ResourceType::Processor);

Review Comment:
   This `try_emplace(details, details).first->second` looks a bit confusing, 
and it is repeated many times. Can we add a helper function so that we can 
write something like
   ```suggestion
       auto& bundle_components = 
minifi::ClassDescriptionRegistry::getMutableComponents(bundle_identifier);
       bundle_components.addClassDescription(description, 
ResourceType::Processor);
   ```
   instead?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to