You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "pvillard31 (via GitHub)" <gi...@apache.org> on 2024/05/21 17:13:54 UTC

[PR] NIFI-13267 - Bump NiFi NAR Maven plugin version [nifi]

pvillard31 opened a new pull request, #8860:
URL: https://github.com/apache/nifi/pull/8860

   # Summary
   
   [NIFI-13267](https://issues.apache.org/jira/browse/NIFI-13267) - Bump NiFi NAR Maven plugin version
   
   # Tracking
   
   Please complete the following tracking steps prior to pull request creation.
   
   ### Issue Tracking
   
   - [ ] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI) issue created
   
   ### Pull Request Tracking
   
   - [ ] Pull Request title starts with Apache NiFi Jira issue number, such as `NIFI-00000`
   - [ ] Pull Request commit message starts with Apache NiFi Jira issue number, as such `NIFI-00000`
   
   ### Pull Request Formatting
   
   - [ ] Pull Request based on current revision of the `main` branch
   - [ ] Pull Request refers to a feature branch with one commit containing changes
   
   # Verification
   
   Please indicate the verification steps performed prior to pull request creation.
   
   ### Build
   
   - [ ] Build completed using `mvn clean install -P contrib-check`
     - [ ] JDK 21
   
   ### UI Contributions
   
   - [ ] NiFi is modernizing its UI. Any contributions that update the [current UI](https://github.com/apache/nifi/tree/main/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui) also need to be implemented in the [new UI](https://github.com/apache/nifi/tree/main/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi).  
   
   ### Licensing
   
   - [ ] New dependencies are compatible with the [Apache License 2.0](https://apache.org/licenses/LICENSE-2.0) according to the [License Policy](https://www.apache.org/legal/resolved.html)
   - [ ] New dependencies are documented in applicable `LICENSE` and `NOTICE` files
   
   ### Documentation
   
   - [ ] Documentation formatting appears as expected in rendered files
   


-- 
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] NIFI-13267 - Bump NiFi NAR Maven plugin version [nifi]

Posted by "pvillard31 (via GitHub)" <gi...@apache.org>.
pvillard31 commented on code in PR #8860:
URL: https://github.com/apache/nifi/pull/8860#discussion_r1622376427


##########
nifi-manifest/nifi-runtime-manifest-core/src/main/java/org/apache/nifi/runtime/manifest/impl/StandardComponentManifestBuilder.java:
##########
@@ -61,6 +65,24 @@ public ComponentManifestBuilder addReportingTask(final ReportingTaskDefinition r
         return this;
     }
 
+    @Override
+    public ComponentManifestBuilder addParameterProvider(ParameterProviderDefinition parameterProviderDefinition) {
+        if (parameterProviderDefinition == null) {
+            throw new IllegalArgumentException("Parameter Provider definition cannot be null");
+        }
+        parameterProviders.add(parameterProviderDefinition);
+        return this;
+    }
+
+    @Override
+    public ComponentManifestBuilder addFlowAnalysisRule(FlowAnalysisRuleDefinition flowAnalysisRuleDefinition) {
+        if (flowAnalysisRuleDefinition == null) {
+            throw new IllegalArgumentException("Flow Analysis Rule definition cannot be null");
+        }
+        flowAnalysisRules.add(flowAnalysisRuleDefinition);
+        return this;
+    }
+

Review Comment:
   Good catch, done, thanks @bbende 



-- 
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] NIFI-13267 - Bump NiFi NAR Maven plugin version [nifi]

Posted by "bbende (via GitHub)" <gi...@apache.org>.
bbende merged PR #8860:
URL: https://github.com/apache/nifi/pull/8860


-- 
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] NIFI-13267 - Bump NiFi NAR Maven plugin version [nifi]

Posted by "bbende (via GitHub)" <gi...@apache.org>.
bbende commented on code in PR #8860:
URL: https://github.com/apache/nifi/pull/8860#discussion_r1620747959


