[ 
https://issues.apache.org/jira/browse/YARN-11415?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Benjamin Teke updated YARN-11415:
---------------------------------
    Description: 
YARN-11413 pointed out a strange way of how the configuration tests are 
executed. The first problem is that there is a 
[Pattern|https://github.com/apache/hadoop/blob/570b503e3e7e7adf5b0a8fabca76003298216543/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfigurationFieldsBase.java#L197],
 that matches only numbers, letters, dots, hyphens and underscores, but not %, 
which is used in string replacements (i.e 
{{yarn.nodemanager.aux-services.%s.classpath}} ), so essentially every property 
that's present in any configuration object and doesn't match this pattern is 
silently skipped, and documenting it will result in invalid test failures, ergo 
the test encourages introducing props and not documenting them. The pattern 
should be fixed in YARN-11413 for %s, but it's necessity could be checked. 

Another issue with this is that it works in a semi-opposite way of what it's 
supposed to do. To ensure all of the configuration entries are documented it 
should iterate through all of the configuration fields and check if those have 
matching xyz-default.xml entries, but currently it just reports the entries 
that are present in the xyz-default.xml and missing in the matching 
configuration file. Since this test checks all the configuration objects this 
might need some other follow-ups to document the missing properties from other 
components if there are any.

  was:
YARN-11413 pointed out a strange way of how the configuration tests are 
executed. The first problem is that there is a 
[Pattern|https://github.com/apache/hadoop/blob/570b503e3e7e7adf5b0a8fabca76003298216543/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfigurationFieldsBase.java#L197],
 that matches only numbers, letters, dots, hyphens and underscores, but not %, 
which is used in string replacements (i.e 
{{yarn.nodemanager.aux-services.%s.classpath}} ), so essentially every property 
that's present in any configuration object and doesn't match this pattern is 
silently skipped, and documenting it will result in invalid test failures, ergo 
the test encourages introducing props and not documenting them. The pattern 
should be fixed in YARN-11413 for %s, but it's necessity could be checked. 

Another issue with this is that it works in a semi-opposite way of what it's 
supposed to do. To ensure all of the configuration entries are documented it 
should iterate through all of the configuration fields and check if those have 
matching xyz-default.xml entries, but currently it just reports the entries 
that are present in the xyz-default.xml and missing in the matching 
configuration file.


> Refactor TestConfigurationFieldsBase and the connected test classes
> -------------------------------------------------------------------
>
>                 Key: YARN-11415
>                 URL: https://issues.apache.org/jira/browse/YARN-11415
>             Project: Hadoop YARN
>          Issue Type: Improvement
>            Reporter: Benjamin Teke
>            Priority: Major
>
> YARN-11413 pointed out a strange way of how the configuration tests are 
> executed. The first problem is that there is a 
> [Pattern|https://github.com/apache/hadoop/blob/570b503e3e7e7adf5b0a8fabca76003298216543/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfigurationFieldsBase.java#L197],
>  that matches only numbers, letters, dots, hyphens and underscores, but not 
> %, which is used in string replacements (i.e 
> {{yarn.nodemanager.aux-services.%s.classpath}} ), so essentially every 
> property that's present in any configuration object and doesn't match this 
> pattern is silently skipped, and documenting it will result in invalid test 
> failures, ergo the test encourages introducing props and not documenting 
> them. The pattern should be fixed in YARN-11413 for %s, but it's necessity 
> could be checked. 
> Another issue with this is that it works in a semi-opposite way of what it's 
> supposed to do. To ensure all of the configuration entries are documented it 
> should iterate through all of the configuration fields and check if those 
> have matching xyz-default.xml entries, but currently it just reports the 
> entries that are present in the xyz-default.xml and missing in the matching 
> configuration file. Since this test checks all the configuration objects this 
> might need some other follow-ups to document the missing properties from 
> other components if there are any.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to