Commit 2bba1bc
authored
fix: enclave manager passing in deprecated args object (#2342)
## Description
The enclave builder would fail to render packages that used `def
run(plan, args)` where starlark in the package depended on values in
`args` being set. This was because the enclave manager was passing args
to interpretation using via an `args`. The use of `args` dict as sole
input is deprecated.
While it's deprecated we still support it for backwards compatibility
but everything in `args` is dropped - which caused the failure. This PR
fixes it by unpacking the values in `args` so enclave builder passes
them as unpacked `kwargs` to interpretation, as opposed to using the
sole deprecated `args` dict.
I've also added a test to highlight this behavior.
```
def run(plan, args):
all_arg_values = args["arg1"] + ":" + args["arg2"]
return all_arg_values
```
will error when passing input with only `args`
`{"args": {"arg1": "arg1-value", "arg2": "arg2-value"}}`
## Is this change user facing?
NO1 parent 0dca278 commit 2bba1bc
File tree
2 files changed
+34
-1
lines changed- core/server/api_container/server/startosis_engine
- enclave-manager/web/packages/app/src/emui/enclaves/components/enclaveBuilder/nodes
2 files changed
+34
-1
lines changedLines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
163 | 188 | | |
164 | 189 | | |
165 | 190 | | |
| |||
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
43 | 51 | | |
44 | 52 | | |
45 | 53 | | |
| |||
0 commit comments