You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by achristianson <gi...@git.apache.org> on 2018/05/21 15:55:55 UTC

[GitHub] nifi-minifi-cpp pull request #333: MINIFICPP-501 Incorporate dependent prope...

GitHub user achristianson opened a pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/333

    MINIFICPP-501 Incorporate dependent property metadata into agent info…

    …rmation
    
    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:
    - [x] Is there a JIRA ticket associated with this PR? Is it referenced
         in the commit message?
    
    - [x] Does your PR title start with MINIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
    
    - [x] Has your PR been rebased against the latest commit within the target branch (typically master)?
    
    - [x] Is your initial contribution a single, squashed commit?
    
    ### For code changes:
    - [x] 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)?
    - [x] If applicable, have you updated the LICENSE file?
    - [x] If applicable, have you updated the NOTICE file?
    
    ### For documentation related changes:
    - [x] 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 travis-ci for build issues and submit an update to your PR as soon as possible.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/achristianson/nifi-minifi-cpp MINIFICPP-501

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi-minifi-cpp/pull/333.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #333
    
----
commit c67473f5e15068629eab46cb9fdcc48df6f56d30
Author: Andrew I. Christianson <an...@...>
Date:   2018-05-21T15:55:14Z

    MINIFICPP-501 Incorporate dependent property metadata into agent information

----


---

[GitHub] nifi-minifi-cpp pull request #333: MINIFICPP-501 Incorporate dependent prope...

Posted by phrocker <gi...@git.apache.org>.
Github user phrocker commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/333#discussion_r189747427
  
    --- Diff: libminifi/include/core/state/nodes/AgentInformation.h ---
    @@ -297,9 +297,20 @@ class ComponentManifest : public DeviceInformation {
                 descriptorRequired.name = "required";
                 descriptorRequired.value = prop.second.getRequired();
     
    +            SerializedResponseNode descriptorDependentProperties;
    +            descriptorDependentProperties.name = "dependentProperties";
    +
    +            for (const auto &propName : prop.second.getDependentProperties()) {
    +              SerializedResponseNode descriptorDependentProperty;
    +              descriptorDependentProperty.name = propName;
    +              descriptorDependentProperty.value = propName;
    --- End diff --
    
    why is the value the property name? You don't need a value if you just need a list. 


---

[GitHub] nifi-minifi-cpp pull request #333: MINIFICPP-501 Incorporate dependent prope...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/nifi-minifi-cpp/pull/333


---

[GitHub] nifi-minifi-cpp pull request #333: MINIFICPP-501 Incorporate dependent prope...

Posted by achristianson <gi...@git.apache.org>.
Github user achristianson commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/333#discussion_r189911362
  
    --- Diff: libminifi/src/processors/PutFile.cpp ---
    @@ -51,7 +51,9 @@ core::Property PutFile::CreateDirs(
         "Create Missing Directories",
         "If true, then missing destination directories will be created. "
             "If false, flowfiles are penalized and sent to failure.",
    -    "true");
    +    "true",
    +    true,
    --- End diff --
    
    It's required per documentation https://github.com/apache/nifi-minifi-cpp/blob/master/PROCESSORS.md#putfile. There are other properties out of sync with documentation/spec, which will be reconciled in future commits.


---

[GitHub] nifi-minifi-cpp pull request #333: MINIFICPP-501 Incorporate dependent prope...

Posted by achristianson <gi...@git.apache.org>.
Github user achristianson commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/333#discussion_r189911483
  
    --- Diff: libminifi/include/core/state/nodes/AgentInformation.h ---
    @@ -297,9 +297,20 @@ class ComponentManifest : public DeviceInformation {
                 descriptorRequired.name = "required";
                 descriptorRequired.value = prop.second.getRequired();
     
    +            SerializedResponseNode descriptorDependentProperties;
    +            descriptorDependentProperties.name = "dependentProperties";
    +
    +            for (const auto &propName : prop.second.getDependentProperties()) {
    +              SerializedResponseNode descriptorDependentProperty;
    +              descriptorDependentProperty.name = propName;
    +              descriptorDependentProperty.value = propName;
    --- End diff --
    
    Fixed.


---

[GitHub] nifi-minifi-cpp pull request #333: MINIFICPP-501 Incorporate dependent prope...

Posted by achristianson <gi...@git.apache.org>.
Github user achristianson commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/333#discussion_r189914896
  
    --- Diff: libminifi/src/processors/PutFile.cpp ---
    @@ -51,7 +51,9 @@ core::Property PutFile::CreateDirs(
         "Create Missing Directories",
         "If true, then missing destination directories will be created. "
             "If false, flowfiles are penalized and sent to failure.",
    -    "true");
    +    "true",
    +    true,
    --- End diff --
    
    Also note the case where a prop is required & has a default, and no value is given in the config is covered in unit tests. It will use the default value and validation will pass. So this change has no operational effect unless the user explicitly gives an empty value ("") in the config file.


---

[GitHub] nifi-minifi-cpp pull request #333: MINIFICPP-501 Incorporate dependent prope...

Posted by phrocker <gi...@git.apache.org>.
Github user phrocker commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/333#discussion_r189746200
  
    --- Diff: libminifi/src/processors/PutFile.cpp ---
    @@ -51,7 +51,9 @@ core::Property PutFile::CreateDirs(
         "Create Missing Directories",
         "If true, then missing destination directories will be created. "
             "If false, flowfiles are penalized and sent to failure.",
    -    "true");
    +    "true",
    +    true,
    --- End diff --
    
    Before this property was not required but had a default value of true. Now it's required?


---

[GitHub] nifi-minifi-cpp issue #333: MINIFICPP-501 Incorporate dependent property met...

Posted by achristianson <gi...@git.apache.org>.
Github user achristianson commented on the issue:

    https://github.com/apache/nifi-minifi-cpp/pull/333
  
    Fixed the name/value redundancy.


---