2019-03-24 08:12:15 UTC - Michele Sciabarra: I did a simple thing: I extracted the test from the source and I tried to invoke it https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553415135311600 ---- 2019-03-24 08:12:22 UTC - Michele Sciabarra: it works: https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553415142311800 ---- 2019-03-24 08:12:47 UTC - Michele Sciabarra: ``` $ invoke run '{"delimiter": "❄"}' {"winter":"❄ ☃ ❄"}
``` https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553415167312100 ---- 2019-03-24 08:12:59 UTC - Michele Sciabarra: however I see there are 2 newlines... https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553415179312500 ---- 2019-03-24 08:15:36 UTC - Michele Sciabarra: however there is something odd in the handling of the encoding https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553415336313000 ---- 2019-03-24 08:15:53 UTC - Michele Sciabarra: if I deploy the <http://echo.rs|echo.rs> I see this: https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553415353313400 ---- 2019-03-24 08:16:03 UTC - Michele Sciabarra: ``` $ invoke run '{"delimiter": "❄"}' {"delimiter":"â�„"} ``` https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553415363313700 ---- 2019-03-24 08:19:13 UTC - Michele Sciabarra: I think the problem it receives the snowflake wrong https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553415553314300 ---- 2019-03-24 10:08:48 UTC - Roberto Diaz: it is curious https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553422128314600 ---- 2019-03-24 10:09:40 UTC - Michele Sciabarra: I think I found the core problem https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553422180315300 ---- 2019-03-24 10:10:32 UTC - Roberto Diaz: it could be the 2 newlines and for that reason in scala it tries to assert against "" https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553422232315500 ---- 2019-03-24 10:13:28 UTC - Michele Sciabarra: they are actually 2... or maybe 3 https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553422408315900 ---- 2019-03-24 10:13:47 UTC - Michele Sciabarra: first, in the test you have to output something in the log https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553422427316400 ---- 2019-03-24 10:14:18 UTC - Michele Sciabarra: second, in the image the default encoding is not UTF-8 https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553422458317000 ---- 2019-03-24 10:15:00 UTC - Michele Sciabarra: it has nothing to do with scala https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553422500317400 ---- 2019-03-24 10:20:17 UTC - Michele Sciabarra: for the first problem I fixed the source code https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553422817317800 ---- 2019-03-24 10:29:07 UTC - Michele Sciabarra: Here you go! https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553423347318000 ---- 2019-03-24 10:30:39 UTC - Michele Sciabarra: fix number one: add this to the Dockerfile https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553423439318500 ---- 2019-03-24 10:30:49 UTC - Michele Sciabarra: ENV PYTHONIOENCODING=utf8 https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553423449318700 ---- 2019-03-24 10:31:12 UTC - Michele Sciabarra: fix number 2: add a log command to the example (and leave the snowman in unicode): https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553423472319300 ---- 2019-03-24 10:31:50 UTC - Michele Sciabarra: ``` override val testUnicode = TestConfig( raw"""|extern crate serde_json; |use serde_derive::{Deserialize, Serialize}; |use serde_json::{Error, Value}; |#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] |struct Input { | delimiter: String, |} |#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] |struct Output { | winter: String, |} |pub fn main(args: Value) -> Result<Value, Error> { | let input: Input = serde_json::from_value(args)?; | let msg = format!("{} {} {}", input.delimiter,'☃',input.delimiter); | println!("{}", msg); | let output = Output { | winter: msg, | }; | serde_json::to_value(output) |} """.stripMargin) ```` https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553423510319600 ---- 2019-03-24 10:36:57 UTC - Roberto Diaz: Awesome!!!! Thanks!! :tada: :tada: https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553423817320000 ---- 2019-03-24 10:37:18 UTC - Michele Sciabarra: submit your changes so I can test and approve the PR https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553423838320300 ---- 2019-03-24 10:46:45 UTC - Roberto Diaz: submitted <https://github.com/apache/incubator-openwhisk-runtime-rust/pull/7> https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553424405320900 ---- 2019-03-24 10:47:05 UTC - Roberto Diaz: one question where is the scancode.sh script? https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553424425321400?thread_ts=1553424425.321400&cid=C3UDXSFA6 ---- 2019-03-24 12:00:18 UTC - Carlos Santana: Your looking for this ? <https://github.com/apache/incubator-openwhisk-runtime-go/blob/master/tools/travis/scan.sh> https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553428818321800?thread_ts=1553424425.321400&cid=C3UDXSFA6 ---- 2019-03-24 12:49:09 UTC - Roberto Diaz: yes thanks!! +1 : Carlos Santana https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553431749322000?thread_ts=1553424425.321400&cid=C3UDXSFA6 ---- 2019-03-24 13:45:19 UTC - Michele Sciabarra: Merged! tada : Roberto Diaz, Carlos Santana https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553435119322400 ---- 2019-03-24 13:46:00 UTC - Michele Sciabarra: Now the .travis builds... and the rest (writing some documentation, integrating in the main OpenWhisk)... https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553435160323300 ---- 2019-03-24 22:38:45 UTC - Jin Choi: I have another question for the situation where you deploy newer components on IBM Cloud Functions. I heard the team doesn't use Ansible anymore and now use k8s and Jenkins. And I also heard you guys utilize various SaaS alternatives for Kafka, APIGateway, etc. Let's assume that most of the time you only need to update the invokers for IBM Cloud Functions. Even so, updating invokers with other deployment strategies than BLUE-GREEN method seem to result in session loss which might cause serious problems for the clients. With the current Openwhisk source code, whether I deploy Openwhisk on bare metals or on a k8s cluster, the one and only best deployment strategy is BLUE-GREEN when I care about reliability and availability, I think. Am I missing something? How do you do it when deploying on IBM Cloud Functions? Let's focus on the invokers component and let's assume we have steady invocation requests for all invokers via Kafka. https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553467125323600?thread_ts=1552538981.141300&cid=C3UDXSFA6 ---- 2019-03-24 22:59:07 UTC - Carlos Santana: We use blue-green but today could be improved in the future to do rolling updates. blush : Jin Choi https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553468347324700?thread_ts=1552538981.141300&cid=C3UDXSFA6 ---- 2019-03-24 23:17:37 UTC - Jin Choi: Sounds clear. Thank you +1 : Carlos Santana https://openwhisk-team.slack.com/archives/C3UDXSFA6/p1553469457325000?thread_ts=1552538981.141300&cid=C3UDXSFA6 ----