openwhisk icon indicating copy to clipboard operation
openwhisk copied to clipboard

./gradlew :core:controller:compileScala is not working

Open alibanaei opened this issue 7 years ago • 11 comments

I have installed openwhisk on local vm on ubuntu 14.04, then I want to change the source code and build it. I have changed the "BasicAuthenticationDirective.scala" and run "./gradlew :core:controller:compileScala" is working but nothing changed even the logs I've also used "./gradlew distDocker" but it had this result, too

How can I inject a code in openwhisk and compile it? Does it need specific compiler?

Task :core:controller:compileScala Build cache key for task ':core:controller:compileScala' is 62562ee7d4d6228633cecae8af043865 Task ':core:controller:compileScala' is not up-to-date because: Input property 'source' file /home/ubuntu/whisk/core/controller/src/main/scala/org/apache/openwhisk/core/controller/BasicAuthenticationDirective.scala has changed. Starting process 'Gradle Worker Daemon 10'. Working directory: /root/.gradle/workers Command: /usr/lib/jvm/java-8-openjdk-amd64/bin/java -Djava.security.manager=worker.org.gradle.process.internal.worker.child.BootstrapSecurityManager -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -cp /root/.gradle/caches/4.8.1/workerMain/gradle-worker.jar worker.org.gradle.process.internal.worker.GradleWorkerMain 'Gradle Worker Daemon 10' Successfully started process 'Gradle Worker Daemon 10' Started Gradle worker daemon (0.575 secs) with fork options DaemonForkOptions{executable=/usr/lib/jvm/java-8-openjdk-amd64/bin/java, minHeapSize=null, maxHeapSize=null, jvmArgs=[], classpath=[/root/.gradle/caches/modules-2/files-2.1/com.typesafe.zinc/zinc/0.3.15/12e1f782684f2702e847faa0994eed4711270687/zinc-0.3.15.jar, /root/.gradle/caches/modules-2/files-2.1/com.typesafe.sbt/incremental-compiler/0.13.15/95e20d00b25a7aae19838009c11578b7e6b258ad/incremental-compiler-0.13.15.jar, /root/.gradle/caches/modules-2/files-2.1/com.typesafe.sbt/compiler-interface/0.13.15/bad996ed4fc3e83b872525e9cd7b80d81b98a324/compiler-interface-0.13.15-sources.jar, /root/.gradle/caches/modules-2/files-2.1/org.scala-lang/scala-compiler/2.10.6/9b15174852f5b6bb1edbf303d5722286a0a54011/scala-compiler-2.10.6.jar, /root/.gradle/caches/modules-2/files-2.1/com.typesafe.sbt/sbt-interface/0.13.15/93fe450d5f5efb111397a34bc1fba0d50368a265/sbt-interface-0.13.15.jar, /root/.gradle/caches/modules-2/files-2.1/org.scala-lang/scala-reflect/2.10.6/3259f3df0f166f017ef5b2d385445808398c316c/scala-reflect-2.10.6.jar, /root/.gradle/caches/modules-2/files-2.1/org.scala-lang/scala-library/2.10.6/421989aa8f95a05a4f894630aad96b8c7b828732/scala-library-2.10.6.jar], keepAliveMode=SESSION}. Compiling with Zinc Scala compiler. Initialized Zinc Scala compiler: 0.938 secs Prepared Zinc Scala inputs: 1.749 secs Compiling 1 Scala source to /home/ubuntu/whisk/core/controller/build/classes/scala/main... Completed Scala compilation: 11.836 secs :core:controller:compileScala (Thread[Task worker for ':',5,main]) completed. Took 12.75 secs.

BUILD SUCCESSFUL in 13s

alibanaei avatar Dec 17 '18 15:12 alibanaei

Did you redeploy the container for the controller? There’s a helper script in bin/wskdev to rebuild and redeploy a new controller: wskdev controller

Use it with -n to see the commands it runs if you’re curious.

rabbah avatar Dec 17 '18 16:12 rabbah

Thanks but it was failed

TASK [controller : (re)start controller] ****************************************************************************************************************************************************************************************
Wednesday 19 December 2018  07:50:59 +0000 (0:00:00.224)       0:00:07.781 ****
fatal: [controller0]: FAILED! => {"changed": false, "msg": "Error removing container 04b14fdfac34c501e6ac6601e178490b195b58923e5d8a4b03b44b867fa86f53: 500 Server Error: Internal Server Error (\"Unable to remove filesystem for 04b14fdfac34c501e6ac6601e178490b195b58923e5d8a4b03b44b867fa86f53: remove /var/lib/docker/containers/04b14fdfac34c501e6ac6601e178490b195b58923e5d8a4b03b44b867fa86f53/shm: device or resource busy\")"}

Error removing container
04b14fdfac34c501e6ac6601e178490b195b58923e5d8a4b03b44b867fa86f53: 500 Server
Error: Internal Server Error ("Unable to remove filesystem for
04b14fdfac34c501e6ac6601e178490b195b58923e5d8a4b03b44b867fa86f53: remove /var/li
b/docker/containers/04b14fdfac34c501e6ac6601e178490b195b58923e5d8a4b03b44b867fa8
6f53/shm: device or resource busy")

alibanaei avatar Dec 19 '18 14:12 alibanaei

looks like a tied us resource - are you using vagrant? try a reboot - docker is acting up form a quick assessment.

rabbah avatar Dec 19 '18 14:12 rabbah

Thank you very much, it's worked do you know any resources for working with wsk, wskdev, wskadmin ? I think openwhisk does not have enough resource or I couldn't find

alibanaei avatar Dec 20 '18 10:12 alibanaei

wskdev is also known as redo and documented here: https://github.com/apache/incubator-openwhisk/tree/master/tools/build

wskadmin is documented here https://github.com/apache/incubator-openwhisk/tree/master/tools/admin

Learning to work with wsk is documented here https://github.com/apache/incubator-openwhisk/blob/master/docs/cli.md

@alibanaei we're welcoming of all pull requests and especially ones that make openwhisk easier to use if you have suggestions.

@chetanmeh @csantanapr perhaps we should rename redo to wskdev so there's only one name, and add links to these tooks from the main readme - what do you think about making these tools easier to discover?

rabbah avatar Dec 20 '18 12:12 rabbah

@rabbah Glad to hear finally you came around I wanted to redo to be name wskdev since day one :-)

csantanapr avatar Dec 20 '18 12:12 csantanapr

i think i learned now that you're (edit: most) always right!

rabbah avatar Dec 20 '18 12:12 rabbah

Not always right, Now I regret that we don’t have a single simple mono repo :-(

csantanapr avatar Dec 20 '18 13:12 csantanapr

😂 OK I'll open a PR to rename redo, and you open a PR to merge all the repos back?

rabbah avatar Dec 20 '18 13:12 rabbah

perhaps we should rename redo to wskdev so there's only one name

+1 This aspect is very much confusing. So lets name it wskdev and have the help docs refer it that as such

chetanmeh avatar Dec 21 '18 03:12 chetanmeh

Thank you so much for your favor. I'm going to make a pull request after learning it. @rabbah

alibanaei avatar Dec 22 '18 07:12 alibanaei