-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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? NO
- Loading branch information
Showing
2 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters