cli icon indicating copy to clipboard operation
cli copied to clipboard

Service created by `fastly compute deploy` isn't saved to manifest if deploy fails

Open peterbourgon opened this issue 4 years ago • 1 comments

If you fastly compute deploy and it decides to create a service for you, but your deploy fails, that service ID isn't saved to the fastly.toml file. It should be saved there after service creation succeeds, regardless if the deploy works.

peterbourgon avatar Jul 09 '21 02:07 peterbourgon

From what I can tell if the deploy fails (after the service is created successfully), then we delete the service before clearing the Service ID from the manifest...

https://github.com/fastly/cli/blob/782fb64736f85c50a936cc76993a6d1ef8e73505/pkg/commands/compute/deploy.go#L259-L320

Were you seeing the new service persisting after the deploy had failed, as I would have expected that to not be possible due to the undoStack.Push calls (shown in the linked code above), which should have deleted the service.

Integralist avatar Aug 11 '21 14:08 Integralist