2019-03-22 00:06:47 UTC - Roberto Diaz: @Michele Sciabarra here is a WIP for the tests, it would be nice help for your side because I have no idea how to run the tests locally :sweat_smile: <https://github.com/apache/incubator-openwhisk-runtime-rust/pull/7> https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553213207227700 ---- 2019-03-22 07:35:20 UTC - Michele Sciabarra: @Roberto Diaz I collected the stuff from other runtimes with the purpose of facilitate writing also the tests https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553240120227900 ---- 2019-03-22 07:37:19 UTC - Michele Sciabarra: tests can be run with ./gradlew test https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553240239228600?thread_ts=1553240239.228600&cid=C3UDXSFA6 ---- 2019-03-22 07:37:26 UTC - Michele Sciabarra: should be https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553240246228800 ---- 2019-03-22 07:37:37 UTC - Michele Sciabarra: normally I use intellij for reviewing https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553240257229100 ---- 2019-03-22 08:50:46 UTC - Michele Sciabarra: @Roberto Diaz I passed all the tests except 2 https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553244646230100 ---- 2019-03-22 09:08:58 UTC - Roberto Diaz: Which tests? https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553245738230600 ---- 2019-03-22 09:44:10 UTC - Michele Sciabarra: testUnicode and testNotReturningJson https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553247850231000 ---- 2019-03-22 09:44:24 UTC - Michele Sciabarra: check my notes to the PR and see by yourself https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553247864231400 ---- 2019-03-22 09:45:35 UTC - Michele Sciabarra: not sure about the unicode in rust, the other test can either be commented out or you need to fix the actionloop to pass the not-an-object returned values back to the proxy https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553247935232500 ---- 2019-03-22 09:50:15 UTC - Roberto Diaz: awesome! I have seen that in the unicode test the snowman has spaces between it and the delimiter https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553248215233700 ---- 2019-03-22 09:50:38 UTC - Roberto Diaz: I'm going to apply your changes and update the branch in a bit https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553248238234500 ---- 2019-03-22 09:50:47 UTC - Michele Sciabarra: yes this is a problem but not only the one https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553248247234800 ---- 2019-03-22 09:51:21 UTC - Michele Sciabarra: ``` diff --git a/settings.gradle b/settings.gradle index 0bbce17..7b7d4f5 100755 --- a/settings.gradle +++ b/settings.gradle @@ -16,7 +16,7 @@ */ include 'tests' -include 'python3.7' +include 'rust1.32' rootProject.name = 'runtime-actionlooop' diff --git a/tests/src/test/scala/runtime/actionContainers/ActionLoopPythonBasicTests.scala b/tests/src/test/scala/runtime/actionContainers/ActionLoopPythonBasicTests.scala index 818c925..30080e9 100755 --- a/tests/src/test/scala/runtime/actionContainers/ActionLoopPythonBasicTests.scala +++ b/tests/src/test/scala/runtime/actionContainers/ActionLoopPythonBasicTests.scala @@ -25,7 +25,7 @@ import org.scalatest.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) class ActionLoopRustBasicTests extends BasicActionRunnerTests with WskActorSystem { - val image = "actionloop-rust-v1.22" + val image = "actionloop-rust-v1.23" override def withActionContainer(env: Map[String, String] = Map.empty)( code: ActionContainer => Unit) = { @@ -40,7 +40,9 @@ class ActionLoopRustBasicTests extends BasicActionRunnerTests with WskActorSyste override val testNoSourceOrExec = TestConfig("") - override val testNotReturningJson = + override val testNotReturningJson = TestConfig("", skipTest = true) + + /*override val testNotReturningJson = TestConfig("""|extern crate serde_json; |use serde_derive::{Deserialize, Serialize}; |use serde_json::{Error, Value}; @@ -60,6 +62,7 @@ class ActionLoopRustBasicTests extends BasicActionRunnerTests with WskActorSyste | serde_json::from_str("not valid json") |} """.stripMargin) + */ override val testEcho = TestConfig("""|extern crate serde_json; @@ -86,7 +89,7 @@ class ActionLoopRustBasicTests extends BasicActionRunnerTests with WskActorSyste |pub fn main(args: Value) -> Result<Value, Error> { | let input: Input = serde_json::from_value(args)?; | let output = Output { - | winter: format!("{}{}{}", input.delimiter,"\u{2603}",input.delimiter), + | winter: format!("{}{}{}", input.delimiter," ☃ ",input.delimiter), | }; | serde_json::to_value(output) |} ``` https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553248281235000 ---- 2019-03-22 09:54:04 UTC - Roberto Diaz: I tried to do it but I got an error related with a missing maven artifact `openwhisk-tests-1.0.0-SNAPSHOT.pom` https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553248444235500?thread_ts=1553240239.228600&cid=C3UDXSFA6 ---- 2019-03-22 10:05:13 UTC - Roberto Diaz: @Michele Sciabarra I have seen in github that the unicode test is not working after change it, is that happening? https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553249113236800 ---- 2019-03-22 10:05:23 UTC - Roberto Diaz: `winter: format!("{} {} {}", input.delimiter,"\u{2603}",input.delimiter),` https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553249123237000 ---- 2019-03-22 10:05:39 UTC - Michele Sciabarra: yes but my fix does not work either https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553249139237600 ---- 2019-03-22 10:05:45 UTC - Roberto Diaz: in theory \u{2603} is the snowman https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553249145237800 ---- 2019-03-22 10:05:55 UTC - Roberto Diaz: in fact I saw it in console while debugging https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553249155238300 ---- 2019-03-22 10:05:59 UTC - Michele Sciabarra: but the test tests you can embed unicode in sources https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553249159238400 ---- 2019-03-22 10:06:34 UTC - Michele Sciabarra: I do not know if rust sources can be unicode... or not https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553249194238800 ---- 2019-03-22 10:06:57 UTC - Roberto Diaz: as far as I know is using the codes https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553249217239200 ---- 2019-03-22 10:07:43 UTC - Michele Sciabarra: and producing an unicode output with the snowman expandend? https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553249263239700 ---- 2019-03-22 10:08:22 UTC - Roberto Diaz: I checked that https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553249302240000 ---- 2019-03-22 10:08:40 UTC - Roberto Diaz: the response in fd3 was the snowman https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553249320240400 ---- 2019-03-22 10:08:55 UTC - Roberto Diaz: even I tried to pass an unicode char as delimiter https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553249335240800 ---- 2019-03-22 10:08:58 UTC - Roberto Diaz: and it also worked https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553249338241100 ---- 2019-03-22 10:09:23 UTC - Michele Sciabarra: well the code does not compile, if I embed the snowman it does not work https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553249363241600 ---- 2019-03-22 10:09:41 UTC - Roberto Diaz: and just simply this https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553249381242200 ---- 2019-03-22 10:09:49 UTC - Roberto Diaz: `winter: format!("{} {} {}", input.delimiter,"\u{2603}",input.delimiter),` https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553249389242600 ---- 2019-03-22 10:10:01 UTC - Roberto Diaz: with spaces between curly braces https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553249401243100 ---- 2019-03-22 10:10:02 UTC - Michele Sciabarra: could work https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553249402243200 ---- 2019-03-22 10:10:03 UTC - Michele Sciabarra: try https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553249403243400 ---- 2019-03-22 10:10:10 UTC - Michele Sciabarra: locally just do https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553249410243700 ---- 2019-03-22 10:10:46 UTC - Michele Sciabarra: ./gradlew distDocker ; ./gradlew test https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553249446244500 ---- 2019-03-22 10:13:08 UTC - Roberto Diaz: both gradle commands failed https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553249588245000 ---- 2019-03-22 10:13:57 UTC - Roberto Diaz: this first one ``` * Where: Script '/Users/rdiaz/Development/incubator-openwhisk-runtime-rust/gradle/docker.gradle' line: 113
* What went wrong: Execution failed for task ':rust1.32:distDocker'. ``` and the second one: ``` Could not find org.apache.openwhisk:openwhisk-tests:1.0.0-SNAPSHOT. ``` https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553249637245700 ---- 2019-03-22 10:14:16 UTC - Michele Sciabarra: yes but.... https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553249656245900 ---- 2019-03-22 10:14:34 UTC - Michele Sciabarra: you are supposed to run the tools/travis/setup.sh first https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553249674246300 ---- 2019-03-22 10:15:00 UTC - Michele Sciabarra: that basically means checking out incubator-openwhisk and run ./gradlew install https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553249700247000 ---- 2019-03-22 10:15:06 UTC - Roberto Diaz: ahh ok https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553249706247100 ---- 2019-03-22 10:15:22 UTC - Roberto Diaz: I'll write a guide about this later https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553249722247800 ---- 2019-03-22 10:15:24 UTC - Michele Sciabarra: eh quirks you learn on the road https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553249724247900 ---- 2019-03-22 10:15:48 UTC - Michele Sciabarra: actually I did not notice it as I have it already in my setup https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553249748248500 ---- 2019-03-22 10:15:57 UTC - Roberto Diaz: awesome! https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553249757248700 ---- 2019-03-22 10:16:04 UTC - Michele Sciabarra: but yes the test code is in the main repo https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553249764249100 ---- 2019-03-22 10:16:14 UTC - Michele Sciabarra: there has been discussion to publish it in maven... https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553249774249400 ---- 2019-03-22 10:31:48 UTC - Michele Sciabarra: add the .travis... and we are done :slightly_smiling_face: Ask @Carlos Santana for the correct one https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553250708250100 ---- 2019-03-22 10:32:20 UTC - Michele Sciabarra: and be ready to have to fix a lot of spacing and add license headers when you run the scancode.sh :slightly_smiling_face: https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553250740250800 ---- 2019-03-22 10:33:36 UTC - Roberto Diaz: I have finished to execute setup.sh https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553250816251100 ---- 2019-03-22 10:33:48 UTC - Roberto Diaz: and nos is executing the docker build https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553250828251400 ---- 2019-03-22 10:34:03 UTC - Michele Sciabarra: ok https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553250843251900 ---- 2019-03-22 10:34:37 UTC - Michele Sciabarra: the .travis will also check the "guidelines conformances" running the scancode.sh https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553250877252600 ---- 2019-03-22 10:35:45 UTC - Roberto Diaz: I have still failing this: ``` Could not find org.apache.openwhisk:openwhisk-tests:1.0.0-SNAPSHOT. ``` https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553250945253400 ---- 2019-03-22 10:35:51 UTC - Roberto Diaz: something missing? https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553250951253600 ---- 2019-03-22 10:36:14 UTC - Michele Sciabarra: it is built and installed by the ./gradlew install https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553250974254100 ---- 2019-03-22 10:36:28 UTC - Michele Sciabarra: of the incubator-openwhisk https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553250988254600 ---- 2019-03-22 10:36:41 UTC - Michele Sciabarra: at least it used to be https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553251001254800 ---- 2019-03-22 10:36:45 UTC - Michele Sciabarra: dunno if it changed https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553251005255000 ---- 2019-03-22 10:40:48 UTC - Roberto Diaz: so I need to checkout `incubator-openwhisk` and build it right, I mean, that is not performed by the `install.sh` https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553251248255700 ---- 2019-03-22 10:51:44 UTC - Michele Sciabarra: read the .travis of any running runtime, for example the go one https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553251904256700 ---- 2019-03-22 10:54:28 UTC - Rodric Rabbah: Did you run gradlew install in the openwhisk directory https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553252068257200?thread_ts=1553252068.257200&cid=C3UDXSFA6 ---- 2019-03-22 10:54:54 UTC - Rodric Rabbah: (sorry didn’t read the entire history) https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553252094257700 ---- 2019-03-22 10:55:04 UTC - Roberto Diaz: this is the key! I have done it and now it seems to be working the tests https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553252104257800?thread_ts=1553252068.257200&cid=C3UDXSFA6 ---- 2019-03-22 10:55:35 UTC - Rodric Rabbah: :+1: it should be easier to run the tests https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553252135258500?thread_ts=1553252068.257200&cid=C3UDXSFA6 ---- 2019-03-22 10:55:55 UTC - Rodric Rabbah: but we haven’t pushed the libraries out to maven so it’s tedious https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553252155259300?thread_ts=1553252068.257200&cid=C3UDXSFA6 ---- 2019-03-22 11:25:28 UTC - Michele Sciabarra: nothing important missed https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553253928259700 ---- 2019-03-22 11:32:05 UTC - Roberto Diaz: @Michele Sciabarra seems that the problem with unicode is related with scala because un rust unicode chars are used in the same way as scala https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553254325260600 ---- 2019-03-22 11:32:25 UTC - Roberto Diaz: so I need to find a way to scape it in the test string https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553254345261100 ---- 2019-03-22 11:33:04 UTC - Michele Sciabarra: \\ ? https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553254384261300 ---- 2019-03-22 11:33:12 UTC - Michele Sciabarra: I tried https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553254392261500 ---- 2019-03-22 11:33:25 UTC - Michele Sciabarra: but probaby I forgot the spaces https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553254405261900 ---- 2019-03-22 11:33:28 UTC - Michele Sciabarra: \\{...} https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553254408262200 ---- 2019-03-22 11:35:07 UTC - Roberto Diaz: using `\\` i got this as test result `Some("❄\\u{2603}❄")` https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553254507262700 ---- 2019-03-22 11:35:19 UTC - Michele Sciabarra: eh https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553254519262900 ---- 2019-03-22 11:35:28 UTC - Michele Sciabarra: omg https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553254528263100 ---- 2019-03-22 11:36:00 UTC - Michele Sciabarra: I have done a few times just adding the snowman in source code https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553254560263500 ---- 2019-03-22 11:40:49 UTC - Michele Sciabarra: try locally https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553254849264900 ---- 2019-03-22 11:40:54 UTC - Roberto Diaz: I have checked the function in rust and it is working directly with the snowman https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553254854265300 ---- 2019-03-22 11:41:11 UTC - Michele Sciabarra: docker run -ti -p 8080:8080 actionloop-rust-v1.23 https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553254871265700 ---- 2019-03-22 11:41:20 UTC - Michele Sciabarra: and use invoke.py https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553254880266000 ---- 2019-03-22 11:41:26 UTC - Michele Sciabarra: invoke.py init <http://sample.rs|sample.rs> https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553254886266300 ---- 2019-03-22 11:42:11 UTC - Michele Sciabarra: so you do not have scala encoding issues https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553254931266600 ---- 2019-03-22 11:55:09 UTC - Roberto Diaz: it is so crazy!!! if I don't add spaces around snowman I get this ``` TestFailedException: Some("❄☃❄") was not equal to Some("❄ ☃ ❄") ``` but if I add spaces around it I get this: ``` TestFailedException: Some("") was not equal to Some("❄ ☃ ❄") ``` https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553255709267500 ---- 2019-03-22 11:59:22 UTC - Michele Sciabarra: hmmm https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553255962267900 ---- 2019-03-22 11:59:32 UTC - Michele Sciabarra: did you try directly? https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553255972268100 ---- 2019-03-22 11:59:41 UTC - Roberto Diaz: I'm on it https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553255981268300 ----