Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove label instance image resolution #2227

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

agirot
Copy link
Member

@agirot agirot commented Sep 27, 2024

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

@github-actions github-actions bot added the instance Instance issues, bugs and feature requests label Sep 27, 2024
@Codelax
Copy link
Member

Codelax commented Sep 27, 2024

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 Codelax closed this Sep 27, 2024
@agirot
Copy link
Member Author

agirot commented Sep 30, 2024

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 agirot reopened this Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
instance Instance issues, bugs and feature requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants