You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2020/12/11 15:06:59 UTC

[GitHub] [nifi-minifi-cpp] adamdebreceni opened a new pull request #957: MINIFICPP-1407 - Fetch flow configuration file from C2 if not found locally

adamdebreceni opened a new pull request #957:
URL: https://github.com/apache/nifi-minifi-cpp/pull/957


   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:
   - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
   - [ ] If applicable, have you updated the LICENSE file?
   - [ ] If applicable, have you updated the NOTICE file?
   
   ### For documentation related changes:
   - [ ] Have you ensured that format looks appropriate for the output in which it is rendered?
   
   ### 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.
   


----------------------------------------------------------------
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.

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



[GitHub] [nifi-minifi-cpp] adamdebreceni commented on a change in pull request #957: MINIFICPP-1407 - Fetch flow configuration file from C2 if not found locally

Posted by GitBox <gi...@apache.org>.
adamdebreceni commented on a change in pull request #957:
URL: https://github.com/apache/nifi-minifi-cpp/pull/957#discussion_r551917293



##########
File path: libminifi/include/core/controller/ForwardingControllerServiceProvider.h
##########
@@ -0,0 +1,136 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include <memory>
+#include <vector>
+#include <string>
+
+#include "ControllerServiceProvider.h"
+#include "ControllerServiceNode.h"
+
+namespace org {
+namespace apache {
+namespace nifi {
+namespace minifi {
+namespace core {
+namespace controller {
+
+class ForwardingControllerServiceProvider : public ControllerServiceProvider {

Review comment:
       note that it was already present in `FlowController`, it has just been moved out, I am all for eliminating the need for it altogether




----------------------------------------------------------------
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.

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



[GitHub] [nifi-minifi-cpp] arpadboda closed pull request #957: MINIFICPP-1407 - Fetch flow configuration file from C2 if not found locally

Posted by GitBox <gi...@apache.org>.
arpadboda closed pull request #957:
URL: https://github.com/apache/nifi-minifi-cpp/pull/957


   


----------------------------------------------------------------
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.

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



[GitHub] [nifi-minifi-cpp] adamdebreceni commented on a change in pull request #957: MINIFICPP-1407 - Fetch flow configuration file from C2 if not found locally

Posted by GitBox <gi...@apache.org>.
adamdebreceni commented on a change in pull request #957:
URL: https://github.com/apache/nifi-minifi-cpp/pull/957#discussion_r541013520



##########
File path: encrypt-config/tests/ConfigFileEncryptorTests.cpp
##########
@@ -28,7 +28,7 @@ size_t base64_length(size_t unencoded_length) {
   return (unencoded_length + 2) / 3 * 4;
 }
 
-bool check_encryption(const ConfigFile& test_file, const std::string& property_name, size_t original_value_length) {
+bool check_encryption(const  ConfigFile& test_file, const std::string& property_name, size_t original_value_length) {

Review comment:
       accidental space




----------------------------------------------------------------
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.

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



[GitHub] [nifi-minifi-cpp] adamdebreceni commented on a change in pull request #957: MINIFICPP-1407 - Fetch flow configuration file from C2 if not found locally

Posted by GitBox <gi...@apache.org>.
adamdebreceni commented on a change in pull request #957:
URL: https://github.com/apache/nifi-minifi-cpp/pull/957#discussion_r541013716



##########
File path: encrypt-config/tests/ConfigFileEncryptorTests.cpp
##########
@@ -67,7 +69,7 @@ TEST_CASE("ConfigFileEncryptor can encrypt the sensitive properties", "[encrypt-
       "6q9u8LEDy1/CdmSBm8oSqPS/Ds5UOD2nRouP8yUoK10="));
 
   SECTION("default properties") {
-    ConfigFile test_file{std::ifstream{"resources/minifi.properties"}};
+     ConfigFile test_file{std::ifstream{"resources/minifi.properties"}};

Review comment:
       incorrect indentation (and more in this file)




----------------------------------------------------------------
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.

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



[GitHub] [nifi-minifi-cpp] adamdebreceni commented on a change in pull request #957: MINIFICPP-1407 - Fetch flow configuration file from C2 if not found locally

Posted by GitBox <gi...@apache.org>.
adamdebreceni commented on a change in pull request #957:
URL: https://github.com/apache/nifi-minifi-cpp/pull/957#discussion_r541014643



##########
File path: libminifi/include/FlowController.h
##########
@@ -304,6 +192,9 @@ class FlowController : public core::controller::ControllerServiceProvider,  publ
 
   std::vector<BackTrace> getTraces() override;
 
+ private:
+  std::unique_ptr<core::ProcessGroup> instantiateNetwork();

Review comment:
       not the best name, to-be-renamed




----------------------------------------------------------------
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.

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



[GitHub] [nifi-minifi-cpp] adamdebreceni commented on a change in pull request #957: MINIFICPP-1407 - Fetch flow configuration file from C2 if not found locally

Posted by GitBox <gi...@apache.org>.
adamdebreceni commented on a change in pull request #957:
URL: https://github.com/apache/nifi-minifi-cpp/pull/957#discussion_r551917293



##########
File path: libminifi/include/core/controller/ForwardingControllerServiceProvider.h
##########
@@ -0,0 +1,136 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include <memory>
+#include <vector>
+#include <string>
+
+#include "ControllerServiceProvider.h"
+#include "ControllerServiceNode.h"
+
+namespace org {
+namespace apache {
+namespace nifi {
+namespace minifi {
+namespace core {
+namespace controller {
+
+class ForwardingControllerServiceProvider : public ControllerServiceProvider {

Review comment:
       note that it was already present in `FlowController`, it has just been moved out, I am all for eliminating it altogether




----------------------------------------------------------------
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.

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



[GitHub] [nifi-minifi-cpp] arpadboda closed pull request #957: MINIFICPP-1407 - Fetch flow configuration file from C2 if not found locally

Posted by GitBox <gi...@apache.org>.
arpadboda closed pull request #957:
URL: https://github.com/apache/nifi-minifi-cpp/pull/957


   


----------------------------------------------------------------
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.

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



[GitHub] [nifi-minifi-cpp] adamdebreceni commented on a change in pull request #957: MINIFICPP-1407 - Fetch flow configuration file from C2 if not found locally

Posted by GitBox <gi...@apache.org>.
adamdebreceni commented on a change in pull request #957:
URL: https://github.com/apache/nifi-minifi-cpp/pull/957#discussion_r551922177



##########
File path: extensions/http-curl/tests/HTTPHandlers.h
##########
@@ -447,35 +447,43 @@ class HeartbeatHandler : public ServerAwareHandler {
   }
 };
 
-class C2UpdateHandler : public ServerAwareHandler {
+class C2FlowProvider : public ServerAwareHandler {
  public:
-  explicit C2UpdateHandler(const std::string& test_file_location)
-    : test_file_location_(test_file_location) {
+  explicit C2FlowProvider(const std::string& test_file_location)
+      : test_file_location_(test_file_location) {
   }
 
-  bool handlePost(CivetServer *server, struct mg_connection *conn) override {
-    calls_++;
-    if (!response_.empty()) {
+  bool handleGet(CivetServer *server, struct mg_connection *conn) override {
+    std::ifstream myfile(test_file_location_.c_str(), std::ios::in | std::ios::binary);
+    if (myfile.good()) {
+      std::string str((std::istreambuf_iterator<char>(myfile)), (std::istreambuf_iterator<char>()));
       mg_printf(conn, "HTTP/1.1 200 OK\r\nContent-Type: "
-                "text/plain\r\nContent-Length: %lu\r\nConnection: close\r\n\r\n",
-                response_.length());
-      mg_printf(conn, "%s", response_.c_str());
-      response_.clear();
+                      "text/plain\r\nContent-Length: %lu\r\nConnection: close\r\n\r\n",
+                str.length());
+      mg_printf(conn, "%s", str.c_str());
     } else {
       mg_printf(conn, "HTTP/1.1 500 Internal Server Error\r\n");
     }
 
     return true;
   }
 
-  bool handleGet(CivetServer *server, struct mg_connection *conn) override {
-    std::ifstream myfile(test_file_location_.c_str(), std::ios::in | std::ios::binary);
-    if (myfile.good()) {
-      std::string str((std::istreambuf_iterator<char>(myfile)), (std::istreambuf_iterator<char>()));
+ private:
+  std::string test_file_location_;

Review comment:
       made it const




----------------------------------------------------------------
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.

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



[GitHub] [nifi-minifi-cpp] adamdebreceni commented on a change in pull request #957: MINIFICPP-1407 - Fetch flow configuration file from C2 if not found locally

Posted by GitBox <gi...@apache.org>.
adamdebreceni commented on a change in pull request #957:
URL: https://github.com/apache/nifi-minifi-cpp/pull/957#discussion_r551908167



##########
File path: libminifi/include/core/controller/ForwardingControllerServiceProvider.h
##########
@@ -0,0 +1,136 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include <memory>
+#include <vector>
+#include <string>
+
+#include "ControllerServiceProvider.h"
+#include "ControllerServiceNode.h"
+
+namespace org {
+namespace apache {
+namespace nifi {
+namespace minifi {
+namespace core {
+namespace controller {
+
+class ForwardingControllerServiceProvider : public ControllerServiceProvider {

Review comment:
       its purpose is to make the `FlowController` class skinnier as I was finding myself scrolling a lot, and I thought it is a general-enough behavior to factor out




----------------------------------------------------------------
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.

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



[GitHub] [nifi-minifi-cpp] adamdebreceni commented on a change in pull request #957: MINIFICPP-1407 - Fetch flow configuration file from C2 if not found locally

Posted by GitBox <gi...@apache.org>.
adamdebreceni commented on a change in pull request #957:
URL: https://github.com/apache/nifi-minifi-cpp/pull/957#discussion_r541016032



##########
File path: libminifi/include/properties/Properties.h
##########
@@ -45,19 +51,19 @@ class Properties {
 
   // Clear the load config
   void clear() {
-    std::lock_guard<std::mutex> lock(mutex_);
+    std::lock_guard<std::recursive_mutex> lock(mutex_);

Review comment:
       forgot why we needed the `recursive_mutex`, add explanation pls




----------------------------------------------------------------
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.

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



[GitHub] [nifi-minifi-cpp] arpadboda commented on a change in pull request #957: MINIFICPP-1407 - Fetch flow configuration file from C2 if not found locally

Posted by GitBox <gi...@apache.org>.
arpadboda commented on a change in pull request #957:
URL: https://github.com/apache/nifi-minifi-cpp/pull/957#discussion_r551898202



##########
File path: extensions/http-curl/tests/HTTPHandlers.h
##########
@@ -499,8 +507,8 @@ class C2UpdateHandler : public ServerAwareHandler {
   }
 
   std::atomic<size_t> calls_{0};

Review comment:
       Does this have to be public? 

##########
File path: extensions/http-curl/tests/HTTPHandlers.h
##########
@@ -447,35 +447,43 @@ class HeartbeatHandler : public ServerAwareHandler {
   }
 };
 
-class C2UpdateHandler : public ServerAwareHandler {
+class C2FlowProvider : public ServerAwareHandler {
  public:
-  explicit C2UpdateHandler(const std::string& test_file_location)
-    : test_file_location_(test_file_location) {
+  explicit C2FlowProvider(const std::string& test_file_location)
+      : test_file_location_(test_file_location) {
   }
 
-  bool handlePost(CivetServer *server, struct mg_connection *conn) override {
-    calls_++;
-    if (!response_.empty()) {
+  bool handleGet(CivetServer *server, struct mg_connection *conn) override {
+    std::ifstream myfile(test_file_location_.c_str(), std::ios::in | std::ios::binary);
+    if (myfile.good()) {
+      std::string str((std::istreambuf_iterator<char>(myfile)), (std::istreambuf_iterator<char>()));
       mg_printf(conn, "HTTP/1.1 200 OK\r\nContent-Type: "
-                "text/plain\r\nContent-Length: %lu\r\nConnection: close\r\n\r\n",
-                response_.length());
-      mg_printf(conn, "%s", response_.c_str());
-      response_.clear();
+                      "text/plain\r\nContent-Length: %lu\r\nConnection: close\r\n\r\n",
+                str.length());
+      mg_printf(conn, "%s", str.c_str());
     } else {
       mg_printf(conn, "HTTP/1.1 500 Internal Server Error\r\n");
     }
 
     return true;
   }
 
-  bool handleGet(CivetServer *server, struct mg_connection *conn) override {
-    std::ifstream myfile(test_file_location_.c_str(), std::ios::in | std::ios::binary);
-    if (myfile.good()) {
-      std::string str((std::istreambuf_iterator<char>(myfile)), (std::istreambuf_iterator<char>()));
+ private:
+  std::string test_file_location_;

Review comment:
       nitpicking: can be const as only the ctor can set it. 

##########
File path: libminifi/include/properties/Properties.h
##########
@@ -51,13 +57,13 @@ class Properties {
   // Set the config value
   void set(const std::string &key, const std::string &value) {
     std::lock_guard<std::mutex> lock(mutex_);
-    properties_[key] = value;
+    properties_[key] = PropertyValue{value, true};
     dirty_ = true;
   }
   // Check whether the config value existed
-  bool has(std::string key) const {
+  bool has(const std::string& key) const {
     std::lock_guard<std::mutex> lock(mutex_);
-    return properties_.count(key) > 0;
+    return properties_.find(key) != properties_.end();

Review comment:
       This seems like a question of preference. As either way is correct, I think every author I free do decide which one to use, but I wouldn't change it. It just adds extra diffs to the code review without value. 

##########
File path: libminifi/include/core/controller/ForwardingControllerServiceProvider.h
##########
@@ -0,0 +1,136 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include <memory>
+#include <vector>
+#include <string>
+
+#include "ControllerServiceProvider.h"
+#include "ControllerServiceNode.h"
+
+namespace org {
+namespace apache {
+namespace nifi {
+namespace minifi {
+namespace core {
+namespace controller {
+
+class ForwardingControllerServiceProvider : public ControllerServiceProvider {

Review comment:
       Why do we need pimpl here?
   
   At first look I'm not sure I perfectly understand the reason of introducing this class. 




----------------------------------------------------------------
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.

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



[GitHub] [nifi-minifi-cpp] adamdebreceni commented on a change in pull request #957: MINIFICPP-1407 - Fetch flow configuration file from C2 if not found locally

Posted by GitBox <gi...@apache.org>.
adamdebreceni commented on a change in pull request #957:
URL: https://github.com/apache/nifi-minifi-cpp/pull/957#discussion_r551922305



##########
File path: extensions/http-curl/tests/HTTPHandlers.h
##########
@@ -499,8 +507,8 @@ class C2UpdateHandler : public ServerAwareHandler {
   }
 
   std::atomic<size_t> calls_{0};

Review comment:
       made it protected and added getter

##########
File path: libminifi/include/properties/Properties.h
##########
@@ -51,13 +57,13 @@ class Properties {
   // Set the config value
   void set(const std::string &key, const std::string &value) {
     std::lock_guard<std::mutex> lock(mutex_);
-    properties_[key] = value;
+    properties_[key] = PropertyValue{value, true};
     dirty_ = true;
   }
   // Check whether the config value existed
-  bool has(std::string key) const {
+  bool has(const std::string& key) const {
     std::lock_guard<std::mutex> lock(mutex_);
-    return properties_.count(key) > 0;
+    return properties_.find(key) != properties_.end();

Review comment:
       reverted




----------------------------------------------------------------
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.

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



[GitHub] [nifi-minifi-cpp] adamdebreceni commented on a change in pull request #957: MINIFICPP-1407 - Fetch flow configuration file from C2 if not found locally

Posted by GitBox <gi...@apache.org>.
adamdebreceni commented on a change in pull request #957:
URL: https://github.com/apache/nifi-minifi-cpp/pull/957#discussion_r541013716



##########
File path: encrypt-config/tests/ConfigFileEncryptorTests.cpp
##########
@@ -67,7 +69,7 @@ TEST_CASE("ConfigFileEncryptor can encrypt the sensitive properties", "[encrypt-
       "6q9u8LEDy1/CdmSBm8oSqPS/Ds5UOD2nRouP8yUoK10="));
 
   SECTION("default properties") {
-    ConfigFile test_file{std::ifstream{"resources/minifi.properties"}};
+     ConfigFile test_file{std::ifstream{"resources/minifi.properties"}};

Review comment:
       incorrect indentation (multiple in this file)




----------------------------------------------------------------
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.

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



[GitHub] [nifi-minifi-cpp] arpadboda commented on a change in pull request #957: MINIFICPP-1407 - Fetch flow configuration file from C2 if not found locally

Posted by GitBox <gi...@apache.org>.
arpadboda commented on a change in pull request #957:
URL: https://github.com/apache/nifi-minifi-cpp/pull/957#discussion_r551915849



##########
File path: libminifi/include/core/controller/ForwardingControllerServiceProvider.h
##########
@@ -0,0 +1,136 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include <memory>
+#include <vector>
+#include <string>
+
+#include "ControllerServiceProvider.h"
+#include "ControllerServiceNode.h"
+
+namespace org {
+namespace apache {
+namespace nifi {
+namespace minifi {
+namespace core {
+namespace controller {
+
+class ForwardingControllerServiceProvider : public ControllerServiceProvider {

Review comment:
       I agree with the general purpose (make flowcontroller tinier), but not sure if pimpl is the best solution to achieve this. Usually introduces a lot of boilerplate, so I'm against it unless we can prove that we really need it. 
   
   If we don't have any better idea, let's do it, but I hope that we will. @szaszm @fgerlits what's your opinion?




----------------------------------------------------------------
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.

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



[GitHub] [nifi-minifi-cpp] szaszm commented on a change in pull request #957: MINIFICPP-1407 - Fetch flow configuration file from C2 if not found locally

Posted by GitBox <gi...@apache.org>.
szaszm commented on a change in pull request #957:
URL: https://github.com/apache/nifi-minifi-cpp/pull/957#discussion_r551953686



##########
File path: libminifi/include/core/controller/ForwardingControllerServiceProvider.h
##########
@@ -0,0 +1,136 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include <memory>
+#include <vector>
+#include <string>
+
+#include "ControllerServiceProvider.h"
+#include "ControllerServiceNode.h"
+
+namespace org {
+namespace apache {
+namespace nifi {
+namespace minifi {
+namespace core {
+namespace controller {
+
+class ForwardingControllerServiceProvider : public ControllerServiceProvider {

Review comment:
       Please note that the pointer was present in the old `FlowController.h:343` and the members at old `FlowController.cpp:363-522`.
   
   I wouldn't support introducing a pimpl here, but I support the extraction of this existing pimpl to its own class, because it means one less responsibility for the bloated `FlowController` and because it's a meaningful class on its own.
   
   I also support eliminating it altogether, but it might require more changes and I don't think it's a good idea to further inflate this PR.




----------------------------------------------------------------
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.

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



[GitHub] [nifi-minifi-cpp] arpadboda commented on a change in pull request #957: MINIFICPP-1407 - Fetch flow configuration file from C2 if not found locally

Posted by GitBox <gi...@apache.org>.
arpadboda commented on a change in pull request #957:
URL: https://github.com/apache/nifi-minifi-cpp/pull/957#discussion_r551958321



##########
File path: libminifi/include/core/controller/ForwardingControllerServiceProvider.h
##########
@@ -0,0 +1,136 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include <memory>
+#include <vector>
+#include <string>
+
+#include "ControllerServiceProvider.h"
+#include "ControllerServiceNode.h"
+
+namespace org {
+namespace apache {
+namespace nifi {
+namespace minifi {
+namespace core {
+namespace controller {
+
+class ForwardingControllerServiceProvider : public ControllerServiceProvider {

Review comment:
       Okay, I like this approach.
   
   Let's leave this PR as it is and create a follow-up to find a better solution later. 




----------------------------------------------------------------
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.

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