Hadoop Common
  1. Hadoop Common
  2. HADOOP-6326

Hundson runs should check for AspectJ warnings and report failure if any is present

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.21.0
    • Component/s: build
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      When a code modifications break AspectJ bindings the following warning appears in the ant's build output:

           [echo] Start weaving aspects in place
           [iajc] warning at /Users/cos/work/branch-0.21/src/test/aop/org/apache/hadoop/hdfs/server/datanode/FSDatasetAspects.aj:55::0 advice defined in org.apache.hadoop.hdfs.server.datanode.FSDatasetAspects has not been applied [Xlint:adviceDidNotMatch]
           [echo] Weaving of aspects is finished
      

      Build process (in particular under Hudson) needs to check the output for such warnings and fail the build if any is present

      1. HADOOP-6326.patch
        2 kB
        Konstantin Boudnik
      2. HADOOP-6326.patch
        2 kB
        Konstantin Boudnik
      3. HADOOP-6326.patch
        1 kB
        Konstantin Boudnik

        Issue Links

          Activity

          Hide
          Konstantin Boudnik added a comment -

          Most of AspectJ advises are located within HDFS code at the moment. We are seeing a significant number of such issues during an active code development (see HDFS-722 or HDFS-597).

          Show
          Konstantin Boudnik added a comment - Most of AspectJ advises are located within HDFS code at the moment. We are seeing a significant number of such issues during an active code development (see HDFS-722 or HDFS-597 ).
          Hide
          Vinod Kumar Vavilapalli added a comment -

          We can simply let the build fail, if that is possible with iajc. That way we don't need special checks at Hudson's test-patch.

          Show
          Vinod Kumar Vavilapalli added a comment - We can simply let the build fail, if that is possible with iajc. That way we don't need special checks at Hudson's test-patch.
          Hide
          Konstantin Boudnik added a comment -

          Yes, we could, perhaps. I wasn't able to find a solution for that (HDFS-584)

          Show
          Konstantin Boudnik added a comment - Yes, we could, perhaps. I wasn't able to find a solution for that ( HDFS-584 )
          Hide
          Konstantin Boudnik added a comment -

          Copy-cat of HDFS-584. I've created new aspect with incorrectly specified pointcut and ran the build.

          compile-fault-inject:
               [echo] Start weaving aspects in place
               [iajc] warning at /Users/xxx/work/Common/src/test/aop/org/apache/hadoop/fs/DUAspects.aj:11::0 advice defined in org.apache.hadoop.fs.DUAspects has not been applied [Xlint:adviceDidNotMatch]
          
          BUILD FAILED
          /Users/xxx/work/Common/src/test/aop/build/aop.xml:74: The following error occurred while executing this line:
          /Users/xxx/work/Common/src/test/aop/build/aop.xml:57: /Users/xxx/work/Common/build-fi/compile-fi.log doesn't exist
          
          Total time: 1 minute 16 seconds
          
          Show
          Konstantin Boudnik added a comment - Copy-cat of HDFS-584 . I've created new aspect with incorrectly specified pointcut and ran the build. compile-fault-inject: [echo] Start weaving aspects in place [iajc] warning at /Users/xxx/work/Common/src/test/aop/org/apache/hadoop/fs/DUAspects.aj:11::0 advice defined in org.apache.hadoop.fs.DUAspects has not been applied [Xlint:adviceDidNotMatch] BUILD FAILED /Users/xxx/work/Common/src/test/aop/build/aop.xml:74: The following error occurred while executing this line: /Users/xxx/work/Common/src/test/aop/build/aop.xml:57: /Users/xxx/work/Common/build-fi/compile-fi.log doesn't exist Total time: 1 minute 16 seconds
          Hide
          Konstantin Boudnik added a comment -

          Fix for wrong property name

          Show
          Konstantin Boudnik added a comment - Fix for wrong property name
          Hide
          Konstantin Boudnik added a comment -

          Due to some specific of running <subant> parent directory of its log file has to exist (init target is called when <sunant> process is already started, while output is set before). Otherwise, the build will be failing on after clean runs

          Show
          Konstantin Boudnik added a comment - Due to some specific of running <subant> parent directory of its log file has to exist ( init target is called when <sunant> process is already started, while output is set before). Otherwise, the build will be failing on after clean runs
          Hide
          Tsz Wo Nicholas Sze added a comment -

          +1 patch looks good.

          Show
          Tsz Wo Nicholas Sze added a comment - +1 patch looks good.
          Hide
          Konstantin Boudnik added a comment -

          It doesn't require full test-patch verification for the effect of the fix appears only when an aspect binding is broken.

          Thanks for the review, Nicholas.

          I've just committed this.

          Show
          Konstantin Boudnik added a comment - It doesn't require full test-patch verification for the effect of the fix appears only when an aspect binding is broken. Thanks for the review, Nicholas. I've just committed this.
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Common-trunk-Commit #70 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk-Commit/70/)
          . Hundson runs should check for AspectJ warnings and report failure if any is present. Contributed by Konstantin Boudnik

          Show
          Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #70 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk-Commit/70/ ) . Hundson runs should check for AspectJ warnings and report failure if any is present. Contributed by Konstantin Boudnik
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Common-trunk #137 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk/137/)
          . Hundson runs should check for AspectJ warnings and report failure if any is present. Contributed by Konstantin Boudnik

          Show
          Hudson added a comment - Integrated in Hadoop-Common-trunk #137 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk/137/ ) . Hundson runs should check for AspectJ warnings and report failure if any is present. Contributed by Konstantin Boudnik

            People

            • Assignee:
              Konstantin Boudnik
              Reporter:
              Konstantin Boudnik
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development