scaleway-sdk-go
scaleway-sdk-go copied to clipboard
fix: remove label instance image resolution
We don't need anymore the replacement of image label to marketplace UUID.
- Instance can now take a image label and translate it into a compatible UUID
- The actual resolution don't return a compatible image with SBS and return the following error:
scaleway-sdk-go: http error 400 Bad Request: cannot create a volume of type sbs_volume from a base of type unifiedon instance creation
Tests must be recorded as this currently run on saved requests. I tried to run tests locally, removing local label resolution is heavily breaking. With the following code:
serverRes, err := api.CreateServer(&instance.CreateServerRequest{
CommercialType: "DEV1-M",
Image: "ubuntu_jammy",
})
if err != nil {
log.Fatalln(err)
}
Despite creating a server with a local volume based commercial type, the created server will have a SBS volume per default as the image selected by the API is on SBS. If next requests use instance API to interact with volumes, it will fail.
Why "hack" the new default volume type of the instance API (switching to SBS volumes) and maintain a specific behavior for the GO SDK? If you want to keep your local storage with the image label, just add a local volume in your example request.
(only DEV/GP support local volume)
Relates to #2603
Issue was closed by #2626