Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-524

TestYarnVersionInfo failing if generated properties doesn't include an SVN URL

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-alpha1
    • Fix Version/s: 3.0.0-alpha1
    • Component/s: api
    • Labels:
      None
    • Environment:

      OS/X with branch off github

      Description

      TestYarnVersionInfo fails in the YarnVersionInfo.getUrl() call returns Unknown when that is the value inserted into the property file

      1. YARN-524.patch
        1 kB
        Steve Loughran

        Activity

        Hide
        stevel@apache.org Steve Loughran added a comment -

        I have a yarn-version-info.properties file of

        version=3.0.0-SNAPSHOT
        revision=a0ba744f95eb220ba308376324179074dee68533
        branch=stevel/YARN-117
        user=stevel
        date=2013-04-01T12:08Z
        url=Unknown
        srcChecksum=ab657ee8a99c56f22a874ca55268a24
        

        Because of the url value, I get to see a stack trace

        testVersionInfoGenerated(org.apache.hadoop.yarn.util.TestYarnVersionInfo)  Time elapsed: 63 sec  <<< FAILURE!
        junit.framework.AssertionFailedError: getUrl returned Unknown
        	at junit.framework.Assert.fail(Assert.java:47)
        	at junit.framework.Assert.assertTrue(Assert.java:20)
        	at org.apache.hadoop.yarn.util.TestYarnVersionInfo.testVersionInfoGenerated(TestYarnVersionInfo.java:43)
        	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        	at java.lang.reflect.Method.invoke(Method.java:597)
        	at junit.framework.TestCase.runTest(TestCase.java:168)
        	at junit.framework.TestCase.runBare(TestCase.java:134)
        	at junit.framework.TestResult$1.protect(TestResult.java:110)
        	at junit.framework.TestResult.runProtected(TestResult.java:128)
        	at junit.framework.TestResult.run(TestResult.java:113)
        	at junit.framework.TestCase.run(TestCase.java:124)
        	at junit.framework.TestSuite.runTest(TestSuite.java:243)
        	at junit.framework.TestSuite.run(TestSuite.java:238)
        	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
        	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
        	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
        	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
        	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        	at java.lang.reflect.Method.invoke(Method.java:597)
        	at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
        	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
        	at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
        	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
        	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
        

        I think the test assumes that there always is an SVN URL for YARN, but there's no requirement for this to be the case -not only does this git build clearly fail, but tarball builds may have the same characteristics

        I propose downgrading the URL test to those of the other assertions designed to work without svn or git

        Show
        stevel@apache.org Steve Loughran added a comment - I have a yarn-version-info.properties file of version=3.0.0-SNAPSHOT revision=a0ba744f95eb220ba308376324179074dee68533 branch=stevel/YARN-117 user=stevel date=2013-04-01T12:08Z url=Unknown srcChecksum=ab657ee8a99c56f22a874ca55268a24 Because of the url value, I get to see a stack trace testVersionInfoGenerated(org.apache.hadoop.yarn.util.TestYarnVersionInfo) Time elapsed: 63 sec <<< FAILURE! junit.framework.AssertionFailedError: getUrl returned Unknown at junit.framework.Assert.fail(Assert.java:47) at junit.framework.Assert.assertTrue(Assert.java:20) at org.apache.hadoop.yarn.util.TestYarnVersionInfo.testVersionInfoGenerated(TestYarnVersionInfo.java:43) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at junit.framework.TestCase.runTest(TestCase.java:168) at junit.framework.TestCase.runBare(TestCase.java:134) at junit.framework.TestResult$1.protect(TestResult.java:110) at junit.framework.TestResult.runProtected(TestResult.java:128) at junit.framework.TestResult.run(TestResult.java:113) at junit.framework.TestCase.run(TestCase.java:124) at junit.framework.TestSuite.runTest(TestSuite.java:243) at junit.framework.TestSuite.run(TestSuite.java:238) at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75) I think the test assumes that there always is an SVN URL for YARN, but there's no requirement for this to be the case -not only does this git build clearly fail, but tarball builds may have the same characteristics I propose downgrading the URL test to those of the other assertions designed to work without svn or git
        Hide
        stevel@apache.org Steve Loughran added a comment -

        replaces with check for nullness, not != unknown

        Show
        stevel@apache.org Steve Loughran added a comment - replaces with check for nullness, not != unknown
        Hide
        tucu00 Alejandro Abdelnur added a comment -

        Where is yarn version info being used? I don't think it makes much more sense to have it while common/hdfs/yarn/mapred are a single project. we should use the common's version info only. An the version-info plugin in common should do the following so the MD5 covers all the sourcecode:

                    <configuration>
                      <source>
                        <directory>${basedir}/../..</directory>
                        <includes>
                          <include>**/src/main/java/**/*.java</include>
                          <include>**/src/main/proto/**/*.proto</include>
                        </includes>
                      </source>
                    </configuration>
        
        Show
        tucu00 Alejandro Abdelnur added a comment - Where is yarn version info being used? I don't think it makes much more sense to have it while common/hdfs/yarn/mapred are a single project. we should use the common's version info only. An the version-info plugin in common should do the following so the MD5 covers all the sourcecode: <configuration> <source> <directory>${basedir}/../..</directory> <includes> <include>**/src/main/java/**/*.java</include> <include>**/src/main/proto/**/*.proto</include> </includes> </source> </configuration>
        Hide
        cnauroth Chris Nauroth added a comment -

        we should use the common's version info only.

        Agreed. This change is proposed in HADOOP-9207, though no one has worked on the patch yet. Perhaps it's best to move ahead with Steve's patch to unblock the test quickly, and then go back to HADOOP-9207.

        +1 for the current patch. Thanks, Steve.

        Show
        cnauroth Chris Nauroth added a comment - we should use the common's version info only. Agreed. This change is proposed in HADOOP-9207 , though no one has worked on the patch yet. Perhaps it's best to move ahead with Steve's patch to unblock the test quickly, and then go back to HADOOP-9207 . +1 for the current patch. Thanks, Steve.
        Hide
        hadoopqa Hadoop QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12576393/YARN-524.patch
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 1 new or modified test files.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 eclipse:eclipse. The patch built with eclipse:eclipse.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed unit tests in hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: https://builds.apache.org/job/PreCommit-YARN-Build/636//testReport/
        Console output: https://builds.apache.org/job/PreCommit-YARN-Build/636//console

        This message is automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - +1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12576393/YARN-524.patch against trunk revision . +1 @author . The patch does not contain any @author tags. +1 tests included . The patch appears to include 1 new or modified test files. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . The javadoc tool did not generate any warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. +1 core tests . The patch passed unit tests in hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common. +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-YARN-Build/636//testReport/ Console output: https://builds.apache.org/job/PreCommit-YARN-Build/636//console This message is automatically generated.
        Hide
        stevel@apache.org Steve Loughran added a comment -

        committed

        Show
        stevel@apache.org Steve Loughran added a comment - committed
        Hide
        hudson Hudson added a comment -

        Integrated in Hadoop-trunk-Commit #3543 (See https://builds.apache.org/job/Hadoop-trunk-Commit/3543/)
        YARN-524 TestYarnVersionInfo failing if generated properties doesn't include an SVN URL (Revision 1463300)

        Result = SUCCESS
        stevel : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1463300
        Files :

        • /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
        • /hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestYarnVersionInfo.java
        Show
        hudson Hudson added a comment - Integrated in Hadoop-trunk-Commit #3543 (See https://builds.apache.org/job/Hadoop-trunk-Commit/3543/ ) YARN-524 TestYarnVersionInfo failing if generated properties doesn't include an SVN URL (Revision 1463300) Result = SUCCESS stevel : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1463300 Files : /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt /hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestYarnVersionInfo.java
        Hide
        hudson Hudson added a comment -

        Integrated in Hadoop-Yarn-trunk #173 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/173/)
        YARN-524 TestYarnVersionInfo failing if generated properties doesn't include an SVN URL (Revision 1463300)

        Result = SUCCESS
        stevel : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1463300
        Files :

        • /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
        • /hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestYarnVersionInfo.java
        Show
        hudson Hudson added a comment - Integrated in Hadoop-Yarn-trunk #173 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/173/ ) YARN-524 TestYarnVersionInfo failing if generated properties doesn't include an SVN URL (Revision 1463300) Result = SUCCESS stevel : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1463300 Files : /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt /hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestYarnVersionInfo.java
        Hide
        hudson Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #1362 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1362/)
        YARN-524 TestYarnVersionInfo failing if generated properties doesn't include an SVN URL (Revision 1463300)

        Result = FAILURE
        stevel : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1463300
        Files :

        • /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
        • /hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestYarnVersionInfo.java
        Show
        hudson Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #1362 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1362/ ) YARN-524 TestYarnVersionInfo failing if generated properties doesn't include an SVN URL (Revision 1463300) Result = FAILURE stevel : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1463300 Files : /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt /hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestYarnVersionInfo.java
        Hide
        hudson Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk #1389 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1389/)
        YARN-524 TestYarnVersionInfo failing if generated properties doesn't include an SVN URL (Revision 1463300)

        Result = SUCCESS
        stevel : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1463300
        Files :

        • /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
        • /hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestYarnVersionInfo.java
        Show
        hudson Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #1389 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1389/ ) YARN-524 TestYarnVersionInfo failing if generated properties doesn't include an SVN URL (Revision 1463300) Result = SUCCESS stevel : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1463300 Files : /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt /hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestYarnVersionInfo.java
        Hide
        hudson Hudson added a comment -

        Integrated in Hadoop-trunk-Commit #3580 (See https://builds.apache.org/job/Hadoop-trunk-Commit/3580/)
        YARN-524. Moving CHANGES.txt entry to the correct section. (Revision 1465876)

        Result = SUCCESS
        vinodkv : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1465876
        Files :

        • /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
        Show
        hudson Hudson added a comment - Integrated in Hadoop-trunk-Commit #3580 (See https://builds.apache.org/job/Hadoop-trunk-Commit/3580/ ) YARN-524 . Moving CHANGES.txt entry to the correct section. (Revision 1465876) Result = SUCCESS vinodkv : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1465876 Files : /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        Integrated in Hadoop-Yarn-trunk #178 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/178/)
        YARN-524. Moving CHANGES.txt entry to the correct section. (Revision 1465876)

        Result = SUCCESS
        vinodkv : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1465876
        Files :

        • /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
        Show
        hudson Hudson added a comment - Integrated in Hadoop-Yarn-trunk #178 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/178/ ) YARN-524 . Moving CHANGES.txt entry to the correct section. (Revision 1465876) Result = SUCCESS vinodkv : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1465876 Files : /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #1367 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1367/)
        YARN-524. Moving CHANGES.txt entry to the correct section. (Revision 1465876)

        Result = FAILURE
        vinodkv : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1465876
        Files :

        • /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
        Show
        hudson Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #1367 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1367/ ) YARN-524 . Moving CHANGES.txt entry to the correct section. (Revision 1465876) Result = FAILURE vinodkv : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1465876 Files : /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk #1394 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1394/)
        YARN-524. Moving CHANGES.txt entry to the correct section. (Revision 1465876)

        Result = FAILURE
        vinodkv : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1465876
        Files :

        • /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
        Show
        hudson Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #1394 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1394/ ) YARN-524 . Moving CHANGES.txt entry to the correct section. (Revision 1465876) Result = FAILURE vinodkv : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1465876 Files : /hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt

          People

          • Assignee:
            stevel@apache.org Steve Loughran
            Reporter:
            stevel@apache.org Steve Loughran
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development