You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "exceptionfactory (via GitHub)" <gi...@apache.org> on 2025/03/17 21:22:17 UTC
[PR] NIFI-14374 Set Deterministic Order for Manifest Documentation [nifi-api]
exceptionfactory opened a new pull request, #4:
URL: https://github.com/apache/nifi-api/pull/4
# Summary
[NIFI-14374](https://issues.apache.org/jira/browse/NIFI-14374) Sets deterministic ordering for several unordered elements in the Extension Manifest XML Documentation.
Changes to the `XmlDocumentWriter` include adding sorting to the following unordered collections:
- Sorted Relationship documentation elements based on `name` field
- Sorted Resource Type documentation elements based on enumeration `name` method
- Sorted Property Dependencies based on dependent Property Name
- Sorted Dependent Values based on natural String ordering
These changes retain compatibility with current output formatting, but provide deterministic behavior for the ordered elements. Deterministic ordering is a requirement for [reproducible builds](https://reproducible-builds.org/) and these changes address issues related to `extension-manifest.xml` identified in with a comparison of [Apache NiFi 2.3.0](https://github.com/jvm-repo-rebuild/reproducible-central/blob/master/content/org/apache/nifi/nifi/nifi-2.3.0.buildcompare).
Changes include a new unit test for the `XmlDocumentWriter` that verifies expected ordering.
# Tracking
Please complete the following tracking steps prior to pull request creation.
### Issue Tracking
- [X] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI) issue created
### Pull Request Tracking
- [X] Pull Request title starts with Apache NiFi Jira issue number, such as `NIFI-00000`
- [X] Pull Request commit message starts with Apache NiFi Jira issue number, as such `NIFI-00000`
### Pull Request Formatting
- [X] Pull Request based on current revision of the `main` branch
- [X] Pull Request refers to a feature branch with one commit containing changes
--
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-14374 Set Deterministic Order for Manifest Documentation [nifi-api]
Posted by "pvillard31 (via GitHub)" <gi...@apache.org>.
pvillard31 closed pull request #4: NIFI-14374 Set Deterministic Order for Manifest Documentation
URL: https://github.com/apache/nifi-api/pull/4
--
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-14374 Set Deterministic Order for Manifest Documentation [nifi-api]
Posted by "exceptionfactory (via GitHub)" <gi...@apache.org>.
exceptionfactory commented on code in PR #4:
URL: https://github.com/apache/nifi-api/pull/4#discussion_r1999796812
##########
src/main/java/org/apache/nifi/documentation/xml/XmlDocumentationWriter.java:
##########
@@ -108,12 +108,12 @@ protected void writeDeprecationNotice(final DeprecationNotice deprecationNotice)
return;
}
- final Class[] classes = deprecationNotice.alternatives();
+ final Class<?>[] classes = deprecationNotice.alternatives();
final String[] classNames = deprecationNotice.classNames();
final Set<String> alternatives = new LinkedHashSet<>();
if (classes != null) {
Review Comment:
Thanks for highlighting that fact, it looks like the default value cannot be set as null, so this check can be removed.
--
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-14374 Set Deterministic Order for Manifest Documentation [nifi-api]
Posted by "dan-s1 (via GitHub)" <gi...@apache.org>.
dan-s1 commented on code in PR #4:
URL: https://github.com/apache/nifi-api/pull/4#discussion_r1999737228
##########
src/main/java/org/apache/nifi/documentation/xml/XmlDocumentationWriter.java:
##########
@@ -108,12 +108,12 @@ protected void writeDeprecationNotice(final DeprecationNotice deprecationNotice)
return;
}
- final Class[] classes = deprecationNotice.alternatives();
+ final Class<?>[] classes = deprecationNotice.alternatives();
final String[] classNames = deprecationNotice.classNames();
final Set<String> alternatives = new LinkedHashSet<>();
if (classes != null) {
Review Comment:
Is this `if` necessary if the default value in the `DeprecationNotice` is `{}` which is an empty array and not null? Is there some way to specify `classNames` in the `DeprecationNotice` and it for to be null? Same question for `classNames`.
--
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