Skip to content

Update Yoda Executor on Google Cloud Function Gen2

Kitipong Sirirueangsakul edited this page Sep 16, 2025 · 3 revisions

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 Source tab on Cloud Function.

image

Next, click Edit source, then

  • Update base image to python 3.13 (Ubuntu 22 Full)
  • Update main.py, requirements.txt by using new version of runtime.
image

Then, click Save and redeploy

Step 2: Test the Function

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.5"
}
Clone this wiki locally