gsc icon indicating copy to clipboard operation
gsc copied to clipboard

Implement namespace separation for all GSC sub-commands gsc build, build-gramine and sign-image.

Open amathew3 opened this issue 1 year ago • 0 comments

In the current implementation in gsc.py, we add all CLI arguments into the environment, which may create conflicting names(variables passed from command line and internal variables used in script). Based on the discussion in PR #144 below solution need to applied across gsc.py.

  • add explicit '--define', '-D' option similar to what we have in gramine-manifest that would accept key=value pairs which are added to globals (and only those); then if you prefer, add e.g. --remove-gramine-deps as an alias for -Dremove_gramine_deps=true;
  • add whole namespace as a single object (env.globals['args'] = args) and use those as {% if args.flag %}. Because that's namespace, there will be a less risk of a collision.

Expected results

All gsc subcommands and options should work as it is.

amathew3 avatar May 22 '23 06:05 amathew3