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 2022/03/09 11:42:59 UTC

[GitHub] [nifi-minifi-cpp] lordgamez opened a new pull request #1281: MINIFICPP-1769 Add propertyValue to agent manifest metadata

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


   https://issues.apache.org/jira/browse/MINIFICPP-1769
   
   -----------------------------------------------
   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.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

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 #1281: MINIFICPP-1769 Add propertyValue to agent manifest metadata

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



##########
File path: libminifi/include/properties/ConfigurationReader.h
##########
@@ -0,0 +1,32 @@
+/**
+ * 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 <optional>
+#include <string>
+
+namespace org::apache::nifi::minifi {
+
+class ConfigurationReader {
+ public:
+  virtual bool get(const std::string& key, std::string& value) const = 0;
+  virtual bool get(const std::string& key, const std::string& alternate_key, std::string& value) const = 0;
+  virtual std::optional<std::string> get(const std::string& key) const = 0;
+};

Review comment:
       What do you mean by consistency with other setters?




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



[GitHub] [nifi-minifi-cpp] lordgamez commented on a change in pull request #1281: MINIFICPP-1769 Add propertyValue to agent manifest metadata

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



##########
File path: extensions/http-curl/tests/C2VerifyHeartbeatAndStop.cpp
##########
@@ -55,7 +40,7 @@ class VerifyC2Heartbeat : public VerifyC2Base {
 
   void runAssertions() override {
     using org::apache::nifi::minifi::utils::verifyLogLinePresenceInPollTime;
-    assert(verifyLogLinePresenceInPollTime(std::chrono::milliseconds(wait_time_),
+    assert(verifyLogLinePresenceInPollTime(std::chrono::milliseconds(120000),

Review comment:
       Thanks for catching this, I only set this while testing something and I forgot about it. Fixed in a064ba2a3bab0dbe4ded393a4d52dd5315c3f976




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



[GitHub] [nifi-minifi-cpp] lordgamez commented on a change in pull request #1281: MINIFICPP-1769 Add propertyValue to agent manifest metadata

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



##########
File path: libminifi/include/properties/ConfigurationReader.h
##########
@@ -0,0 +1,32 @@
+/**
+ * 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 <optional>
+#include <string>
+
+namespace org::apache::nifi::minifi {
+
+class ConfigurationReader {
+ public:
+  virtual bool get(const std::string& key, std::string& value) const = 0;
+  virtual bool get(const std::string& key, const std::string& alternate_key, std::string& value) const = 0;
+  virtual std::optional<std::string> get(const std::string& key) const = 0;
+};

Review comment:
       I was referring to classes like the `AgentIdentificationProvider` or the `StateMonitor` where those classes are also implemented as separate interfaces to be later set in one of the agent information nodes. I think these adhere more to the interface segregation principle and especially in case of the FlowController where there are already way too many responsibilities they could be later extracted to separate classes and composed instead of inheriting from them. Also `AgentIdentificationProvider` is already one interface which is extracted and implemented by the `Configure` class. 
   
   **BUT** I rechecked this case specifically and as you mentioned we only need a single overload of the get functions and I'm not sure if this "read-only configuration" interface will be reused in the future anywhere else, so after these considerations I replaced it with a single std::function in c2544df895ed1fac5ba6d5b50e27ecea4e073c3e




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



[GitHub] [nifi-minifi-cpp] lordgamez commented on a change in pull request #1281: MINIFICPP-1769 Add propertyValue to agent manifest metadata

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



##########
File path: libminifi/include/properties/ConfigurationReader.h
##########
@@ -0,0 +1,32 @@
+/**
+ * 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 <optional>
+#include <string>
+
+namespace org::apache::nifi::minifi {
+
+class ConfigurationReader {
+ public:
+  virtual bool get(const std::string& key, std::string& value) const = 0;
+  virtual bool get(const std::string& key, const std::string& alternate_key, std::string& value) const = 0;
+  virtual std::optional<std::string> get(const std::string& key) const = 0;
+};

Review comment:
       The reason was the signature of the `get` function of the `Configure` class which expects `const std::string& key` as its parameter.




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



[GitHub] [nifi-minifi-cpp] lordgamez commented on a change in pull request #1281: MINIFICPP-1769 Add propertyValue to agent manifest metadata

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



##########
File path: extensions/http-curl/tests/C2ClearCoreComponentStateTest.cpp
##########
@@ -65,7 +65,9 @@ class VerifyC2ClearCoreComponentState : public VerifyC2Base {
 
 class ClearCoreComponentStateHandler: public HeartbeatHandler {
  public:
-  explicit ClearCoreComponentStateHandler(std::atomic_bool& component_cleared_successfully) : component_cleared_successfully_(component_cleared_successfully) {
+  explicit ClearCoreComponentStateHandler(std::atomic_bool& component_cleared_successfully, std::shared_ptr<minifi::Configure> configuration)
+    : HeartbeatHandler(std::move(configuration)),
+      component_cleared_successfully_(component_cleared_successfully) {

Review comment:
       We are asserting on the variable while waiting until the timeout for its value to return true on line 49.




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



[GitHub] [nifi-minifi-cpp] adam-markovics commented on a change in pull request #1281: MINIFICPP-1769 Add propertyValue to agent manifest metadata

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



##########
File path: extensions/http-curl/tests/C2ClearCoreComponentStateTest.cpp
##########
@@ -65,7 +65,9 @@ class VerifyC2ClearCoreComponentState : public VerifyC2Base {
 
 class ClearCoreComponentStateHandler: public HeartbeatHandler {
  public:
-  explicit ClearCoreComponentStateHandler(std::atomic_bool& component_cleared_successfully) : component_cleared_successfully_(component_cleared_successfully) {
+  explicit ClearCoreComponentStateHandler(std::atomic_bool& component_cleared_successfully, std::shared_ptr<minifi::Configure> configuration)
+    : HeartbeatHandler(std::move(configuration)),
+      component_cleared_successfully_(component_cleared_successfully) {

Review comment:
       Oh, I see. I just opened my IDE which said it was unused and I believed it.




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



[GitHub] [nifi-minifi-cpp] lordgamez commented on a change in pull request #1281: MINIFICPP-1769 Add propertyValue to agent manifest metadata

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



##########
File path: libminifi/include/properties/ConfigurationReader.h
##########
@@ -0,0 +1,32 @@
+/**
+ * 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 <optional>
+#include <string>
+
+namespace org::apache::nifi::minifi {
+
+class ConfigurationReader {
+ public:
+  virtual bool get(const std::string& key, std::string& value) const = 0;
+  virtual bool get(const std::string& key, const std::string& alternate_key, std::string& value) const = 0;
+  virtual std::optional<std::string> get(const std::string& key) const = 0;
+};

Review comment:
       I was referring to classes like the `AgentIdentificationProvider` or the `StateMonitor` where those classes are also implemented as separate interfaces to be later set in one of the agent information nodes. I think these adhere more to the interface segregation principle and especially in case of the FlowController where there are already way too many responsibilities they could be later extracted to separate classes and composed instead of inheriting from them.
   
   **BUT** I rechecked this case specifically and as you mentioned we only need a single overload of the get functions and I'm not sure if this "read-only configuration" interface will be reused in the future anywhere else, so after these considerations I replaced it with a single std::function in c2544df895ed1fac5ba6d5b50e27ecea4e073c3e




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



[GitHub] [nifi-minifi-cpp] adam-markovics commented on a change in pull request #1281: MINIFICPP-1769 Add propertyValue to agent manifest metadata

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



##########
File path: extensions/http-curl/tests/C2ClearCoreComponentStateTest.cpp
##########
@@ -65,7 +65,9 @@ class VerifyC2ClearCoreComponentState : public VerifyC2Base {
 
 class ClearCoreComponentStateHandler: public HeartbeatHandler {
  public:
-  explicit ClearCoreComponentStateHandler(std::atomic_bool& component_cleared_successfully) : component_cleared_successfully_(component_cleared_successfully) {
+  explicit ClearCoreComponentStateHandler(std::atomic_bool& component_cleared_successfully, std::shared_ptr<minifi::Configure> configuration)
+    : HeartbeatHandler(std::move(configuration)),
+      component_cleared_successfully_(component_cleared_successfully) {

Review comment:
       component_cleared_successfully_ is never read




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



[GitHub] [nifi-minifi-cpp] lordgamez commented on a change in pull request #1281: MINIFICPP-1769 Add propertyValue to agent manifest metadata

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



##########
File path: libminifi/include/properties/ConfigurationReader.h
##########
@@ -0,0 +1,32 @@
+/**
+ * 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 <optional>
+#include <string>
+
+namespace org::apache::nifi::minifi {
+
+class ConfigurationReader {
+ public:
+  virtual bool get(const std::string& key, std::string& value) const = 0;
+  virtual bool get(const std::string& key, const std::string& alternate_key, std::string& value) const = 0;
+  virtual std::optional<std::string> get(const std::string& key) const = 0;
+};

Review comment:
       I decided to keep the interface for now. It's more consistent with the other setters of the agent information nodes and in my opinion it's cleaner to see what that member represents.
   
   Also good catch, I missed the virtual destructor, added in last commit.




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



[GitHub] [nifi-minifi-cpp] szaszm commented on a change in pull request #1281: MINIFICPP-1769 Add propertyValue to agent manifest metadata

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



##########
File path: libminifi/include/properties/ConfigurationReader.h
##########
@@ -0,0 +1,32 @@
+/**
+ * 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 <optional>
+#include <string>
+
+namespace org::apache::nifi::minifi {
+
+class ConfigurationReader {
+ public:
+  virtual bool get(const std::string& key, std::string& value) const = 0;
+  virtual bool get(const std::string& key, const std::string& alternate_key, std::string& value) const = 0;
+  virtual std::optional<std::string> get(const std::string& key) const = 0;
+};

Review comment:
       I think `std::optional<std::string> get(std::string_view key)` would cover all use cases. Alternate keys could be handled with `utils::orElse`. Consider removing this interface and replacing it with a `std::function<std::optional<std::string>(std::string_view)>` or templates with a similar callback signature, in the name of simplicity.
   
   If you decide to keep it like this, please add a virtual destructor.




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



[GitHub] [nifi-minifi-cpp] adamdebreceni closed pull request #1281: MINIFICPP-1769 Add propertyValue to agent manifest metadata

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


   


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



[GitHub] [nifi-minifi-cpp] szaszm commented on a change in pull request #1281: MINIFICPP-1769 Add propertyValue to agent manifest metadata

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



##########
File path: libminifi/include/properties/ConfigurationReader.h
##########
@@ -0,0 +1,32 @@
+/**
+ * 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 <optional>
+#include <string>
+
+namespace org::apache::nifi::minifi {
+
+class ConfigurationReader {
+ public:
+  virtual bool get(const std::string& key, std::string& value) const = 0;
+  virtual bool get(const std::string& key, const std::string& alternate_key, std::string& value) const = 0;
+  virtual std::optional<std::string> get(const std::string& key) const = 0;
+};

Review comment:
       Great, thanks! One more little nitpick: is there a reason for using `const std::string&` over `std::string_view`? Unless you're working with only `std::string` objects, `std::string_view` can eliminate the need for temporary allocations when passing C strings.




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



[GitHub] [nifi-minifi-cpp] lordgamez commented on a change in pull request #1281: MINIFICPP-1769 Add propertyValue to agent manifest metadata

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



##########
File path: libminifi/include/properties/ConfigurationReader.h
##########
@@ -0,0 +1,32 @@
+/**
+ * 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 <optional>
+#include <string>
+
+namespace org::apache::nifi::minifi {
+
+class ConfigurationReader {
+ public:
+  virtual bool get(const std::string& key, std::string& value) const = 0;
+  virtual bool get(const std::string& key, const std::string& alternate_key, std::string& value) const = 0;
+  virtual std::optional<std::string> get(const std::string& key) const = 0;
+};

Review comment:
       I decided to keep the interface for now. It's more consistent with the other setters of the agent information nodes and in my opinion it's cleaner to see what that member represents.




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



[GitHub] [nifi-minifi-cpp] szaszm commented on a change in pull request #1281: MINIFICPP-1769 Add propertyValue to agent manifest metadata

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



##########
File path: libminifi/include/properties/ConfigurationReader.h
##########
@@ -0,0 +1,32 @@
+/**
+ * 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 <optional>
+#include <string>
+
+namespace org::apache::nifi::minifi {
+
+class ConfigurationReader {
+ public:
+  virtual bool get(const std::string& key, std::string& value) const = 0;
+  virtual bool get(const std::string& key, const std::string& alternate_key, std::string& value) const = 0;
+  virtual std::optional<std::string> get(const std::string& key) const = 0;
+};

Review comment:
       I mean all I'm seeing in AgentInformation is setters for random objects, and I don't think it makes a difference if that object is a custom class versus a `std::function`, a setter is a setter.




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



[GitHub] [nifi-minifi-cpp] adamdebreceni commented on a change in pull request #1281: MINIFICPP-1769 Add propertyValue to agent manifest metadata

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



##########
File path: extensions/http-curl/tests/C2VerifyHeartbeatAndStop.cpp
##########
@@ -55,7 +40,7 @@ class VerifyC2Heartbeat : public VerifyC2Base {
 
   void runAssertions() override {
     using org::apache::nifi::minifi::utils::verifyLogLinePresenceInPollTime;
-    assert(verifyLogLinePresenceInPollTime(std::chrono::milliseconds(wait_time_),
+    assert(verifyLogLinePresenceInPollTime(std::chrono::milliseconds(120000),

Review comment:
       what is the reason behind this hardcoded wait time?




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