Description
Steps to reproduce (step by step instructions, with links, commands and necessary data to reproduce the error)
Here is a test function call. DO NOT RUN IT ON BETA CLUSTER OR IN CI:
{
"Z1K1": "Z7",
"Z7K1": {
"Z1K1": "Z8",
"Z8K1": [
"Z17",
{
"Z1K1": "Z17",
"Z17K1": "Z8",
"Z17K2": "Z10043K1",
"Z17K3": {
"Z1K1": "Z12",
"Z12K1": [
"Z11"
]
}
}
],
"Z8K2": "Z1",
"Z8K3": [
"Z20"
],
"Z8K4": [
"Z14",
{
"Z1K1": "Z14",
"Z14K1": "Z10043",
"Z14K2": {
"Z1K1": "Z7",
"Z7K1": {
"Z1K1": "Z18",
"Z18K1": "Z10043K1"
},
"K1": {
"Z1K1": "Z18",
"Z18K1": "Z10043K1"
}
}
}
],
"Z8K5": "Z10043"
},
"Z10043K1": {
"Z1K1": "Z8",
"Z8K1": [
"Z17",
{
"Z1K1": "Z17",
"Z17K1": "Z8",
"Z17K2": "Z10044K1",
"Z17K3": {
"Z1K1": "Z12",
"Z12K1": [
"Z11"
]
}
}
],
"Z8K2": "Z1",
"Z8K3": [
"Z20"
],
"Z8K4": [
"Z14",
{
"Z1K1": "Z14",
"Z14K1": "Z10044",
"Z14K2": {
"Z1K1": "Z7",
"Z7K1": {
"Z1K1": "Z18",
"Z18K1": "Z10044K1"
},
"K1": {
"Z1K1": "Z18",
"Z18K1": "Z10044K1"
}
}
}
],
"Z8K5": "Z10044"
}
}This is similar to the following self-recursive Python code:
(lambda function(function))(lambda function(function))
SO:
- in function-orchestrator:src/frame.js::Frame::constructor(), add this.size_ the number of frames (i.e., this.size_ = this.lastFrame_ === null ? 0 : this.lastFrame_.size_ + 1)
- add console.log(this.size_)
- spin up a local development environment
- run the above self-recursive code IN THE LOCAL DEVELOPMENT ENVIRONMENT
Observed behavior
- your environment will blow up
- the function-orchestrator logs will show that the stack size did not grow unbounded but remain around 0/1
- this is probably because the new scopes are not being attached properly
- probably, when the Z7 compositions are executed as functions, their Z7K1 Functions keep the enclosing scope, rather than the new scope
Expected behavior/Acceptance criteria (returned value, expected error, performance expectations, etc.)
- the stack size should have grown!
Completion checklist
- Before closing this task, review one by one the checklist available here: https://www.mediawiki.org/wiki/Abstract_Wikipedia_team/Definition_of_Done#Back-end_Task/Bug_completion_checklist