[ 
https://issues.apache.org/jira/browse/AURORA-1951?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16182966#comment-16182966
 ] 

David McLaughlin commented on AURORA-1951:
------------------------------------------

The issue is npm is not installed correctly by the plugin. Example:

{noformat}
> Task :ui:lint
10:20:09.510 [DEBUG] 
[org.gradle.internal.progress.DefaultBuildOperationExecutor] Build operation 
'Task :ui:lint' started
10:20:09.511 [DEBUG] 
[org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] 
Starting to execute task ':ui:lint'
10:20:09.511 [INFO] 
[org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter] 
Putting task artifact state for task ':ui:lint' into context took 0.0 secs.
10:20:09.815 [DEBUG] 
[org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter] Determining 
if task ':ui:lint' is up-to-date
10:20:09.815 [DEBUG] 
[org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository]
 Implementation for task ':ui:lint': 
com.moowork.gradle.node.npm.NpmTask_Decorated@74f98f3cd3753af7eb61d0f02b79cb90
10:20:09.815 [DEBUG] 
[org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository]
 Action implementations for task ':ui:lint': 
[com.moowork.gradle.node.npm.NpmTask_Decorated@74f98f3cd3753af7eb61d0f02b79cb90]
10:20:10.083 [DEBUG] 
[org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository]
 Snapshotting property $1 (ABSOLUTE) for task ':ui:lint'
10:20:10.084 [DEBUG] 
[org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository]
 Snapshotting property <unnamed> for task ':ui:lint'
10:20:10.367 [DEBUG] 
[org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository]
 No discovered inputs for task ':ui:lint'
10:20:10.367 [INFO] 
[org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter] Executing 
task ':ui:lint' (up-to-date check took 0.552 secs) due to:
  Executed with '--rerun-tasks'.
10:20:10.367 [DEBUG] 
[org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter] Executing 
actions for task ':ui:lint'.
10:20:10.367 [DEBUG] 
[org.gradle.internal.progress.DefaultBuildOperationExecutor] Build operation 
'Execute exec for :ui:lint' started
10:20:10.368 [INFO] [org.gradle.process.internal.DefaultExecHandle] Starting 
process 'command 
'/Users/dmclaughlin/t/apache-aurora/ui/.gradle/nodejs/node-v6.9.1-darwin-x64/bin/npm''.
 Working directory: /Users/dmclaughlin/t/apache-aurora/ui Command: 
/Users/dmclaughlin/t/apache-aurora/ui/.gradle/nodejs/node-v6.9.1-darwin-x64/bin/npm
 run lint
10:20:10.368 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] 
Environment for process 'command 
'/Users/dmclaughlin/t/apache-aurora/ui/.gradle/nodejs/node-v6.9.1-darwin-x64/bin/npm'':
 
{PATH=/Users/dmclaughlin/t/apache-aurora/ui/.gradle/nodejs/node-v6.9.1-darwin-x64/bin:/Users/dmclaughlin/t/apache-aurora/ui/.gradle/nodejs/node-v6.9.1-darwin-x64/bin:/opt/twitter_mde/bin:/opt/twitter_mde/homebrew_minimal/mde_bin:/opt/twitter_mde/homebrew/mde_bin:/Users/dmclaughlin/Downloads/google-cloud-sdk/bin:/Users/dmclaughlin/.rbenv/shims:/Users/dmclaughlin/.tools-cache/home/aurora/tools/dottools/bin:/Users/dmclaughlin/.tools-cache/home/packer/tools/package/bin:/Users/dmclaughlin/.tools-cache/home/packer/tools/packer/bin:/Users/dmclaughlin/.tools-cache/home/devprod/release/tools/jira/bin:/Users/dmclaughlin/.tools-cache/home/devprod/tools/source/git.Darwin.x86_64/bin:/Users/dmclaughlin/.tools-cache/home/aurora/tools/vert/bin:/Users/dmclaughlin/.tools-cache/home/aurora/tools/admin/bin:/Users/dmclaughlin/.tools-cache/home/aurora/tools/client-beta/bin:/Users/dmclaughlin/.rbenv/bin:/Users/dmclaughlin/Downloads/scala-2.10.0/bin:/usr/local/bin:/Users/dmclaughlin/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin:/opt/twitter_mde/data/node/bin:/Users/dmclaughlin/.npm-global/bin,
 APP_NAME_99716=Gradle, BROWSER=open, 
MANPATH=/Users/dmclaughlin/.tools-cache/home/devprod/tools/source/git.Darwin.x86_64/man:,
 WORKON_HOME=/Users/dmclaughlin/.virtualenvs, 
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home, 
CLICOLORS=1, TERM=xterm-256color, RBENV_SHELL=bash, LANG=en_US.UTF-8, 
GIT_HTTP_NO_SELF=1, 
APP_ICON_99716=/Users/dmclaughlin/t/apache-aurora/media/gradle.icns, 
MAVEN_OPTS=-Xmx1024m -XX:MaxPermSize=128m, 
VIRTUALENVWRAPPER_SCRIPT=/usr/local/bin/virtualenvwrapper.sh, 
VIRTUALENVWRAPPER_WORKON_CD=1, 
JAVA_MAIN_CLASS_99716=org.gradle.wrapper.GradleWrapperMain, 
LOGNAME=dmclaughlin, TERM_PROGRAM_VERSION=388.1.1, 
PWD=/Users/dmclaughlin/t/apache-aurora, XPC_SERVICE_NAME=0, 
NODE_PATH=/usr/local/lib/node_modules/:, SHELL=/bin/bash, 
TERM_PROGRAM=Apple_Terminal, OLDPWD=/Users/dmclaughlin/t/apache-aurora, 
SECURITYSESSIONID=186a6, USER=dmclaughlin, 
VIRTUALENVWRAPPER_HOOK_DIR=/Users/dmclaughlin/.virtualenvs, 
TMPDIR=/var/folders/53/wmq5ny7x1kq0jmsvskd5r9xw0000gn/T/, 
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.cCNJxshqrr/Listeners, 
EDITOR=/usr/bin/vim, XPC_FLAGS=0x0, 
VIRTUALENVWRAPPER_PROJECT_FILENAME=.project, 
TERM_SESSION_ID=4254FDDB-4E5B-473F-84B7-16E8B6B4C48A, 
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0, 
PROJECT_HOME=/Users/dmclaughlin/t/python, 
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.6wQmEYk6N3/Render, 
SHLVL=1, HOME=/Users/dmclaughlin}
10:20:10.368 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing 
state to: STARTING
10:20:10.368 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Waiting 
until process started: command 
'/Users/dmclaughlin/t/apache-aurora/ui/.gradle/nodejs/node-v6.9.1-darwin-x64/bin/npm'.
10:20:10.372 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing 
state to: STARTED
10:20:10.372 [INFO] [org.gradle.process.internal.DefaultExecHandle] 
Successfully started process 'command 
'/Users/dmclaughlin/t/apache-aurora/ui/.gradle/nodejs/node-v6.9.1-darwin-x64/bin/npm''
10:20:10.372 [DEBUG] [org.gradle.process.internal.ExecHandleRunner] waiting 
until streams are handled...
10:20:10.375 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing 
state to: SUCCEEDED
10:20:10.375 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Process 
'command 
'/Users/dmclaughlin/t/apache-aurora/ui/.gradle/nodejs/node-v6.9.1-darwin-x64/bin/npm''
 finished with exit value 0 (state: SUCCEEDED)
