cli
cli copied to clipboard
Service created by `fastly compute deploy` isn't saved to manifest if deploy fails
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.
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.