You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by VijetaH <gi...@git.apache.org> on 2018/09/12 18:17:02 UTC

[GitHub] nifi pull request #2999: NIFI-5589 : Clarify PutMongo documentation

GitHub user VijetaH opened a pull request:

    https://github.com/apache/nifi/pull/2999

    NIFI-5589 : Clarify PutMongo documentation

    Thank you for submitting a contribution to Apache NiFi.
    
    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 NIFI-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)?
    
    - [ ] Is your initial contribution a single, squashed commit?
    
    ### For code changes:
    - [ ] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?
    - [ ] Have you written or updated unit tests to verify your 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, including the main LICENSE file under nifi-assembly?
    - [ ] If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly?
    - [ ] If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties?
    
    ### 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 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/Effyis/nifi master

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

    https://github.com/apache/nifi/pull/2999.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 #2999
    
----
commit 73af67b793eb1c3248e9f2cd42ea40ec3d5bd041
Author: Vijeta <vh...@...>
Date:   2018-09-12T17:19:35Z

    Clarifying upsert query documentation for PutMongo processor.

commit 063bf50f2b44610e9e66d9f2145d3f5cad7ff5f7
Author: VijetaH <vh...@...>
Date:   2018-09-12T17:22:35Z

    Clarifying upsert query documentation for PutMongo processor.

commit f0d7e1d87514be1d743408cfdea4c629dafef743
Author: VijetaH <vh...@...>
Date:   2018-09-12T18:09:57Z

    Clarifying upsert query documentation for PutMongo processor.

----


---

[GitHub] nifi pull request #2999: NIFI-5589 : Clarify PutMongo documentation

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

    https://github.com/apache/nifi/pull/2999#discussion_r217172110
  
    --- Diff: nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/PutMongo.java ---
    @@ -112,8 +112,10 @@
             .allowableValues(UPDATE_WITH_DOC, UPDATE_WITH_OPERATORS)
             .defaultValue(UPDATE_WITH_DOC.getValue())
             .description("Choose an update mode. You can either supply a JSON document to use as a direct replacement " +
    -                "or specify a document that contains update operators like $set and $unset")
    -        .build();
    +                "or specify a document that contains update operators like $set, $unset, and $inc."+
    +                        "When Operators mode is enabled, the flowfile content is expected to be the operator part"+
    +                        "for example: {$set:{\"key\": \"value\"},$inc:{\"count\":1234}} and Update query has to be the record to be updated")
    --- End diff --
    
    (Just push that branch to GitHub, I'll fetch it and merge)


---

[GitHub] nifi pull request #2999: NIFI-5589 : Clarify PutMongo documentation

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

    https://github.com/apache/nifi/pull/2999#discussion_r217169836
  
    --- Diff: nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/PutMongo.java ---
    @@ -112,8 +112,10 @@
             .allowableValues(UPDATE_WITH_DOC, UPDATE_WITH_OPERATORS)
             .defaultValue(UPDATE_WITH_DOC.getValue())
             .description("Choose an update mode. You can either supply a JSON document to use as a direct replacement " +
    -                "or specify a document that contains update operators like $set and $unset")
    -        .build();
    +                "or specify a document that contains update operators like $set, $unset, and $inc."+
    +                        "When Operators mode is enabled, the flowfile content is expected to be the operator part"+
    +                        "for example: {$set:{\"key\": \"value\"},$inc:{\"count\":1234}} and Update query has to be the record to be updated")
    --- End diff --
    
    The part here after `and` is somewhat ambiguous and could potentially confuse people doing upserts. Other than that, it looks fine.


---

[GitHub] nifi pull request #2999: NIFI-5589 : Clarify PutMongo documentation

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

    https://github.com/apache/nifi/pull/2999#discussion_r217171234
  
    --- Diff: nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/PutMongo.java ---
    @@ -112,8 +112,10 @@
             .allowableValues(UPDATE_WITH_DOC, UPDATE_WITH_OPERATORS)
             .defaultValue(UPDATE_WITH_DOC.getValue())
             .description("Choose an update mode. You can either supply a JSON document to use as a direct replacement " +
    -                "or specify a document that contains update operators like $set and $unset")
    -        .build();
    +                "or specify a document that contains update operators like $set, $unset, and $inc."+
    +                        "When Operators mode is enabled, the flowfile content is expected to be the operator part"+
    +                        "for example: {$set:{\"key\": \"value\"},$inc:{\"count\":1234}} and Update query has to be the record to be updated")
    --- End diff --
    
    @MikeThomsen yes please go ahead with the changes.


---

[GitHub] nifi issue #2999: NIFI-5589 : Clarify PutMongo documentation

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

    https://github.com/apache/nifi/pull/2999
  
    Hi @josephxsxn I don't think we have to request that any more as GitHub shows the consolidated diff in one view, and rebasing & force-pushing to a branch that is used for a PR destroys history and can mess up the reviewer comments. The committer rebases & squashes the commits when they merge them. 


---

