tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject tez git commit: TEZ-3152. Tez UI 2: Build fails when run by multiple users or when node_modules is old (sree)
Date Fri, 25 Mar 2016 18:44:13 GMT
Repository: tez
Updated Branches:
  refs/heads/master 19280cfc6 -> 8a233ecc1


TEZ-3152. Tez UI 2: Build fails when run by multiple users or when node_modules is old (sree)


Project: http://git-wip-us.apache.org/repos/asf/tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/8a233ecc
Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/8a233ecc
Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/8a233ecc

Branch: refs/heads/master
Commit: 8a233ecc145a8bcecb8bc9c409fea6d40bdd0ad6
Parents: 19280cf
Author: Sreenath Somarajapuram <sree@apache.org>
Authored: Sat Mar 26 00:13:24 2016 +0530
Committer: Sreenath Somarajapuram <sree@apache.org>
Committed: Sat Mar 26 00:13:24 2016 +0530

----------------------------------------------------------------------
 BUILDING.txt                               |  7 +++
 CHANGES.txt                                |  1 +
 pom.xml                                    |  5 ++
 tez-ui2/README.md                          | 20 ++++----
 tez-ui2/pom.xml                            | 63 ++++++++++++++++++++-----
 tez-ui2/src/main/webapp/README.md          | 25 +++++-----
 tez-ui2/src/main/webapp/ember-cli-build.js | 11 +++--
 tez-ui2/src/main/webapp/package.json       | 11 +++--
 8 files changed, 102 insertions(+), 41 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/8a233ecc/BUILDING.txt
----------------------------------------------------------------------
diff --git a/BUILDING.txt b/BUILDING.txt
index c251b4a..14fd9a5 100644
--- a/BUILDING.txt
+++ b/BUILDING.txt
@@ -114,6 +114,13 @@ with tez-plugins/tez-yarn-timeline-history-with-acls/src/main/java/org/apache/te
 with tez-plugins/tez-yarn-timeline-history-with-acls/src/test/java/org/apache/tez/tests
 
 ----------------------------------------------------------------------------------
+UI build issues:
+
+In case of issue with UI build, please clean the UI cache.
+
+ $ mvn clean -PcleanUICache
+
+----------------------------------------------------------------------------------
 Protocol Buffer compiler:
 
 The version of Protocol Buffer compiler, protoc, must be 2.5.0 and match the

http://git-wip-us.apache.org/repos/asf/tez/blob/8a233ecc/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index fa60657..7c4939c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1890,6 +1890,7 @@ ALL CHANGES
   TEZ-643. Change getProgress APIs to return some form of progress and 1.0f once the map
or reduce phase complete. (sseth)
   TEZ-3160. Tez UI 2: Swimlane - Create swimlane page & component (sree)
   TEZ-3170. Tez UI 2: Swimlane - Display computed events, event bars & dependencies (sree)
+  TEZ-3152. Tez UI 2: Build fails when run by multiple users or when node_modules is old
(sree)
 
 Release 0.2.0-incubating: 2013-11-30
 

http://git-wip-us.apache.org/repos/asf/tez/blob/8a233ecc/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 2b6e1d4..2274d3c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -937,6 +937,11 @@
             <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
           </configuration>
         </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-clean-plugin</artifactId>
+          <version>3.0.0</version>
+        </plugin>
       </plugins>
     </pluginManagement>
 

http://git-wip-us.apache.org/repos/asf/tez/blob/8a233ecc/tez-ui2/README.md
----------------------------------------------------------------------
diff --git a/tez-ui2/README.md b/tez-ui2/README.md
index 6a009ee..f8985fe 100644
--- a/tez-ui2/README.md
+++ b/tez-ui2/README.md
@@ -66,22 +66,24 @@ All the following commands must be run inside `src/main/webapp`.
 
 You will need the following things properly installed on your computer.
 
