mrutkows commented on issue #306: Implicit Runtime for Java is set to nodejs:default URL: https://github.com/apache/incubator-openwhisk-wskdeploy/issues/306#issuecomment-322495785 @daisy-ycguo @lzbj In addition, the code should support named versions of runtimes (not just ":default"). For example, in the "triggerrule" use case, we have ``` actions: greeting: version: 1.0 location: src/greeting.js runtime: nodejs:6 ``` which fails with the following error: ``` 2017/08/15 09:58:28 error happened during unmarshal :yaml: line 9: did not find expected key 2017/08/15 09:58:28 yaml: line 9: did not find expected key ``` since the value "nodejs:6" was not recognized. We SHOULD likely have a **global constant array** of known (supported) runtimes "kinds" (both default and versioned) and NOT use a ```switch``` statement. This list should match what the CLI returns (as this function was added in March via https://github.com/apache/incubator-openwhisk/issues/335). for example: ``` var SUPPORTED_RUNTIMES = [...]string { "python", "java", "swift", "nodejs" } ``` We SHOULD also do the following: 1) verify the kind (if it has one) a valid extension ":default" as part if the string OR 2) verify it has a valid version number, for example ":6" or ":3" 3) Notify user with a specific error saying "Specified runtime (kind) is not recognized as being valid" along with the line number in the manifest where this was parsed. 4) Allow simple "java" as a value and assume we default to "latest", that is we treat it like "java:default" instead. 5) if the user specifies a valid kind ```runtime:nodejs:4``` but the version is not recognized we should look to interactively prompt the user asking if they want to continue with the latest "default" for that runtime kind (**PLEASE OPEN A NEW ISSUE FOR THIS INTERACTIVE MODE**). and if we do not find a runtime key at all in the manifest we should of course still "default" to "nodejs:default", BUT WE SHOULD PRESENT A WARNING in the output to the user. ---------------------------------------------------------------- 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: [email protected]
With regards, Apache Git Services
