You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "martinzink (via GitHub)" <gi...@apache.org> on 2025/08/22 14:02:14 UTC
[PR] MINIFICPP-2610 Fixing false positive warnings with ControllerServices [nifi-minifi-cpp]
martinzink opened a new pull request, #2011:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2011
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
Re: [PR] MINIFICPP-2610 Fixing false positive warnings with ControllerServices [nifi-minifi-cpp]
Posted by "lordgamez (via GitHub)" <gi...@apache.org>.
lordgamez closed pull request #2011: MINIFICPP-2610 Fixing false positive warnings with ControllerServices
URL: https://github.com/apache/nifi-minifi-cpp/pull/2011
--
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
Re: [PR] MINIFICPP-2610 Fixing false positive warnings with ControllerServices [nifi-minifi-cpp]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #2011:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2011#discussion_r2294139931
##########
libminifi/src/core/flow/StructuredConfiguration.cpp:
##########
@@ -922,7 +922,14 @@ void StructuredConfiguration::parsePropertiesNode(const Node& properties_node, c
for (const auto& property_node : properties_node) {
const auto propertyName = property_node.first.getString().value();
const Node propertyValueNode = property_node.second;
- parsePropertyNodeElement(propertyName, propertyValueNode, component, parameter_context);
+ const bool is_controller_service_node = dynamic_cast<core::controller::ControllerServiceNode*>(&component) != nullptr;
+ const bool is_linked_services = propertyName == "Linked Services";
+ // We currently propagate properties to the ControllerServiceNode wrapper and to the actual ControllerService.
+ // This could cause false positive warnings because the Node should only handle the linked services while implementation should contain everything else
+ // We should probably remove the nodes and handle the linked services concept inside the impls
+ if (is_controller_service_node == is_linked_services) {
Review Comment:
The condition `is_controller_service_node == is_linked_services` uses boolean equality which creates unclear logic. Consider using explicit conditions like `(is_controller_service_node && is_linked_services) || (!is_controller_service_node && !is_linked_services)` or add a comment explaining when this condition evaluates to true.
```suggestion
// Only parse the property if both are true or both are false (i.e., not mixing controller service node and linked services)
if ((is_controller_service_node && is_linked_services) || (!is_controller_service_node && !is_linked_services)) {
```
--
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
Re: [PR] MINIFICPP-2610 Fixing false positive warnings with ControllerServices [nifi-minifi-cpp]
Posted by "szaszm (via GitHub)" <gi...@apache.org>.
szaszm commented on code in PR #2011:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2011#discussion_r2300918817
##########
libminifi/src/core/flow/StructuredConfiguration.cpp:
##########
@@ -922,7 +922,14 @@ void StructuredConfiguration::parsePropertiesNode(const Node& properties_node, c
for (const auto& property_node : properties_node) {
const auto propertyName = property_node.first.getString().value();
const Node propertyValueNode = property_node.second;
- parsePropertyNodeElement(propertyName, propertyValueNode, component, parameter_context);
+ const bool is_controller_service_node = dynamic_cast<core::controller::ControllerServiceNode*>(&component) != nullptr;
+ const bool is_linked_services = propertyName == "Linked Services";
+ // We currently propagate properties to the ControllerServiceNode wrapper and to the actual ControllerService.
+ // This could cause false positive warnings because the Node should only handle the linked services while implementation should contain everything else
+ // We should probably remove the nodes and handle the linked services concept inside the impls
+ if (is_controller_service_node == is_linked_services) {
Review Comment:
I'm fine with either way: I don't see boolean equality used as XNOR as unclear, but if others do, I'm fine with extending it to DNF
--
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
Re: [PR] MINIFICPP-2610 Fixing false positive warnings with ControllerServices [nifi-minifi-cpp]
Posted by "fgerlits (via GitHub)" <gi...@apache.org>.
fgerlits commented on code in PR #2011:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2011#discussion_r2297557983
##########
libminifi/src/core/flow/StructuredConfiguration.cpp:
##########
@@ -922,7 +922,14 @@ void StructuredConfiguration::parsePropertiesNode(const Node& properties_node, c
for (const auto& property_node : properties_node) {
const auto propertyName = property_node.first.getString().value();
const Node propertyValueNode = property_node.second;
- parsePropertyNodeElement(propertyName, propertyValueNode, component, parameter_context);
+ const bool is_controller_service_node = dynamic_cast<core::controller::ControllerServiceNode*>(&component) != nullptr;
+ const bool is_linked_services = propertyName == "Linked Services";
+ // We currently propagate properties to the ControllerServiceNode wrapper and to the actual ControllerService.
+ // This could cause false positive warnings because the Node should only handle the linked services while implementation should contain everything else
+ // We should probably remove the nodes and handle the linked services concept inside the impls
+ if (is_controller_service_node == is_linked_services) {
Review Comment:
I agree with the bot about the conditional, but I wouldn't add the comment it suggests.
--
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