-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NIFI-11123: fix default value and update docs #6899
NIFI-11123: fix default value and update docs #6899
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the documentation updates @KalmanJantner. Changing the example value property introduces a Parameter Value reference, as opposed to the current FlowFile attribute reference. Neither one may be provided, so having that JSON snippet as the default value does not seem like the best approach. Recommending Parameter usage in the additional details is one thing, but it should also be possible configure the Processor without reference to a Parameter. Perhaps the default JSON value should be removed if there is no suitable generic value that can be obtained from a FlowFile attribute.
One additional note, these changes should reference a new Jira issue, not the existing Jira issue, which is already resolved. |
Instead of relying on a parameter context for the output bucket we could add a property on the processor. Also the type of Vision action (like |
504f471
to
20ec193
Compare
Thanks, I have created a new ticket and updated the PR desc and title according to that. |
Thank you for the suggestion. I have updated the PR based on your suggestion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates @KalmanJantner. The general approach looks good, but I recommended some additions to the new property descriptions, and style adjustments.
...ors/src/main/java/org/apache/nifi/processors/gcp/vision/AbstractStartGcpVisionOperation.java
Outdated
Show resolved
Hide resolved
...ors/src/main/java/org/apache/nifi/processors/gcp/vision/AbstractStartGcpVisionOperation.java
Outdated
Show resolved
Hide resolved
...ors/src/main/java/org/apache/nifi/processors/gcp/vision/AbstractStartGcpVisionOperation.java
Outdated
Show resolved
Hide resolved
...ors/src/main/java/org/apache/nifi/processors/gcp/vision/AbstractStartGcpVisionOperation.java
Outdated
Show resolved
Hide resolved
...ors/src/main/java/org/apache/nifi/processors/gcp/vision/AbstractStartGcpVisionOperation.java
Outdated
Show resolved
Hide resolved
…java/org/apache/nifi/processors/gcp/vision/AbstractStartGcpVisionOperation.java Co-authored-by: exceptionfactory <exceptionfactory@apache.org>
…java/org/apache/nifi/processors/gcp/vision/AbstractStartGcpVisionOperation.java Co-authored-by: exceptionfactory <exceptionfactory@apache.org>
…java/org/apache/nifi/processors/gcp/vision/AbstractStartGcpVisionOperation.java Co-authored-by: exceptionfactory <exceptionfactory@apache.org>
…java/org/apache/nifi/processors/gcp/vision/AbstractStartGcpVisionOperation.java Co-authored-by: exceptionfactory <exceptionfactory@apache.org>
…java/org/apache/nifi/processors/gcp/vision/AbstractStartGcpVisionOperation.java Co-authored-by: exceptionfactory <exceptionfactory@apache.org>
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates @KalmanJantner!
This looks just about ready to go @tpalfy, I noticed that the default value and examples need to be updated to match the adjusted vision-feature-type
. With those changes, it looks good.
@@ -56,12 +56,12 @@ public class StartGcpVisionAnnotateFilesOperation extends AbstractStartGcpVision | |||
" \"mimeType\": \"application/pdf\"\n" + | |||
" },\n" + | |||
" \"features\": [{\n" + | |||
" \"type\": \"DOCUMENT_TEXT_DETECTION\",\n" + | |||
" \"type\": \"${feature-type}\",\n" + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be adjusted to vision-feature-type
:
" \"type\": \"${feature-type}\",\n" + | |
" \"type\": \"${vision-feature-type}\",\n" + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks fixed.
@@ -55,21 +55,21 @@ public class StartGcpVisionAnnotateImagesOperation extends AbstractStartGcpVisio | |||
" }\n" + | |||
" },\n" + | |||
" \"features\": [{\n" + | |||
" \"type\": \"FACE_DETECTION\",\n" + | |||
" \"type\": \"${feature-type}\",\n" + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
" \"type\": \"${feature-type}\",\n" + | |
" \"type\": \"${vision-feature-type}\",\n" + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks fixed.
@@ -55,12 +55,12 @@ <h3>Payload</h3> | |||
"mimeType": "application/pdf" | |||
}, | |||
"features": [{ | |||
"type": "DOCUMENT_TEXT_DETECTION", | |||
"type": "${feature-type}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"type": "${feature-type}", | |
"type": "${vision-feature-type}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks fixed.
@@ -53,13 +53,13 @@ <h3>Payload</h3> | |||
} | |||
}, | |||
"features": [{ | |||
"type": "DOCUMENT_TEXT_DETECTION", | |||
"type": "${feature-type}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"type": "${feature-type}", | |
"type": "${vision-feature-type}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks fixed.
LGTM |
Summary
NIFI-11123
Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
Pull Request Tracking
NIFI-00000
NIFI-00000
Pull Request Formatting
main
branchVerification
Please indicate the verification steps performed prior to pull request creation.
Build
mvn clean install -P contrib-check
Licensing
LICENSE
andNOTICE
filesDocumentation