Open jrray opened 1 year ago
Proposal: remove this check entirely, or at least skip this check if the --tag option is being used. The user is attempting to make a new tag that aliases the current runtime, with or without modifications from when the runtime was launched.
Makes sense to me - maybe a warning if no additional layer was added? It's not clear how "normal" this is or if it would trip someone up...
https://github.com/imageworks/spk/blob/a7da31e5ef232d681131475f76e0a679b769377c/crates/spfs-cli/main/src/cmd_commit.rs#L136-L140
This well-meaning check has created a problem for us now that we've fixed how spfs runtimes are not editable by default in more scenarios. We're using
spfs commit platform --tag=<...>
to stamp an spfs tag for the current runtime and we'd like this to succeed unconditionally, even if the runtime has not been modified. This had worked when the runtime is editable but is now failing on this check here if the runtime is not editable.Side note: it is possible to make modifications to a runtime, then use
spfs edit --off
, and then not be able to commit the changes due to this check.Proposal: remove this check entirely, or at least skip this check if the
--tag
option is being used. The user is attempting to make a new tag that aliases the current runtime, with or without modifications from when the runtime was launched.Other side note: we don't have a way on the CLI to ask if the runtime is editable, or in lieu of knowing if the runtime is already editable, have a way to run
spfs edit
without it failing with an error if the runtime is already editable.