[GitHub] nifi issue #2999: NIFI-5589 : Clarify PutMongo documentation

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

    https://github.com/apache/nifi/pull/2999
  
    Thanks for helping with this @MikeThomsen, Our dev team spent a long time trying to understand exactly how to use the processor and so we hope these clarifications will save someone else in the future :)  Once you know its very straight forward. 


---

[GitHub] nifi issue #2999: NIFI-5589 : Clarify PutMongo documentation

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

    https://github.com/apache/nifi/pull/2999
  
    Merged. Thanks for the contribution.


---

[GitHub] nifi issue #2999: NIFI-5589 : Clarify PutMongo documentation

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

    https://github.com/apache/nifi/pull/2999
  
    @alopresto Can you please review the changes? 


---

[GitHub] nifi pull request #2999: NIFI-5589 : Clarify PutMongo documentation

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

    https://github.com/apache/nifi/pull/2999#discussion_r217175661
  
    --- Diff: nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/PutMongo.java ---
    @@ -112,8 +112,10 @@
             .allowableValues(UPDATE_WITH_DOC, UPDATE_WITH_OPERATORS)
             .defaultValue(UPDATE_WITH_DOC.getValue())
             .description("Choose an update mode. You can either supply a JSON document to use as a direct replacement " +
    -                "or specify a document that contains update operators like $set and $unset")
    -        .build();
    +                "or specify a document that contains update operators like $set, $unset, and $inc."+
    +                        "When Operators mode is enabled, the flowfile content is expected to be the operator part"+
    +                        "for example: {$set:{\"key\": \"value\"},$inc:{\"count\":1234}} and Update query has to be the record to be updated")
    --- End diff --
    
    https://github.com/Effyis/nifi/tree/NIFI-5589


---

[GitHub] nifi issue #2999: NIFI-5589 : Clarify PutMongo documentation

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

    https://github.com/apache/nifi/pull/2999
  
    I looked at the code, and the documentation change is syntactically valid, but I am not familiar enough with MongoDB to assert that the content is correct. You will need a reviewer who is a MongoDB user. There are a few in the community and they look for PRs with _Mongo_ in the title quite regularly. 


---

[GitHub] nifi pull request #2999: NIFI-5589 : Clarify PutMongo documentation

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

    https://github.com/apache/nifi/pull/2999


---

[GitHub] nifi pull request #2999: NIFI-5589 : Clarify PutMongo documentation

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

    https://github.com/apache/nifi/pull/2999#discussion_r217170815
  
    --- Diff: nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/PutMongo.java ---
    @@ -112,8 +112,10 @@
             .allowableValues(UPDATE_WITH_DOC, UPDATE_WITH_OPERATORS)
             .defaultValue(UPDATE_WITH_DOC.getValue())
             .description("Choose an update mode. You can either supply a JSON document to use as a direct replacement " +
    -                "or specify a document that contains update operators like $set and $unset")
    -        .build();
    +                "or specify a document that contains update operators like $set, $unset, and $inc."+
    +                        "When Operators mode is enabled, the flowfile content is expected to be the operator part"+
    +                        "for example: {$set:{\"key\": \"value\"},$inc:{\"count\":1234}} and Update query has to be the record to be updated")
    --- End diff --
    
    I'd suggest we strike that part and replace it with something like this:
    
    > and the update query will come from the configured `Update Query` property.
    
    If that works for you, I can make the change myself.


---

[GitHub] nifi issue #2999: NIFI-5589 : Clarify PutMongo documentation

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

    https://github.com/apache/nifi/pull/2999
  
    @alopresto  Thanks Andy :) nice to hear that changed, I always thought it was tedious to squash things. 


---

[GitHub] nifi issue #2999: NIFI-5589 : Clarify PutMongo documentation

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

    https://github.com/apache/nifi/pull/2999
  
    @MikeThomsen Could you please review MongoDB document changes?


---

[GitHub] nifi pull request #2999: NIFI-5589 : Clarify PutMongo documentation

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

    https://github.com/apache/nifi/pull/2999#discussion_r217171902
  
    --- Diff: nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/PutMongo.java ---
    @@ -112,8 +112,10 @@
             .allowableValues(UPDATE_WITH_DOC, UPDATE_WITH_OPERATORS)
             .defaultValue(UPDATE_WITH_DOC.getValue())
             .description("Choose an update mode. You can either supply a JSON document to use as a direct replacement " +
    -                "or specify a document that contains update operators like $set and $unset")
    -        .build();
    +                "or specify a document that contains update operators like $set, $unset, and $inc."+
    +                        "When Operators mode is enabled, the flowfile content is expected to be the operator part"+
    +                        "for example: {$set:{\"key\": \"value\"},$inc:{\"count\":1234}} and Update query has to be the record to be updated")
    --- End diff --
    
    Can you git cherry-pick this onto a branch named NIFI-5589? It's currently sitting on your master.


---

[GitHub] nifi issue #2999: NIFI-5589 : Clarify PutMongo documentation

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

    https://github.com/apache/nifi/pull/2999
  
    Thanks for submitting this documentation change. Can you please squash all 3 of your commits into 1?
    
    https://github.com/todotxt/todo.txt-android/wiki/Squash-All-Commits-Related-to-a-Single-Issue-into-a-Single-Commit 


---