Open Peter-Darton-i2 opened 2 years ago
Hello @Peter-Darton-i2, thank you for this very detailed issue. Just letting you know that we are considering this issue (along with #803 ) and trying to come up with a coherent solution between create & init behaviors.
The recommended/documented orb registration command (orb create) locks the user out from ever using the recommended/documented orb development process (orb init). This isn't a good user experience.
Meta:
CircleCI CLI Version: 0.1.22322+5ff92b4 (release)
Operating System: Ubuntu running under WSL2 on Win10
CircleCI CLI Diagnostic:
Current behavior:
circleci orb create myorg/myorbname --private
circleci orb init myorbname --private
...Error: Unable to create orb: Cannot create an Orb named 'myorbname': an Orb with that name already exists.
Expected behavior:
orb init
command should detect that the orb has already been registered and continue on (it does this when registering contexts; it needs to do this everywhere else too).When did this begin / Was this previously working?:
I've only tried to use this command today; it's failed every time (see also #495 and #803)
Additional Information:
As with #495 and #803, the same bad coding pattern is used and the fix is much the same for all - whenever
orb init
needs something to exist, it should first check to see if it already exists before trying to create it (just as it does for the publishing context).Alternatively, the
circleci orb create
command (and all related documentation) needs to make it 100% clear that its use will irrevocably prevent the use ofcircleci orb init
for that orb, forever. i.e. It should never come as a surprise to the user that they've screwed up their only chance of usingorb init
.