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

[GitHub] nifi pull request #2706: NIFI-5197 Fixed a bunch of EL scope bugs in the Mon...

GitHub user MikeThomsen opened a pull request:

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

    NIFI-5197 Fixed a bunch of EL scope bugs in the Mongo processors.

    NIFI-5197 Replaced a bunch of expressionLanguageSupported(true) statements with the right scope.
    
    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:
    - [ ] Is there a JIRA ticket associated with this PR? Is it referenced 
         in the commit message?
    
    - [ ] 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.
    
    - [ ] 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/MikeThomsen/nifi NIFI-5197

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

    https://github.com/apache/nifi/pull/2706.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 #2706
    
----
commit c2428434b6b30c60bc50f405ec92a57f74bd6216
Author: Mike Thomsen <mi...@...>
Date:   2018-05-16T00:54:51Z

    NIFI-5197 Fixed a bunch of EL scope bugs in the Mongo processors.
    NIFI-5197 Replaced a bunch of expressionLanguageSupported(true) statements with the right scope.

----


---

[GitHub] nifi pull request #2706: NIFI-5197 Fixed a bunch of EL scope bugs in the Mon...

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

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


---

[GitHub] nifi issue #2706: NIFI-5197 Fixed a bunch of EL scope bugs in the Mongo proc...

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

    https://github.com/apache/nifi/pull/2706
  
    Something weird happened with the rebase. Killing this and starting over...


---

[GitHub] nifi pull request #2706: NIFI-5197 Fixed a bunch of EL scope bugs in the Mon...

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

    https://github.com/apache/nifi/pull/2706#discussion_r188696201
  
    --- Diff: nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-avro-record-utils/src/main/java/org/apache/nifi/schema/access/SchemaAccessUtils.java ---
    @@ -85,7 +85,7 @@
                 .description("Specifies the name of the branch to use when looking up the schema in the Schema Registry property. " +
                         "If the chosen Schema Registry does not support branching, this value will be ignored.")
                 .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
    -            .expressionLanguageSupported(true)
    +            .expressionLanguageSupported(ExpressionLanguageScope.VARIABLE_REGISTRY)
    --- End diff --
    
    Can't SCHEMA_BRANCH_NAME and SCHEMA_VERSION possibly evaluate EL using FlowFile attributes like SCHEMA_NAME (from [SchemaNamePropertyStrategy](https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-standard-record-utils/src/main/java/org/apache/nifi/schema/access/SchemaNamePropertyStrategy.java#L62))? I traced the calls back to [RecordReaderFactory](https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-service-api/src/main/java/org/apache/nifi/serialization/RecordReaderFactory.java#L46), where you _might_ have FlowFile attributes available.


---

[GitHub] nifi issue #2706: NIFI-5197 Fixed a bunch of EL scope bugs in the Mongo proc...

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

    https://github.com/apache/nifi/pull/2706
  
    This one is dependent on 5145 being merged.


---

[GitHub] nifi pull request #2706: NIFI-5197 Fixed a bunch of EL scope bugs in the Mon...

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

    https://github.com/apache/nifi/pull/2706#discussion_r188746508
  
    --- Diff: nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-avro-record-utils/src/main/java/org/apache/nifi/schema/access/SchemaAccessUtils.java ---
    @@ -85,7 +85,7 @@
                 .description("Specifies the name of the branch to use when looking up the schema in the Schema Registry property. " +
                         "If the chosen Schema Registry does not support branching, this value will be ignored.")
                 .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
    -            .expressionLanguageSupported(true)
    +            .expressionLanguageSupported(ExpressionLanguageScope.VARIABLE_REGISTRY)
    --- End diff --
    
    Ok. Looks like you took care of that in 5145? So I rebased and pushed a new copy. Looks clear to me now.


---

[GitHub] nifi pull request #2706: NIFI-5197 Fixed a bunch of EL scope bugs in the Mon...

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

    https://github.com/apache/nifi/pull/2706#discussion_r188743200
  
    --- Diff: nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-avro-record-utils/src/main/java/org/apache/nifi/schema/access/SchemaAccessUtils.java ---
    @@ -85,7 +85,7 @@
                 .description("Specifies the name of the branch to use when looking up the schema in the Schema Registry property. " +
                         "If the chosen Schema Registry does not support branching, this value will be ignored.")
                 .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
    -            .expressionLanguageSupported(true)
    +            .expressionLanguageSupported(ExpressionLanguageScope.VARIABLE_REGISTRY)
    --- End diff --
    
    Yeah, I'll change that. With 5145 in place now, the test framework won't care.


---