You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently WorkspaceInit, ProfileInit, and FlowInit are single types.
Implementors may wish to take in init parameters that are relevant to different ItemSpecs, and so each init parameter needs to be able to be mapped to multiple different data types and inserted as resources.
Use cases:
Parameters from the user during CLI usage -- these should be serialized and stored, and deserialized for subsequent commands.
Tests may want to insert params for each item spec -- not necessarily to be serialized, but doesn't hurt if they are.
Options:
Store a TypeMap per workspace / profile / flow, then move the resources across to the CmdContextBuilder resources map.
We need to be able to deserialize parameters from the *_init.yaml files, so taking in arbitrary with_*_init(..) doesn't work.
Still take a single type per workspace / profile / flow, but also take a mapper that maps from that init param type to different data types and inserts them into the resources map.
Also have with_resource(..) methods in CmdContextBuilder for things that don't need to be serialized/deserialized -- saves people from needing to access Resources after building the context and then insert.
The text was updated successfully, but these errors were encountered:
Currently
WorkspaceInit
,ProfileInit
, andFlowInit
are single types.Implementors may wish to take in init parameters that are relevant to different
ItemSpec
s, and so each init parameter needs to be able to be mapped to multiple different data types and inserted as resources.Use cases:
Options:
Store a
TypeMap
per workspace / profile / flow, then move the resources across to theCmdContextBuilder
resources map.We need to be able to deserialize parameters from the
*_init.yaml
files, so taking in arbitrarywith_*_init(..)
doesn't work.Still take a single type per workspace / profile / flow, but also take a mapper that maps from that init param type to different data types and inserts them into the resources map.
Also have
with_resource(..)
methods inCmdContextBuilder
for things that don't need to be serialized/deserialized -- saves people from needing to accessResources
after building the context and then insert.The text was updated successfully, but these errors were encountered: