scaleway-sdk-go icon indicating copy to clipboard operation
scaleway-sdk-go copied to clipboard

fix: remove label instance image resolution

Open agirot opened this issue 1 year ago • 2 comments

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 unified on instance creation

agirot avatar Sep 27 '24 08:09 agirot

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.

Codelax avatar Sep 27 '24 13:09 Codelax

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)

agirot avatar Sep 30 '24 12:09 agirot

Relates to #2603

aslafy-z avatar Jun 19 '25 10:06 aslafy-z

Issue was closed by #2626

Mia-Cross avatar Jul 04 '25 16:07 Mia-Cross