10:20:10.375 [DEBUG] 
[org.gradle.internal.progress.DefaultBuildOperationExecutor] Completing Build 
operation 'Execute exec for :ui:lint'
{noformat}

Tracing the behavior:

{noformat}
$ 
/Users/dmclaughlin/t/apache-aurora/ui/.gradle/nodejs/node-v6.9.1-darwin-x64/bin/npm
 run lint
$ 
{noformat}

So npm is not showing any output, which differs from the npm on my laptop. 
Tracing further:

{noformat}
$ ls -al 
/Users/dmclaughlin/t/apache-aurora/ui/.gradle/nodejs/node-v6.9.1-darwin-x64/bin
total 59520
drwxr-xr-x  4 dmclaughlin  staff       136 Sep 27 10:20 .
drwxr-xr-x  9 dmclaughlin  staff       306 Aug 24 16:41 ..
-rwxr-xr-x  1 dmclaughlin  staff  30468336 Sep 27 10:20 node
lrwxr-xr-x  1 dmclaughlin  staff       111 Sep 27 10:20 npm -> 
/Users/dmclaughlin/t/apache-aurora/ui/.gradle/nodejs/node-v6.9.1-darwin-x64/lib/node_modules/npm/bin/npm-cli.js
{noformat}

The symlink is pointing to an empty file:

{noformat}
$ ls -al 
/Users/dmclaughlin/t/apache-aurora/ui/.gradle/nodejs/node-v6.9.1-darwin-x64/lib/node_modules/npm/bin
total 24
drwxr-xr-x   7 dmclaughlin  staff  238 Aug 24 16:41 .
drwxr-xr-x  25 dmclaughlin  staff  850 Aug 24 16:41 ..
drwxr-xr-x   4 dmclaughlin  staff  136 Aug 24 16:41 node-gyp-bin
-rwxr-xr-x   1 dmclaughlin  staff  833 Sep 27 10:20 npm
-rwxr-xr-x   1 dmclaughlin  staff    0 Sep 27 10:20 npm-cli.js
-rw-r--r--   1 dmclaughlin  staff  464 Sep 27 10:20 npm.cmd
-rwxr-xr-x   1 dmclaughlin  staff  513 Sep 27 10:20 read-package-json.js
{noformat}

I will try git clean and rerunning in case it's a local environment issue.



> UI build broken in gradle 4.2
> -----------------------------
>
>                 Key: AURORA-1951
>                 URL: https://issues.apache.org/jira/browse/AURORA-1951
>             Project: Aurora
>          Issue Type: Task
>            Reporter: David McLaughlin
>            Assignee: Bill Farner
>
> The recent upgrade to gradle 4.2 has broken the previously working ui build. 
> It was a bit of a nightmare for me to get this working originally and 
> unfortunately I don't have the bandwidth to bisect the changelog to see what 
> they've changed. 
> Here is the symptom of a false positive result:
> {noformat}
> $ ./gradlew --rerun-tasks ui:lint
> BUILD SUCCESSFUL in 8s
> 3 actionable tasks: 3 executed
> apache-aurora$ cd ui
> ui$ 
> ui$ npm run lint
> > apache-aurora@1.0.0 lint /Users/dmclaughlin/t/apache-aurora/ui
> > eslint src/main/js --ext .js
> /Users/dmclaughlin/t/apache-aurora/ui/src/main/js/components/Icon.js
>   3:7  error  'test' is assigned a value but never used  no-unused-vars
> ✖ 1 problem (1 error, 0 warnings)
> {noformat}
> I'm not totally sure which version of Gradle causes the regression.
> I also saw issues with changing files and Gradle still considering the task 
> UP-TO-DATE. This would cause false positives in other ways and general make 
> it unpleasant to work in the UI. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to