flowctl draft author
should prune specs that aren't in the local sources
#865
Labels
flowctl
Issues related to the user facing CLI
Say you run the following steps:
flowctl catalog draft --name acmeCo/foo
flowctl draft develop
acmeCo/foo
=>acmeCo/bar
in the local spec filesflowctl draft author
flowctl draft publish
💥 your draft includes bothacmeCo/foo
andacmeCo/bar
There's not an obvious (to me) best way to handle this, but any of these options seem significantly better to me:
draft author
clears all specs from the draft before adding new ones. This way your existingacmeCo/foo
remains untouched.draft author
changes all specs in the draft tonull
(triggering the deletion of the live specs upon publication) before adding new ones. This way your existingacmeCo/foo
will be deleted by the publication.draft author
accepts an argument similar to--existing abort|keep|overwrite|merge-spec
fromcatalog pull-specs
, which explicitly says what to do with an existing draft specs.Given that there's now, with the introduction of
catalog pull-specs|test|publish
, relatively few reasons to usedraft
at all, my inclination is to havedraft author
simply clear all specs from the draft before adding new ones. It's a super easy change to make, and addresses the biggest foot gun. It would also be easy to add a flag to allow opting in to the current behavior.The text was updated successfully, but these errors were encountered: