{"record":{"id":"75fb548e86147189","repo":"kubernetes/kops","slug":"getting-image-from-the-marketplace-w","errorCode":null,"errorMessage":"getting image from the marketplace: %w","messagePattern":"getting image from the marketplace: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/scalewaytasks/instance.go","lineNumber":404,"sourceCode":"\t\t\treturn err\n\t\t}\n\n\t\terr = t.RenderResource(\"scaleway_instance_server\", tfName, tfInstance)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc checkImageDifferences(c *fi.CloudupContext, cloud scaleway.ScwCloud, actualServer *instance.Server, expectedImage string) (bool, error) {\n\tlocalImage, err := cloud.MarketplaceService().GetLocalImageByLabel(&marketplace.GetLocalImageByLabelRequest{\n\t\tImageLabel:     expectedImage,\n\t\tZone:           actualServer.Zone,\n\t\tCommercialType: actualServer.CommercialType,\n\t}, scw.WithContext(c.Context()))\n\tif err != nil {\n\t\treturn false, fmt.Errorf(\"getting image from the marketplace: %w\", err)\n\t}\n\n\tif actualServer.Image.ID != localImage.ID {\n\t\treturn true, nil\n\t}\n\treturn false, nil\n}\n\nfunc checkUserDataDifferences(c *fi.CloudupContext, cloud scaleway.ScwCloud, actualServer *instance.Server, expectedUserData *fi.Resource) (bool, error) {\n\tactualUserData, err := cloud.InstanceService().GetServerUserData(&instance.GetServerUserDataRequest{\n\t\tZone:     actualServer.Zone,\n\t\tServerID: actualServer.ID,\n\t\tKey:      \"cloud-init\",\n\t}, scw.WithContext(c.Context()))\n\tif err != nil {\n\t\treturn false, fmt.Errorf(\"getting actual user-data: %w\", err)\n\t}\n","sourceCodeStart":386,"sourceCodeEnd":422,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/scalewaytasks/instance.go#L386-L422","documentation":"In checkImageDifferences, the marketplace API GetLocalImageByLabel call failed while resolving the expected image label to a concrete local image for the server's zone and commercial type. This blocks drift detection for the server's image; the wrapped error is the SDK response (unknown label, unavailable in zone, transient failure).","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/scalewaytasks/instance.go:404 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the image label exists in the Scaleway marketplace","Check availability of the image in the server's zone and for its commercial type","Retry on transient marketplace API failures"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}