You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "lordgamez (via GitHub)" <gi...@apache.org> on 2023/09/18 08:26:33 UTC

[GitHub] [nifi-minifi-cpp] lordgamez commented on a diff in pull request #1651: MINIFICPP-2193 - Add manifest to debug bundle

lordgamez commented on code in PR #1651:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1651#discussion_r1328392946


##########
libminifi/src/c2/C2Agent.cpp:
##########
@@ -686,6 +686,23 @@ C2Payload C2Agent::bundleDebugInfo(std::map<std::string, std::unique_ptr<io::Inp
       throw C2DebugBundleError("Error while writing file '" + filename + "' into the debug bundle");
     }
   }
+  if (auto node_reporter = node_reporter_.lock()) {
+    constexpr const char* MANIFEST_FILE_NAME = "manifest.json";
+    auto reported_manifest = node_reporter->getAgentManifest();
+    state::response::SerializedResponseNode manifest;
+    manifest.name = std::move(reported_manifest.name);
+    manifest.children = std::move(reported_manifest.serialized_nodes);
+    manifest.array = reported_manifest.is_array;

Review Comment:
   This could be refactored to:
   ```suggestion
       state::response::SerializedResponseNode manifest{
         .name = std::move(reported_manifest.name),
         .children = std::move(reported_manifest.serialized_nodes),
         .array = reported_manifest.is_array
       };
   ```



-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org