adoroszlai opened a new pull request #768: HDDS-3341. Checkstyle fails for new 
modules/versions
URL: https://github.com/apache/hadoop-ozone/pull/768
 
 
   ## What changes were proposed in this pull request?
   
   Make `checkstyle.sh` work with new modules/versions:
   
   1. first attempt to run the check only
   2. if it fails due to anything other than style violation, try to compile 
sources, too.
   
   Ignore violations on Protobuf generated sources.
   
   Output from the first attempt is only printed with some delay only if and 
when it completes successfully, to avoid duplicate Maven logs.  This may be a 
bit annoying when run manually.  Please let me know if duplicated but immediate 
output is preferred.
   
   https://issues.apache.org/jira/browse/HDDS-3341
   
   ## How was this patch tested?
   
   1. Tested on HDDS-3312, which introduces a new 
`hadoop-hdds-hadoop-dependency-client` module and 
[fails](https://github.com/apache/hadoop-ozone/pull/744/checks?check_run_id=558258406)
 with `Could not find artifact 
org.apache.hadoop:hadoop-hdds-hadoop-dependency-client:jar:0.6.0-SNAPSHOT in 
apache.snapshots.https`.  With this change the check passes:
   
   ```
   $ hadoop-ozone/dev-support/checks/checkstyle.sh
   ...
   [INFO] BUILD SUCCESS
   [INFO] 
------------------------------------------------------------------------
   [INFO] Total time:  02:55 min
   ...
   $ echo $?
   0
   ```
   
   2. Tested on `master`, where all modules are available, so no compilation is 
needed:
   
   ```
   $ hadoop-ozone/dev-support/checks/checkstyle.sh
   ...
   [INFO] BUILD SUCCESS
   [INFO] 
------------------------------------------------------------------------
   [INFO] Total time:  14.093 s
   ...
   $ echo $?
   0
   ```
   
   3. Introduced an unused import, verified that violation is reported:
   
   ```
   $ hadoop-ozone/dev-support/checks/checkstyle.sh
   ...
   [INFO] BUILD SUCCESS
   [INFO] 
------------------------------------------------------------------------
   [INFO] Total time:  6.226 s
   ...
   
hadoop-ozone/common/src/main/java/org/apache/hadoop/hdds/protocol/StorageType.java
    20: Unused import - java.util.List.
   $ echo $?
   1
   ```
   
   https://github.com/adoroszlai/hadoop-ozone/runs/558999926

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to