You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@ambari.apache.org by Sid Wagle <sw...@hortonworks.com> on 2016/12/06 18:49:14 UTC
Re: Review Request 54002: AMBARI-18966 Add check to ensure we do not
have @Transactional annotations on private methods
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54002/#review158200
-----------------------------------------------------------
Ship it!
Ship It!
- Sid Wagle
On Dec. 2, 2016, 3:57 p.m., Attila Doroszlai wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54002/
> -----------------------------------------------------------
>
> (Updated Dec. 2, 2016, 3:57 p.m.)
>
>
> Review request for Ambari, Laszlo Puskas, Myroslav Papirkovskyy, Sandor Magyari, Sumit Mohanty, Sebastian Toader, and Sid Wagle.
>
>
> Bugs: AMBARI-18966
> https://issues.apache.org/jira/browse/AMBARI-18966
>
>
> Repository: ambari
>
>
> Description
> -------
>
> * Custom checkstyle check is implemented in `utility` module
> * `checkstyle:check` goal added to `test` phase of `ambari-server` module
> * Build fails if it finds offending methods
> * Limitation: it only checks methods; while the annotation may be specified at the class level, it is not used on classes in Ambari (possible future enhancement).
>
>
> Diffs
> -----
>
> ambari-project/pom.xml 7f273eb
> ambari-server/checkstyle.xml PRE-CREATION
> ambari-server/pom.xml 69ab9d0
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertTargetResourceProvider.java 8e5674e
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java 42aae84
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java 9034989
> ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertsDAO.java d187947
> ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java f87b99c
> ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClustersImpl.java 8e5f37e
> ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java dd5e635
> ambari-server/src/main/java/org/apache/ambari/server/state/services/RetryUpgradeActionService.java 72b8ab7
> ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java c1655aa
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java c113fff
> pom.xml bd0aa7b
> utility/pom.xml 2febb83
> utility/src/main/java/org/apache/ambari/checkstyle/AvoidTransactionalOnPrivateMethodsCheck.java PRE-CREATION
> utility/src/main/resources/checkstyle_packages.xml PRE-CREATION
> utility/src/test/java/org/apache/ambari/checkstyle/AvoidTransactionalOnPrivateMethodsCheckTest.java PRE-CREATION
> utility/src/test/resources/org/apache/ambari/checkstyle/InputTransactionalOnPrivateMethods.java PRE-CREATION
>
> Diff: https://reviews.apache.org/r/54002/diff/
>
>
> Testing
> -------
>
> ```
> $ mvn -pl utility clean install
> ...
> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.212 sec - in org.apache.ambari.checkstyle.AvoidTransactionalOnPrivateMethodsCheckTest
> ...
> [INFO] Rat check: Summary of files. Unapproved: 0 unknown: 0 generated: 0 approved: 13 licence.
> ...
> [INFO] BUILD SUCCESS
> ```
>
> and
>
> ```
> $ mvn -am -pl ambari-server -DskipTests clean test
> ...
> [INFO] Rat check: Summary of files. Unapproved: 0 unknown: 0 generated: 0 approved: 5196 licence.
> ...
> [INFO] --- maven-checkstyle-plugin:2.17:check (checkstyle) @ ambari-server ---
> [INFO] Starting audit...
> Audit done.
> ...
> [INFO] BUILD SUCCESS
> ```
>
>
> Thanks,
>
> Attila Doroszlai
>
>