You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@aurora.apache.org by Suman Karumuri <ma...@apache.org> on 2014/05/31 09:17:30 UTC

Review Request 22111: [DoNotShip] gradle node, bower and karma setup

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/22111/
-----------------------------------------------------------

Review request for Aurora, David McLaughlin and Bill Farner.


Bugs: AURORA-451
    https://issues.apache.org/jira/browse/AURORA-451


Repository: aurora


Description
-------

This patch does a few things: 

a) Install node using gradle-node plugin.
b) Installs node modules like bower, karma and protractor.
c) ./gradlew installBowerComponents will download and install the bower components.
d) The ServletModule and build.gradle are updated to use the files installed via ./gradlew installBowerComponents. I have also deleted the 3rdparty/javascript/bower_components directory (not added here to keep the diff small).
e) ./gradlew runJsTests will run unit tests for our code using karma. 

I have tested a) b) c) and d) and they work as expected. However, we need to hook up installBowerComponents correctly as part of the build and run tasks.

./gradlew runJsTests also starts a karma server and runs the unit tests. But the task fails right now since we need to adapt our code a bit so karma can run the unit tests successfully. 

You can also run angular unit tests and end to end tests via protractor or karma. I have also installed protactor via node, but I haven't configured it for this projects since I am not sure what we would prefer to use in our environment. Further, both frameworks may need different kinds of tweaks to our source before we can run them under the test frameworks. David said he would look into this part.

NOTE: PLEASE ALSO DELETE 3rdparty/javascript/bower_components DIRECTORY AFTER YOU APPLY THIS PATCH.

PS: Do not ship this patch as is since it needs a few more tweaks.


Diffs
-----

  .bowerrc 7d94bddb9fe1faa9cfa93ed79b05d1c467fad9b5 
  .gitignore bed5b8b8a02e957e05b8bcc8fed925f1432973cf 
  bower.json PRE-CREATION 
  build.gradle 45494000c8c8eff6a1c049fa1842bb99b4fca67c 
  karma.conf.js PRE-CREATION 
  package.json PRE-CREATION 
  src/main/java/org/apache/aurora/scheduler/http/ServletModule.java d104eab0674b2d9b59a187abe306c45ee5013b38 

Diff: https://reviews.apache.org/r/22111/diff/


Testing
-------

Ensured node is installed as part of setup.

./gradlew clean installBowerComponents run works as expected. 
./gradlew installBowerComponents works as expected.
./gradlew runJsTests (fails since our code needs to be updated).


Thanks,

Suman Karumuri


Re: Review Request 22111: [DoNotShip] gradle node, bower and karma setup

Posted by Jake Farrell <jf...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/22111/#review49005
-----------------------------------------------------------


Love the concept behind this, thanks for putting the work in on this. might be good to split up and get the gradle-node and bower components added dynamically first and then add the testing components after the fact. This should reduce the LICENSE file down to just the base Apache License, 

- Jake Farrell


On May 31, 2014, 7:17 a.m., Suman Karumuri wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/22111/
> -----------------------------------------------------------
> 
> (Updated May 31, 2014, 7:17 a.m.)
> 
> 
> Review request for Aurora, David McLaughlin and Bill Farner.
> 
> 
> Bugs: AURORA-451
>     https://issues.apache.org/jira/browse/AURORA-451
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> This patch does a few things: 
> 
> a) Install node using gradle-node plugin.
> b) Installs node modules like bower, karma and protractor.
> c) ./gradlew installBowerComponents will download and install the bower components.
> d) The ServletModule and build.gradle are updated to use the files installed via ./gradlew installBowerComponents. I have also deleted the 3rdparty/javascript/bower_components directory (not added here to keep the diff small).
> e) ./gradlew runJsTests will run unit tests for our code using karma. 
> 
> I have tested a) b) c) and d) and they work as expected. However, we need to hook up installBowerComponents correctly as part of the build and run tasks.
> 
> ./gradlew runJsTests also starts a karma server and runs the unit tests. But the task fails right now since we need to adapt our code a bit so karma can run the unit tests successfully. 
> 
> You can also run angular unit tests and end to end tests via protractor or karma. I have also installed protactor via node, but I haven't configured it for this projects since I am not sure what we would prefer to use in our environment. Further, both frameworks may need different kinds of tweaks to our source before we can run them under the test frameworks. David said he would look into this part.
> 
> NOTE: PLEASE ALSO DELETE 3rdparty/javascript/bower_components DIRECTORY AFTER YOU APPLY THIS PATCH.
> 
> PS: Do not ship this patch as is since it needs a few more tweaks.
> 
> 
> Diffs
> -----
> 
>   .bowerrc 7d94bddb9fe1faa9cfa93ed79b05d1c467fad9b5 
>   .gitignore bed5b8b8a02e957e05b8bcc8fed925f1432973cf 
>   bower.json PRE-CREATION 
>   build.gradle 45494000c8c8eff6a1c049fa1842bb99b4fca67c 
>   karma.conf.js PRE-CREATION 
>   package.json PRE-CREATION 
>   src/main/java/org/apache/aurora/scheduler/http/ServletModule.java d104eab0674b2d9b59a187abe306c45ee5013b38 
> 
> Diff: https://reviews.apache.org/r/22111/diff/
> 
> 
> Testing
> -------
> 
> Ensured node is installed as part of setup.
> 
> ./gradlew clean installBowerComponents run works as expected. 
> ./gradlew installBowerComponents works as expected.
> ./gradlew runJsTests (fails since our code needs to be updated).
> 
> 
> Thanks,
> 
> Suman Karumuri
> 
>