Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.23.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Currently dev-support/test-patch.sh can only be run from the top-level (and only for hadoop-common).

        Issue Links

          Activity

          Hide
          Hudson added a comment -

          Integrated in Hadoop-Common-trunk-Commit #726 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/726/)
          HADOOP-7533. Allow test-patch to be run from any subproject directory.

          tomwhite : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1156673
          Files :

          • /hadoop/common/trunk/hadoop-common/CHANGES.txt
          • /hadoop/common/trunk/dev-support/test-patch.properties
          • /hadoop/common/trunk/dev-support/test-patch.sh
          • /hadoop/common/trunk/dev-support/smart-apply-patch.sh
          • /hadoop/common/trunk/hadoop-common/dev-support/test-patch.properties
          Show
          Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #726 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/726/ ) HADOOP-7533 . Allow test-patch to be run from any subproject directory. tomwhite : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1156673 Files : /hadoop/common/trunk/hadoop-common/CHANGES.txt /hadoop/common/trunk/dev-support/test-patch.properties /hadoop/common/trunk/dev-support/test-patch.sh /hadoop/common/trunk/dev-support/smart-apply-patch.sh /hadoop/common/trunk/hadoop-common/dev-support/test-patch.properties
          Hide
          Tom White added a comment -

          I've just committed this.

          Show
          Tom White added a comment - I've just committed this.
          Hide
          Tom White added a comment -

          Todd - it could do that (even though the file has a .properties extension, it's never read as a Java properties file, only sourced by bash). I'll leave it as a future enhancement if you don't mind.

          Show
          Tom White added a comment - Todd - it could do that (even though the file has a .properties extension, it's never read as a Java properties file, only sourced by bash). I'll leave it as a future enhancement if you don't mind.
          Hide
          Todd Lipcon added a comment -

          Looks good, though I didn't try it out. One thought - could the top-level test-patch.properties do something like:

          TOT_RA=0
          TOT_FINDBUGS=0
          TOT_JAVADOC=0
          for subproj in hadoop-common hadoop-hdfs hadoop-mapreduce ; do
            OK_RELEASEAUDIT_WARNINGS=0
            OK_FINDBUGS_WARNINGS=0
            OK_JAVADOC_WARNINGS=0
            source $subproj/dev-support/test-patch.properties
            TOT_RA=$[$TOT_RA + $OK_RELEASEAUDIT_WARNINGS]
            ...
          done
          
          OK_RELEASEAUDIT_WARNINGS=$TOT_RA
          ...
          

          ?

          Show
          Todd Lipcon added a comment - Looks good, though I didn't try it out. One thought - could the top-level test-patch.properties do something like: TOT_RA=0 TOT_FINDBUGS=0 TOT_JAVADOC=0 for subproj in hadoop-common hadoop-hdfs hadoop-mapreduce ; do OK_RELEASEAUDIT_WARNINGS=0 OK_FINDBUGS_WARNINGS=0 OK_JAVADOC_WARNINGS=0 source $subproj/dev-support/test-patch.properties TOT_RA=$[$TOT_RA + $OK_RELEASEAUDIT_WARNINGS] ... done OK_RELEASEAUDIT_WARNINGS=$TOT_RA ... ?
          Hide
          Aaron T. Myers added a comment -

          +1, patch looks good to me.

          Show
          Aaron T. Myers added a comment - +1, patch looks good to me.
          Hide
          Tom White added a comment -

          This patch:

          • Removes hard-coded dependencies on the common project. It now looks for test-patch.properties (which contains the number of allowed warnings) in dev-support so each subproject defines its own.
          • Changes test-patch.sh so it can run at the project root (hadoop-trunk) or a subproject module (e.g. hadoop-trunk/hadoop-common).
          • Changes smart-patch-apply.sh so it can handle cross-project patches.

          I ran the same sequence of commands as Todd in https://issues.apache.org/jira/browse/HADOOP-7384?focusedCommentId=13048441&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13048441, with the same results.

          In addition I ran the following from the project root

          % git diff | PATCH=echo dev-support/smart-apply-patch.sh -
          Looks like this is a git patch. Stripping a/ and b/ prefixes
          and incrementing PLEVEL
          Looks like this is being run at project root
          Going to apply patch with: echo -p1
          -p1 -E
          

          I also verified that test-patch can be successfully run from the top level and from hadoop-common.

          Show
          Tom White added a comment - This patch: Removes hard-coded dependencies on the common project. It now looks for test-patch.properties (which contains the number of allowed warnings) in dev-support so each subproject defines its own. Changes test-patch.sh so it can run at the project root (hadoop-trunk) or a subproject module (e.g. hadoop-trunk/hadoop-common). Changes smart-patch-apply.sh so it can handle cross-project patches. I ran the same sequence of commands as Todd in https://issues.apache.org/jira/browse/HADOOP-7384?focusedCommentId=13048441&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13048441 , with the same results. In addition I ran the following from the project root % git diff | PATCH=echo dev-support/smart-apply-patch.sh - Looks like this is a git patch. Stripping a/ and b/ prefixes and incrementing PLEVEL Looks like this is being run at project root Going to apply patch with: echo -p1 -p1 -E I also verified that test-patch can be successfully run from the top level and from hadoop-common.

            People

            • Assignee:
              Tom White
              Reporter:
              Tom White
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development