Update Yoda Executor on Google Cloud Function - vchong/data-source-runtime GitHub Wiki

When there is new release of Yoda Executor, it is possible to modify existing Google Cloud Function and update its source code. Here is the steps to update it.

Step 1: Edit the Function

This can be done by clicking Edit on Cloud Function.


Make sure that MAX_EXECUTABLE is set to 8192 and MAX_DATA_SIZE is set to 512. Then, click Next to go to "code" step.


Next, click Source code drop down, confirm Python 3.9, and click ZIP Upload. The new version of ZIP file can be found here.

Finally, test your endpoint

curl --location --request POST '<your_trigger_url>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "executable": "IyEvdXNyL2Jpbi9lbnYgcHl0aG9uMwoKaW1wb3J0IHN5cwoKZGVmIG1haW4oZGF0YSk6CiAgICByZXR1cm4gZGF0YQoKCmlmIF9fbmFtZV9fID09ICJfX21haW5fXyI6CiAgICB0cnk6CiAgICAgICAgcHJpbnQobWFpbigqc3lzLmFyZ3ZbMTpdKSkKICAgIGV4Y2VwdCBFeGNlcHRpb24gYXMgZToKICAgICAgICBwcmludChzdHIoZSksIGZpbGU9c3lzLnN0ZGVycikKICAgICAgICBzeXMuZXhpdCgxKQo=",
    "calldata": "\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages.\"",
    "timeout": 3000
}'

The expected result should be

{
    "err": "",
    "returncode": 0,
    "stderr": "",
    "stdout": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages.\n",
    "version": "google-cloud-function:2.0.3"
}

Finally, click Deploy, and that's it. That was easy!