##########
nifi-manifest/nifi-runtime-manifest-core/src/main/java/org/apache/nifi/runtime/manifest/impl/StandardComponentManifestBuilder.java:
##########
@@ -61,6 +65,24 @@ public ComponentManifestBuilder addReportingTask(final ReportingTaskDefinition r
         return this;
     }
 
+    @Override
+    public ComponentManifestBuilder addParameterProvider(ParameterProviderDefinition parameterProviderDefinition) {
+        if (parameterProviderDefinition == null) {
+            throw new IllegalArgumentException("Parameter Provider definition cannot be null");
+        }
+        parameterProviders.add(parameterProviderDefinition);
+        return this;
+    }
+
+    @Override
+    public ComponentManifestBuilder addFlowAnalysisRule(FlowAnalysisRuleDefinition flowAnalysisRuleDefinition) {
+        if (flowAnalysisRuleDefinition == null) {
+            throw new IllegalArgumentException("Flow Analysis Rule definition cannot be null");
+        }
+        flowAnalysisRules.add(flowAnalysisRuleDefinition);
+        return this;
+    }
+

Review Comment:
   There is still one change needed here in the final `build` method, it needs to set the parameter providers and flow analysis rules from the builder into the final `ComponentManifest`.



-- 
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] NIFI-13267 - Bump NiFi NAR Maven plugin version [nifi]

Posted by "pvillard31 (via GitHub)" <gi...@apache.org>.
pvillard31 commented on PR #8860:
URL: https://github.com/apache/nifi/pull/8860#issuecomment-2139052820

   Thanks @bbende for switching the status of this PR. This is ready for review / merge from my PoV.


-- 
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] NIFI-13267 - Bump NiFi NAR Maven plugin version [nifi]

Posted by "bbende (via GitHub)" <gi...@apache.org>.
bbende commented on code in PR #8860:
URL: https://github.com/apache/nifi/pull/8860#discussion_r1611517108


##########
nifi-manifest/nifi-runtime-manifest-core/src/main/java/org/apache/nifi/runtime/manifest/impl/StandardComponentManifestBuilder.java:
##########
@@ -33,6 +35,8 @@ public class StandardComponentManifestBuilder implements ComponentManifestBuilde
     private final List<ProcessorDefinition> processors = new ArrayList<>();
     private final List<ControllerServiceDefinition> controllerServices = new ArrayList<>();
     private final List<ReportingTaskDefinition> reportingTasks = new ArrayList<>();
+    private final List<ParameterProviderDefinition> parameterProviders = new ArrayList<>();
+    private final List<FlowAnalysisRuleDefinition> flowAnalysisRules = new ArrayList<>();

Review Comment:
   Just a heads up that the same two lists need to be added to the actual `ComponentManifest` class, and this builder needs to set them:
   
   https://github.com/apache/nifi/blob/main/c2/c2-protocol/c2-protocol-component-api/src/main/java/org/apache/nifi/c2/protocol/component/api/ComponentManifest.java#L32
   
   Currently the final manifest.json doesn't end up with the parameter providers and flow analysis rules.



-- 
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] NIFI-13267 - Bump NiFi NAR Maven plugin version [nifi]

Posted by "pvillard31 (via GitHub)" <gi...@apache.org>.
pvillard31 commented on code in PR #8860:
URL: https://github.com/apache/nifi/pull/8860#discussion_r1612158954


##########
nifi-manifest/nifi-runtime-manifest-core/src/main/java/org/apache/nifi/runtime/manifest/impl/StandardComponentManifestBuilder.java:
##########
@@ -33,6 +35,8 @@ public class StandardComponentManifestBuilder implements ComponentManifestBuilde
     private final List<ProcessorDefinition> processors = new ArrayList<>();
     private final List<ControllerServiceDefinition> controllerServices = new ArrayList<>();
     private final List<ReportingTaskDefinition> reportingTasks = new ArrayList<>();
+    private final List<ParameterProviderDefinition> parameterProviders = new ArrayList<>();
+    private final List<FlowAnalysisRuleDefinition> flowAnalysisRules = new ArrayList<>();

Review Comment:
   Good catch @bbende - pushed a commit to add this



-- 
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