You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by gi...@git.apache.org on 2017/06/01 20:02:15 UTC

[GitHub] pritidesai commented on a change in pull request #275: Fixing zip action creation

pritidesai commented on a change in pull request #275: Fixing zip action creation
URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/275#discussion_r119714745
 
 

 ##########
 File path: parsers/manifest_parser.go
 ##########
 @@ -262,6 +257,15 @@ func (dm *YAMLParser) ComposeActions(mani *ManifestYAML, manipath string) (ar []
 				}
 
 				wskaction.Exec.Kind = kind
+
+				action.Location = filePath
+				dat, err := utils.Read(filePath)
+				utils.Check(err)
+				code := string(dat)
+                		if ext == ".zip" || ext == ".jar" {
 
 Review comment:
   I tested JAR with HelloWorld application from [here](https://console.ng.bluemix.net/docs/openwhisk/openwhisk_actions.html#openwhisk_actions_java). We do not have support for this application. wskdeploy fails with:
   
   ```
   Response body received:
   {
     "error": "The request content was malformed:\n'main' must be a string defined in 'exec' for 'java' actions",
     "code": 4001042
   }
   ``` 
   
   For actions in Java runtime, wsk CLI supports "--main" param which (I assume) might not be supported in wskdeploy. While creating an action from the jar file where main is inside of a class, we have to specify the class name which contains main function.
   
   ```
   wsk action create helloJava hello.jar --main Hello
   ``` 
   
   I am using this manifest file:
   
   ```
   package:
       name: helloworldjar
       actions:
           helloworld:
               location: src/hello.jar
               runtime: java
               main: Hello
   ```
   
   I am creating separate issue to address JAR failure.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services