-* [Git](http://git-scm.com/)
-* [Node.js](http://nodejs.org/) (with NPM)
-* [Ember CLI](http://www.ember-cli.com/)
+* Install [Node.js](http://nodejs.org/) (with NPM)
+* Install [Bower](http://bower.io/)
+* Install all dependencies by running `npm install` & `bower install`
 
 ### Running UI
 
-* `ember server`
+* `npm start`
 * Visit your app at [http://localhost:4200](http://localhost:4200).
 
 ### Running Tests
 
-* `ember test`
+* `npm test`
 
-### Building UI manually
+### Building
 
-* `ember build` (development)
-* `ember build --environment production` (production)
+* `npm run build` (production)
+* Files would be stored in "dist/"
 
-Files would be stored in "dist/"
+### Adding new routes (pages), controllers, components etc.
+
+* Use ember-cli blueprint generator - [Ember CLI](http://ember-cli.com/extending/#generators-and-blueprints)

http://git-wip-us.apache.org/repos/asf/tez/blob/8a233ecc/tez-ui2/pom.xml
----------------------------------------------------------------------
diff --git a/tez-ui2/pom.xml b/tez-ui2/pom.xml
index 695cacb..5f75c95 100644
--- a/tez-ui2/pom.xml
+++ b/tez-ui2/pom.xml
@@ -34,6 +34,39 @@
     <skipTests>false</skipTests>
   </properties>
 
+  <profiles>
+    <profile>
+      <id>cleanUICache</id>
+      <activation>
+        <activeByDefault>false</activeByDefault>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-clean-plugin</artifactId>
+            <configuration>
+              <filesets>
+                <fileset>
+                  <directory>${webappDir}/tmp</directory>
+                </fileset>
+                <fileset>
+                  <directory>${webappDir}/node</directory>
+                </fileset>
+                <fileset>
+                  <directory>${webappDir}/node_modules</directory>
+                </fileset>
+                <fileset>
+                  <directory>${webappDir}/bower_components</directory>
+                </fileset>
+              </filesets>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+
   <build>
     <plugins>
 
@@ -67,7 +100,7 @@
         </configuration>
       </plugin>
 
-      <!-- NPM Install -->
+      <!-- Install Node & dependencies -->
       <plugin>
         <groupId>com.github.eirslett</groupId>
         <artifactId>frontend-maven-plugin</artifactId>
@@ -76,7 +109,7 @@
         </configuration>
         <executions>
           <execution>
-            <phase>generate-sources</phase>
+            <phase>generate-resources</phase>
             <id>install node and npm</id>
             <goals>
               <goal>install-node-and-npm</goal>
@@ -87,23 +120,30 @@
             </configuration>
           </execution>
           <execution>
-            <phase>generate-sources</phase>
+            <phase>generate-resources</phase>
             <id>npm install</id>
             <goals>
               <goal>npm</goal>
             </goals>
           </execution>
+          <execution>
+            <phase>generate-resources</phase>
+            <id>bower install</id>
+            <goals>
+              <goal>bower</goal>
+            </goals>
+          </execution>
         </executions>
       </plugin>
 
-      <!-- Bower install & grunt build-->
+      <!-- Build & Test -->
       <plugin>
         <artifactId>exec-maven-plugin</artifactId>
         <groupId>org.codehaus.mojo</groupId>
         <executions>
           <execution>
             <id>ember build</id>
-            <phase>generate-sources</phase>
+            <phase>generate-resources</phase>
             <goals>
               <goal>exec</goal>
             </goals>
@@ -111,15 +151,15 @@
               <workingDirectory>${webappDir}</workingDirectory>
               <executable>${node.executable}</executable>
               <arguments>
-                <argument>node_modules/ember-cli/bin/ember</argument>
-                <argument>build</argument>
-                <argument>-prod</argument>
+                <argument>node/npm/bin/npm-cli</argument>
+                <argument>run</argument>
+                <argument>build:mvn</argument>
               </arguments>
             </configuration>
           </execution>
           <execution>
             <id>ember test</id>
-            <phase>generate-resources</phase>
+            <phase>test</phase>
             <goals>
               <goal>exec</goal>
             </goals>
@@ -128,8 +168,9 @@
               <workingDirectory>${webappDir}</workingDirectory>
               <executable>${node.executable}</executable>
               <arguments>
-                <argument>node_modules/ember-cli/bin/ember</argument>
-                <argument>test</argument>
+                <argument>node/npm/bin/npm-cli</argument>
+                <argument>run</argument>
+                <argument>test:mvn</argument>
               </arguments>
             </configuration>
           </execution>

http://git-wip-us.apache.org/repos/asf/tez/blob/8a233ecc/tez-ui2/src/main/webapp/README.md
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/README.md b/tez-ui2/src/main/webapp/README.md
index a86e7da..997752c 100644
--- a/tez-ui2/src/main/webapp/README.md
+++ b/tez-ui2/src/main/webapp/README.md
@@ -28,27 +28,30 @@ For more information on Tez and the Tez UI - Check the [Tez homepage](http://tez
 
 ## Development
 
-## Prerequisites
+All the following commands must be run inside `src/main/webapp`.
+
+### Prerequisites
 
 You will need the following things properly installed on your computer.
 
-* [Git](http://git-scm.com/)
-* [Node.js](http://nodejs.org/) (with NPM)
-* [Ember CLI](http://www.ember-cli.com/)
+* Install [Node.js](http://nodejs.org/) (with NPM)
+* Install [Bower](http://bower.io/)
+* Install all dependencies by running `npm install` & `bower install`
 
-## Running UI
+### Running UI
 
-* `ember server`
+* `npm start`
 * Visit your app at [http://localhost:4200](http://localhost:4200).
 
 ### Running Tests
 
-* `ember test`
-* `ember test --server`
+* `npm test`
 
 ### Building
 
-* `ember build` (development)
-* `ember build --environment production` (production)
+* `npm run build` (production)
+* Files would be stored in "dist/"
+
+### Adding new routes (pages), controllers, components etc.
 
-Files would be stored in "dist/"
+* Use ember-cli blueprint generator - [Ember CLI](http://ember-cli.com/extending/#generators-and-blueprints)

http://git-wip-us.apache.org/repos/asf/tez/blob/8a233ecc/tez-ui2/src/main/webapp/ember-cli-build.js
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/ember-cli-build.js b/tez-ui2/src/main/webapp/ember-cli-build.js
index 1de337c..9e74c80 100644
--- a/tez-ui2/src/main/webapp/ember-cli-build.js
+++ b/tez-ui2/src/main/webapp/ember-cli-build.js
@@ -44,10 +44,11 @@ module.exports = function(defaults) {
      include: ['z-worker.js', 'deflate.js', 'inflate.js'],
      destDir: '/assets/zip'
   });
-
-  app.import("bower_components/snippet-ss/less/force.less");
-  app.import("bower_components/snippet-ss/less/effects.less");
-  app.import("bower_components/snippet-ss/less/no.less");
+  var copyFonts = new Funnel('bower_components/font-awesome/', {
+     srcDir: '/fonts',
+     include: ['*.*'],
+     destDir: '/fonts'
+  });
 
   app.import('bower_components/bootstrap/dist/js/bootstrap.js');
   app.import('bower_components/jquery-ui/jquery-ui.js');
@@ -63,5 +64,5 @@ module.exports = function(defaults) {
   app.import('bower_components/codemirror/mode/pig/pig.js');
   app.import('bower_components/codemirror/lib/codemirror.css');
 
-  return app.toTree(new MergeTrees([configEnv, zipWorker]));
+  return app.toTree(new MergeTrees([configEnv, zipWorker, copyFonts]));
 };

http://git-wip-us.apache.org/repos/asf/tez/blob/8a233ecc/tez-ui2/src/main/webapp/package.json
----------------------------------------------------------------------
diff --git a/tez-ui2/src/main/webapp/package.json b/tez-ui2/src/main/webapp/package.json
index 1393e90..1a641b4 100644
--- a/tez-ui2/src/main/webapp/package.json
+++ b/tez-ui2/src/main/webapp/package.json
@@ -9,10 +9,12 @@
     "test": "tests"
   },
   "scripts": {
-    "build": "ember build",
-    "start": "ember server",
-    "test": "ember test",
-    "postinstall": "./node_modules/bower/bin/bower install"
+    "build": "TMPDIR=tmp node ./node_modules/ember-cli/bin/ember build",
+    "start": "TMPDIR=tmp node ./node_modules/ember-cli/bin/ember server",
+    "test": "TMPDIR=tmp node ./node_modules/ember-cli/bin/ember test",
+
+    "build:mvn": "TMPDIR=tmp node/node ./node_modules/ember-cli/bin/ember build -prod",
+    "test:mvn": "TMPDIR=tmp node/node ./node_modules/ember-cli/bin/ember test"
   },
   "repository": {
     "type": "git",
@@ -34,7 +36,6 @@
     "ember-cli-content-security-policy": "0.4.0",
     "ember-cli-d3": "1.1.2",
     "ember-cli-dependency-checker": "1.2.0",
-    "ember-cli-font-awesome": "1.4.0",
     "ember-cli-htmlbars": "1.0.2",
     "ember-cli-htmlbars-inline-precompile": "0.3.1",
     "ember-cli-inject-live-reload": "1.4.0",


Mime
View raw message