Open dcookspi opened 1 year ago
spfs reset
currently only takes one ref/digest. If it took a list, or a+
's list, it would be close to this - if spfs info also had an option to output a+
s list of the current layers.
Did you test this? The code uses EnvSpec
as far as I can tell, which supports the +
that you are talking about
having --add/--remove
to reset seems like the clearest path for this idea - though maybe we should consider language that is more clear where the layer will be added/removed from? any thoughts? Given that it's a stack I want to suggest --push/--pop
but push
might be a little overloaded in spfs
There doesn't seem to be an easy way for a user to run a command to add a ref/digest/layer onto the current runtime stack, without exiting the spfs environment.
spfs reset
lets you swap out the whole stack with a single ref, or remove upperdir edits from the runtime.But to add one extra layer to the top of the runtime stack, you have to go through the convoluted process of:
spfs info
),spfs run
command line with them and the ref/digest of the layer you want to add (which you hopefully put in the right place in the digest+
's list),And even then you won't have any upperdir edits you might've made from the previous environment.
spfs reset
currently only takes one ref/digest. If it took a list, or a+
's list, it would be close to this - ifspfs info
also had an option to output a+
s list of the current layers.One flexible, fairly low-level, option would be to have a spfs command that could show the
+
s list for the current stack, and take a new list to allow replace the current stack wholesale. Then someone could change it to whatever they liked (while keeping any upperdir edits).Another option, closeer to the user-level, is to have a command put a new layer on top of the stack, e.g.
spfs add someref
orspfs reset --add someref
, that would let someone add the layer they wanted without needing to edit a+
s list. We might want to consider a matchingspfs remove
orspfs reset --remove someref
with this.This kind of command and functionalty would also help with the example scenario in https://github.com/imageworks/spk/issues/759